However, the simulation rejects the command with MAV_RESULT_UNSUPPORTED (3). I’ve verified that the simulation is in guided mode and the aircraft is simply loitering near the home point. Does this have to be wrapped in a full mission setup? If so, can someone point me to an example of how that is done?
This will fly the plane to that loiter point. Keep in mind, this is a loiter point, not a fly through waypoint. I have not found a way to do a fly through in guided mode (yet). I have a feeling I will need to do some math to determine what the actual WP is to account for my bearing to the waypoint and the loiter radius. Or maybe the better plan would be to package a two waypoint mission and always keep myself one waypoints ahead…
indeed, if you want to fly exactly through a point you have to do some math. luckily the PointLatLng class in Mission Planner has all the necessary methods for doing that, you can borrow the code from there