mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 14:00:35 +08:00
mag: use strength in Gauss
This commit is contained in:
+2
-2
@@ -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
|
// 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_declination_gps = get_mag_declination_radians(lat, lon);
|
||||||
_mag_inclination_gps = get_mag_inclination_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
|
// request a reset of the yaw using the new declination
|
||||||
if (_params.mag_fusion_type == MAG_FUSE_TYPE_NONE) {
|
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
|
// 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_declination_gps = get_mag_declination_radians(lat, lon);
|
||||||
_mag_inclination_gps = get_mag_inclination_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
|
// request mag yaw reset if there's a mag declination for the first time
|
||||||
if (_params.mag_fusion_type != MAG_FUSE_TYPE_NONE) {
|
if (_params.mag_fusion_type != MAG_FUSE_TYPE_NONE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user