Having a companion connected to the PX4 flight stack via MAVLink, I am looking for a method to retrieve the global origin in order to convert global vs. local position in my companion software. I receive home position (MSG_HOME_POSITION) , but this is not necessarily the origin.
Second, I want to set the global reference via the companion/groundstation. Using MAVLINK_MSG_GLOBAL_ORIGIN the PX4 global reference (if not already set?!) is set. I'd expect the position estimators now send a global position, even if no GPS is available but only local position estimates. At least in case of EKF2 this assumption seems to be wrong.
So two questions:
- How could I get the global origin via MAVLINK?
- How can the global origin being set in a way that position estimation works in a global frame without GPS?