@bitbanger wrote:
Hi Folks -
We're using the MAVLINK_MSG_ID_MISSION_CURRENT message to determine when our craft has begun it's mission, and attempting to use it to determine when we've reached the last. We can successfully trigger our onboard sensors/processing after a particular waypoint is reached, but the last WP doesn't seem to behave as expected.
We are basing this on the MISSION_COUNT returned from our Pixhawk. For instance if my mission were:
0-home
1-Takeoff
2-waypoint
3-waypoint
4-waypoint
5-RTLMISSION_COUNT would return a 6. So we look for MISSION_CURRENT==5 (because >=4 would be before it reached 4)
When we reach waypoint 4, I would assume the a MAVLINK_MSG_ID_MISSION_CURRENT would be broadcast as a 5, because it is heading toward waypoint 5. Once it reaches five, does the APM then report heading to 0 (home)? Kinda tough to troubleshoot this on the bench. I spent about 10 minutes looking through the GitHub repo searching for instances of send_current_waypoint and the likes, but didn't gain any insight.
Best Regards,
Jamie
Posts: 5
Participants: 3