Rover: move automatic declination setting into AP_Compass itself

This commit is contained in:
Peter Barker 2019-03-27 18:01:29 +11:00 committed by Andrew Tridgell
parent 1adda1ccf0
commit 9d54b4820f
3 changed files with 0 additions and 19 deletions

View File

@ -283,9 +283,6 @@ void Rover::one_second_loop(void)
update_home();
}
// init compass location for declination
init_compass_location();
// update error mask of sensors and subsystems. The mask uses the
// MAV_SYS_STATUS_* values from mavlink. If a bit is set then it
// indicates that the sensor or subsystem is present but not

View File

@ -423,7 +423,6 @@ private:
bool trim_radio();
// sensors.cpp
void init_compass_location(void);
void update_compass(void);
void compass_save(void);
void init_beacon();

View File

@ -3,21 +3,6 @@
#include <AP_RangeFinder/RangeFinder_Backend.h>
#include <AP_VisualOdom/AP_VisualOdom.h>
/*
initialise compass's location used for declination
*/
void Rover::init_compass_location(void)
{
// update initial location used for declination
if (!compass_init_location) {
Location loc;
if (ahrs.get_position(loc)) {
compass.set_initial_location(loc.lat, loc.lng);
compass_init_location = true;
}
}
}
// check for new compass data - 10Hz
void Rover::update_compass(void)
{