mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Update ecl to geo_lookup, SymPy covariance, bugfixes
Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Submodule src/lib/ecl updated: 5356077a32...77b11129fa
@@ -316,7 +316,7 @@ AttitudeEstimatorQ::Run()
|
||||
if (_gps_sub.copy(&gps)) {
|
||||
if (_param_att_mag_decl_a.get() && (gps.eph < 20.0f)) {
|
||||
/* set magnetic declination automatically */
|
||||
update_mag_declination(math::radians(get_mag_declination(gps.lat, gps.lon)));
|
||||
update_mag_declination(get_mag_declination_radians(gps.lat, gps.lon));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user