Plane: Reduce inerital nav dependence

This commit is contained in:
Michael du Breuil 2019-06-28 14:31:44 -07:00 committed by Randy Mackay
parent 13840337ec
commit 22598b1a4b
2 changed files with 5 additions and 2 deletions

View File

@ -166,7 +166,7 @@ void Plane::ahrs_update()
quadplane.check_yaw_reset();
// update inertial_nav for quadplane
quadplane.inertial_nav.update(G_Dt);
quadplane.inertial_nav.update();
}
/*

View File

@ -2254,7 +2254,10 @@ void QuadPlane::vtol_position_controller(void)
void QuadPlane::setup_target_position(void)
{
const Location &loc = plane.next_WP_loc;
Location origin = inertial_nav.get_origin();
Location origin;
if (!ahrs.get_origin(origin)) {
origin.zero();
}
motors->set_desired_spool_state(AP_Motors::DesiredSpoolState::THROTTLE_UNLIMITED);
const Vector2f diff2d = origin.get_distance_NE(loc);