case MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT:
AP_Mission::Mission_Command tmp = {};
AP_Mission::Mission_Command cmd = {};
if (copter.mode_auto.mission.read_cmd_from_storage(copter.mode_auto.mission.get_current_nav_index(), tmp))
cmd.id = MAV_CMD_NAV_WAYPOINT;
// set new waypoint to current location
cmd.content.location = tmp.content.location;
cmd.content.location.alt = packet.param7*100.0f;
copter.mode_auto.mission.replace_cmd(copter.mode_auto.mission.get_current_nav_index(), cmd);
In auto mode, the following code will change the altitude of the next waypoint. s-cure will re-plan the path of the mission, but the altitude change is still slow. Is there any other way to quickly change the altitude, or between two waypoints? , give priority to reaching the height before executing the task.
Use pos_control->set_pos_tune_offset_z_cm(wp_offset_alt) to just change the height during the task.
regards,
jason