I was wondering where in the ArduPlane code is the current waypoint index is stored. For instance, when the UAV is flying toward waypoint 1, where is the variable in ArduPlane that stores this value? Furthermore, if the UAV was flying to waypoint 2, this variable would store 2. Is there a variable that stores this? I figure there must be a variable that contains this information because the APM Mission Planner shows this value, therefore it is receiving this information from the ArduPlane software somehow.
On that same note, does anyone what the waypoint index for the home location is?
search for it in the code here: