Repository navigation
Conversation
Nineteen functions of the Navigation and Aeronautics sections were in the root of the library. Move them to library/Navigation and library/Aeronautics, as Astronomy or Chemistry do. The LIB menu does not change, since it is defined by config/library.csv. PeriSel stays in the root, since doc/config/library.md uses its path as an example. Author & design: Jean Wilson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LL→UTM and UTM→LL use the Krüger series in the form of Karney (2011), to order 4, with the zone exceptions of Norway and Svalbard. LL→MGRS and MGRS→LL use the AA lettering of NGA.SIG.0012. Results agree to the millimetre with GeographicLib's GeoConvert on four test points. The files go in library/Navigation, like the functions moved there by the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WMM gives the magnetic declination, the inclination, and the horizontal and total intensities at a point and date, from the coefficients of WMM2025 by NOAA and the British Geological Survey, which are in the public domain. Checked against the test values of NOAA: the reference computation matches all twelve, and the calculator matches it on the six that were tried. Author & design: Jean Wilson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TrackLen sums geodesic distances along a track or a route. PolyArea gives the area of a polygon from the spherical excess on the sphere of the same area, which differs from GeographicLib by about 0.002% for a province, and is documented. LLH→ENU and ENU→LLH work in a local East, North, Up frame. UTC→GPS and GPS→UTC convert to and from GPS week and time of week, from 2017 on, with an offset of 18 s. LL→DMS and LL→DDM format a position as text. Author & design: Jean Wilson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Function Library gains AriesGHA, SunGP, SightRed, Sextant, MeridLat and LOPFix. The Equation Library gains Sight Reduction, Altitude Corrections, Meridian Altitude and Amplitude, with three figures in the help. Checked against the Celestial Navigation Data service of the US Naval Observatory, and against Bowditch, section 403. The Sun is within about 0.2' of the USNO on the three dates tried; its formula is stated to about 1'. The Moon, the planets and a star catalogue are not included. Also remove command names in backticks from the help of WMM, UTC→GPS and GPS→UTC, since such a link takes the Enter key from the examples. Author & design: Jean Wilson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a DM32, DDays, JDN and Date+ reject every integer date with "Invalid date", while the same date written as a decimal works (c3d#1873). These four functions now convert their date with →Num and write their epochs as decimals, so that they work on the calculator until that is fixed. Results are unchanged. Author & design: Jean Wilson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a DM32, a date unit whose value is an integer is displayed as "Invalid date", even the result of Date (c3d#1873), while the same date as a decimal is displayed correctly. GPS→UTC now converts the date it computes to a decimal. The value and its display on the simulator are unchanged. Author & design: Jean Wilson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This completes the navigation part of my Aeronautics plan. It is based on #1874, which moves the existing Navigation and Aeronautics functions to subdirectories; please merge #1874 first. Its help examples also need #1868 and #1872: without them, two examples of
MGRS→LLandFormulacan fail depending on memory layout.Function Library
Navigation/Geodesy, thirteen functions, in
library/Navigation:LL→UTM,UTM→LLLL→MGRS,MGRS→LLWMMTrackLenPolyAreaLLH→ENU,ENU→LLHUTC→GPS,GPS→UTCLL→DMS,LL→DDMCelestial Navigation, a new section, six functions in
library/Celestial:AriesGHA,SunGP,SightRed,Sextant,MeridLatandLOPFix. They are checked against the Celestial Navigation Data service of the US Naval Observatory and against Bowditch, §403. The Sun is within about 0.2′ of the USNO on the dates tried; its formula is stated to about 1′. The Moon, the planets and a star catalogue are not included.Equation Library
A new section Celestial Navigation: Sight Reduction, Altitude Corrections, Meridian Altitude and Amplitude, with 23 variables and three help figures.
On a DM32
All the functions were tried on a DM32 with a test build.
WMMtakes 920 ms. Dates are passed as decimals inUTC→GPS,GPS→UTC,AriesGHAandSunGP, because a DM32 rejects integer dates (#1873).Tests
Full test suite on this branch, with #1868 and #1872 applied: DB48x and DB50x, no failure.
Author & design: Jean Wilson
🤖 Generated with Claude Code