Description
Hi all,
I try to use new takeoff function in takeoff.pde wih alt_hold mode.
But I don't understand the parameter : must_navigate . It is describe as must_nagivate is true if mode must also control horizontal position
This parameter come from (float takeoff_alt_cm, bool must_navigate) which is called in GCS_Mavlink.pde in response of MAV_CMD_NAV_TAKEOFF
// param3 : horizontal navigation by pilot acceptable
do_user_takeoff(takeoff_alt, is_zero(packet.param3))
In mode Alt_hold, when land, if I request a takeoff with apmplanner2 or mavros , it doesn't takeoff...
By looking at Mavlink definition :
MAV_CMD_NAV_TAKEOFF Takeoff from ground / hand
Mission Param #1 Minimum pitch (if airspeed sensor present), desired pitch without sensor
Mission Param #2 Empty
Mission Param #3 Empty
Mission Param #4 Yaw angle (if magnetometer present), ignored without magnetometer
Mission Param #5 Latitude
Mission Param #6 Longitude
Mission Param #7 Altitude
Param 3 is empty. In mavros it's always 0 . I find two takeoff definitions in apmplanner2 and both set param3 to 0
I made some test by setting
bool current_mode_has_user_takeoff(bool must_navigate)
{
switch (control_mode) {
case GUIDED:
case LOITER:
case POSHOLD:
case ALT_HOLD:
return true;
case SPORT: <-- I don't know this mode so I don't touch it
return !must_navigate;
default:
return false;
}
}
And I achieved good takeoff (with 100% reliability and repetability) in alt_hold mode with or without GPS and no sonar. I use git branch https://github.com/diydrones/ardupilot/tree/411a96b4b3cefdb4277b48b8df38d212efbb1f92 on erlebrain (linux + pxf cape).
By the way, apm works well with g++ 4.8.2