Using ArduPilot with a kite

I have a project in which we will use the movement of the kite to produce electricity.
Basically the trajectory of the kite will be optimized with an algorithm relying on the wind force and direction.
The idea is to replace the existing code that is executed when the drone follows a defined trajectory (the GPS one) by our own algorithm.
So the question is : where in the current code is the ‘next point’ for the drone set? In other words, where in the code is the GPS data from the Mission planner?

I’m using ArduPlane 2.78.

Thanks in advance!

if I am not wrong, you should post your question in the github for apm. thats where most of the developers ‘hang out’

Sent from my GT-N5120 using Tapatalk