Browse Source

Rover: set home using EKF position

previously the home position could be set from DCM
This makes the setting of home slower but more accurate
master
Randy Mackay 7 years ago
parent
commit
de406da254
  1. 2
      APMrover2/commands.cpp

2
APMrover2/commands.cpp

@ -17,7 +17,7 @@ bool Rover::set_home_to_current_location(bool lock) @@ -17,7 +17,7 @@ bool Rover::set_home_to_current_location(bool lock)
{
// use position from EKF if available otherwise use GPS
Location temp_loc;
if (ahrs.get_position(temp_loc)) {
if (ahrs.have_inertial_nav() && ahrs.get_position(temp_loc)) {
return set_home(temp_loc, lock);
}
return false;

Loading…
Cancel
Save