enginefailure: set mission item

This commit is contained in:
Thomas Gubler 2014-07-24 21:22:40 +02:00
parent bc4d7952f3
commit a08b7a9f35
1 changed files with 14 additions and 14 deletions

View File

@ -104,21 +104,21 @@ EngineFailure::set_ef_item()
case EF_STATE_LOITERDOWN: {
//XXX create mission item at ground (below?) here
//_mission_item.lat = (double)(_param_airfieldhomelat.get()) * 1.0e-7;
//_mission_item.lon = (double)(_param_airfieldhomelon.get()) * 1.0e-7;
//_mission_item.altitude_is_relative = false;
//_mission_item.altitude = _param_airfieldhomealt.get();
//_mission_item.yaw = NAN;
//_mission_item.loiter_radius = _navigator->get_loiter_radius();
//_mission_item.loiter_direction = 1;
//_mission_item.nav_cmd = NAV_CMD_LOITER_UNLIMITED;
//_mission_item.acceptance_radius = _navigator->get_acceptance_radius();
//_mission_item.time_inside = _param_commsholdwaittime.get() < 0.0f ? 0.0f : _param_commsholdwaittime.get();
//_mission_item.pitch_min = 0.0f;
//_mission_item.autocontinue = true;
//_mission_item.origin = ORIGIN_ONBOARD;
_mission_item.lat = _navigator->get_global_position()->lat;
_mission_item.lon = _navigator->get_global_position()->lon;
_mission_item.altitude_is_relative = false;
//XXX setting altitude to a very low value, evaluate other options
_mission_item.altitude = _navigator->get_home_position()->alt - 1000.0f;
_mission_item.yaw = NAN;
_mission_item.loiter_radius = _navigator->get_loiter_radius();
_mission_item.loiter_direction = 1;
_mission_item.nav_cmd = NAV_CMD_LOITER_UNLIMITED;
_mission_item.acceptance_radius = _navigator->get_acceptance_radius();
_mission_item.pitch_min = 0.0f;
_mission_item.autocontinue = true;
_mission_item.origin = ORIGIN_ONBOARD;
//_navigator->set_can_loiter_at_sp(true);
_navigator->set_can_loiter_at_sp(true);
break;
}
default: