Setting home coordinates

I use ardupilot codebase on ubuntu. I modify my mode_guided.cpp, and I want to mark my current location as home automatically. which function should I use?