From da9f314b69585ba169d033fec293e9ea48b9d1fd Mon Sep 17 00:00:00 2001 From: bresch Date: Tue, 10 Nov 2020 09:24:30 +0100 Subject: [PATCH] mag: use strength in Gauss --- EKF/gps_checks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EKF/gps_checks.cpp b/EKF/gps_checks.cpp index b0ab0b0be1..e09a084f2a 100644 --- a/EKF/gps_checks.cpp +++ b/EKF/gps_checks.cpp @@ -85,7 +85,7 @@ bool Ekf::collect_gps(const gps_message &gps) // set the magnetic field data returned by the geo library using the current GPS position _mag_declination_gps = get_mag_declination_radians(lat, lon); _mag_inclination_gps = get_mag_inclination_radians(lat, lon); - _mag_strength_gps = get_mag_strength_tesla(lat, lon); + _mag_strength_gps = get_mag_strength_gauss(lat, lon); // request a reset of the yaw using the new declination if (_params.mag_fusion_type == MAG_FUSE_TYPE_NONE) { @@ -124,7 +124,7 @@ bool Ekf::collect_gps(const gps_message &gps) // set the magnetic field data returned by the geo library using the current GPS position _mag_declination_gps = get_mag_declination_radians(lat, lon); _mag_inclination_gps = get_mag_inclination_radians(lat, lon); - _mag_strength_gps = get_mag_strength_tesla(lat, lon); + _mag_strength_gps = get_mag_strength_gauss(lat, lon); // request mag yaw reset if there's a mag declination for the first time if (_params.mag_fusion_type != MAG_FUSE_TYPE_NONE) {