mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 16:43:34 +08:00
Update ecl to geo_lookup, SymPy covariance, bugfixes
Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
co-authored by
Matthias Grob
parent
e2a9b68fc7
commit
1191a0efe6
@@ -71,9 +71,9 @@ void FakeMagnetometer::Run()
|
||||
const double lon = gps.lon / 1.e7;
|
||||
|
||||
// magnetic field data returned by the geo library using the current GPS position
|
||||
const float mag_declination_gps = math::radians(get_mag_declination(lat, lon));
|
||||
const float mag_inclination_gps = math::radians(get_mag_inclination(lat, lon));
|
||||
const float mag_strength_gps = 0.01f * get_mag_strength(lat, lon); // centi-Gauss (micro-Tesla) -> Gauss
|
||||
const float mag_declination_gps = get_mag_declination_radians(lat, lon);
|
||||
const float mag_inclination_gps = get_mag_inclination_radians(lat, lon);
|
||||
const float mag_strength_gps = get_mag_strength_gauss(lat, lon);
|
||||
|
||||
_mag_earth_pred = Dcmf(Eulerf(0, -mag_inclination_gps, mag_declination_gps)) * Vector3f(mag_strength_gps, 0, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user