Copter: always update current_loc regardless of inav state

If inertial nav is not initialised these will be set to zero anyway
This commit is contained in:
Randy Mackay 2015-02-09 20:26:18 +09:00
parent 7029b11414
commit 9e156d2f81

View File

@ -16,12 +16,11 @@ static void run_nav_updates(void)
}
// calc_position - get lat and lon positions from inertial nav library
static void calc_position(){
if (ap.home_is_set) {
static void calc_position()
{
// pull position from interial nav library
current_loc.lng = inertial_nav.get_longitude();
current_loc.lat = inertial_nav.get_latitude();
}
}
// calc_distance_and_bearing - calculate distance and bearing to next waypoint and home