Great post. I am also interested in this behavior getting added to PX4 for use in a professional fixed-wing mapping UAV we are developing. I am new to PX4, but am trying to learn. Is there a way to make a formal request that this be considered by the PX4 core dev team?
The current PX4 RTL behavior seems good for VTOL aircraft, but fixed wing aircraft need a different scheme. After some research, I think a Fixed-Wing RTL solution might look something along these lines:
1) Any time RTL is triggered the aircraft should do the MAV_CMD_DO_LAND_START thing described above. This could be pressing the [RTL] button in Qgc. Or it could be autopilot auto RTL from low battery (BAT_CRIT_THR?), Loss of Comms (NAV_DLL_CH_T expires without regaining comms?), and maybe in Loss of RC (NAV_RCL_LT expires?).
2) Other parameters associated with "Return to Land" should still work, although at the MAV_CMD_DO_LAND_START location instead of the "HOME" location. (e.g. RTL_RETURN_ALT, RTL_DESCEND_ALT, RTL_LAND_DELAY, RTL_MIN_DIST).
3) Does Qgc currently place both the Comms Hold Waypoint and the Airfield Home Waypoint at the "HOME" point in Qgc? Assuming NAV_DLL_CH_T occurs while loitering above the "Home" point, when it expires without regaining communications the fixed-wing aircraft should go to RTL as described above.
4) I suppose folks with hybrid aircraft (e.g. quad planes, etc) might want the ability to choose between VTOL or Fixed-Wing RTL types. Maybe "RTL type" could be selected as a parameter?
5) If Fixed-Wing RTL type is selected there should be a mission validity check that requires a valid landing waypoint and valid MAV_CMD_DO_LAND_START point before accepting the upload (this could happen in PX4 and/or Qgc).
Sorry for the long post. I'm sure I'm missing some important points. Any thoughts from the dev team are appreciated.