Missions with MAV_FRAME_GLOBAL_RELATIVE_ALT ignore alt=0

I understand that MAV_FRAME_GLOBAL_RELATIVE_ALT (https://mavlink.io/en/messages/common.html#MAV_FRAME_GLOBAL_RELATIVE_ALT) is defined as:

“Global (WGS84) coordinate frame + altitude relative to the home position. First value / x: latitude, second value / y: longitude, third value / z: positive altitude with 0 being at the altitude of the home location.”

I’m not sure what the rationale is, as this restriction means that you can’t use this frame to fly below the takeoff point.
But ArduCopter seems to do something bad - it accepts the waypoint with alt=0, but ignores the altitude, and simply flies to it at its current altitude. This could mean crashing into something (imagine trying to fly under a bridge).

Do you think it’s a bug/undesired behavior? Should I open a ticket?

You can even set negative values as an altitude. You just have to reduce the altitude warning in Missionplanner on the Plan tab.

With alt=0 it seems to hold current altitude, but you can set it to 0.01 or something

Wow, that’s even worse than I thought :wink:

Why, what is your issue? You can fly below the takeoff point by setting a negative altitude. Seems quite straight forward to me…

It’s just very surprising that alt=0 specifically is ignored. It means I have to do something like:
alt == 0 ? 0.01f : alt
in my code when uploading the waypoint.