I’m working on a modified version of Mission Planner (I’m using Visual Studio 2019) and I would like to list every GPS position sent by the copter during a mission.
Is there an event I can use in order to get the copter position each time the GPS is refreshed ?
I can’t find the class where the Mavlink messages sent by the copter are read.
Why would you do that. Mission Planner is logging every incoming mavlink messages in the local telemetry log (tlog), you can extract all positions from there.
Actually I’m using the copter to take measurements and I would like the GPS position to match the moment when the measure is taken. Where do I find the tlog ?
If you insist of code, don’t modify mission planner. Maintain your own fork is a pain in the *ss and MP changes a lot. Instead check the code and instructions in this post.Tank empty alert You can write a plugin with a couple of lines of code that subscribes the Mavlink OnPacketReceived event, and gets every mavlink messages that received by the ground station. Having a plugin makes you independent of the Mission Planner version, you can keep up with the new releases without change and recompile.