Coding Question

Hi,
I was taking a look at the ArduCopter Github code and I’m trying to create my own flight mode which I’m following the wiki page about doing so. The question I have is about getting GPS coordinates while flying. I saw that theres the AP_GPS library that contains a bunch of classes and functions dealing strictly with GPS. I was wondering if there was one function I could call or global variables of sort that will allow me to get the current GPS coordinates that I could use in my flight mode while its flying?
Thanks!
Using the Here2 GPS attachment to the OrangeCube if that makes any difference, dont think it does.

I think it is ahrs.get_location();

I will look into that one, thank you