Before the drone is armed, the coordinate frames of these are identical:
- the message to send to the drone to move it to a location of MAVLINK_MSG_SET_POSITION_TARGET_LOCAL_NED_POSITION with coordinate_frame = MAV_FRAME_LOCAL_NED. i.e. you must specify this relative to EKF origin.
- the message sent back from the drone of its current location of MAVLINK_MSG_ID_LOCAL_POSITION_NED. i.e. the drone specifies this relative to EKF origin.
HOWEVER, once you arm the drone, MAVLINK_MSG_SET_POSITION_TARGET_LOCAL_NED_POSITION is thereafter provided relative to the arming location.
If you arm the drone in a different place to getting a GPS fix you are screwed.
Is there a way to ensure this reset of the MAVLINK_MSG_SET_POSITION_TARGET_LOCAL_NED_POSITION coordinate frame is not performed?