Repository navigation
Conversation
Previous review (2026-11-09)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head The WMM2025 implementation checks out: coefficients match NOAA's file, the field matches a reference implementation to within 0.001 nT, units, altitude sources and UTC dates are right, and nothing blocks merging. Minor (2)
|
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Re-reviewed at the new head 3d8e5fc; the WMM2025 model, units and date handling still check out and nothing blocks merging. Minor (2)
|
… GPS without instances
Fixes #226.
"Use full WMM with date and altitude" from #81.
wmm.jsnow evaluates the WMM2025 spherical harmonic model (degree 12, with secular variation) instead of interpolating the 10 deg declination/inclination/intensity tables. The coefficients are embedded from NOAA'sWMM2025.COF, which is public domain. The implementation was checked against both published test sets: the 12 points inWMM2025_TEST_VALUES.txtmatch to the 0.1 nT rounding, and the 100 points in the.COFzip'sWMM2025_TestValues.txt(lat -87 to 89, 2025.0 to 2029.5, 0 to 100 km) match to within 0.001 nT.ORGN,POSorAHRS_ORIGIN_ALT). The date comes from the first GPS week/time in the log, or is the current date if there is none. All can be edited.expected_earth_field()returns the same fields as before (vector in mGauss NED, intensity, declination, inclination), so the fit code is unchanged.Compared with the tables on three logs, the expected field differs by about 2 mGauss (0.4%) and declination by 0.1 to 0.25 deg, so fitted offsets move by 1 to 2 mGauss. This also moves MAGFit away from the firmware's
AP_Declinationtables. Logs from before 2025 use the model extrapolated backwards.Position throughout the flight (the next item on the list) will follow separately on top of this.