示例#1
0
// do_takeoff - initiate takeoff navigation command
void Copter::do_takeoff(const AP_Mission::Mission_Command& cmd)
{
    // Set wp navigation target to safe altitude above current position
    float takeoff_alt = cmd.content.location.alt;
    takeoff_alt = MAX(takeoff_alt,current_loc.alt);
    takeoff_alt = MAX(takeoff_alt,100.0f);
    auto_takeoff_start(takeoff_alt);
}
// do_takeoff - initiate takeoff navigation command
void Copter::do_takeoff(const AP_Mission::Mission_Command& cmd)
{
    // Set wp navigation target to safe altitude above current position
    auto_takeoff_start(cmd.content.location);
}