Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Use strength in Gauss #933

Merged
merged 1 commit into from
Nov 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EKF/gps_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down