Ephemerides and Sight Reduction for the HP Prime Calculator
This repository contains a set of programs written in Prime Programming Language (PPL) for the HP Prime calculator to turn it into a reliable, low-cost celestial navigation computer that can live in a chart table and requires no updates until the year 2200. NOTE: The program works very well on the G1 V2 (Rev. C) but it is extremely slow on the newer and more powerful G2 (Rev. D) -- this is currently being investigated by the manufacturer. It can also be used on any PC or Mac running the HP Prime Virtual Calculator program. You may freely use and modify this program for non-commercial purposes under this license
The following functionality is provided:
-
Astronomical Calculations:
- Ephemerides of the Sun, Moon, Mars, Venus, Jupiter, Saturn, and the usual 58 stars used in celestial navigation including GHA, declination, azimuth, altitude, semi-diameter, and rise and set times
- Delta T, equation of time, obliquity of the ecliptic, etc.
- Rise and set times of the Sun and all other celestial bodies, civil and nautical twilight times
- Semi-diameter of the planets and the Moon
- Moon phase
- Centroid corrections for the partial illumination of Venus and Mars
- Interactive stereographic projection of the sky (aka star finder plot) at a given location and time
-
Celestial Navigation:
- Observation planning by listing all observable bodies (i.e. meeting user-specified altitude and azimuth constraints) during morning and evening nautical twilight and at any time of the day with their respective GHA, declination, azimuth, true altitude, apparent altitude, and semi-diameter
- Sight reduction of sextant observations of any of those celestial bodies to Lines of Position (LOPs)
- Running fix calculations through translation of lines of position by a certain distance on a given bearing
- Plotting of LOPs on a Cartesian plot from which a fix can easily be deduced
- Automatic computation of fixes based on the intersection of 2 LOPs, symmedian center of 3 LOPs, and minimization of the least squares of the distance to 4 or more LOPs
- Determination of the index correction of a sextant from two simple observations of the Sun
The astronomical calculations are derived from the incredible work of Henning Umland. The ephemerides are generally accurate to 0.1' from the 19th to 22nd centuries inclusively (1800-2200) (see Future Improvements section).
The sight reduction formulas used in this program were derived from many sources that are usually provided in the comments within the source code.
For an excellent textbook on celestial navigation and the process of sight reduction, refer to Celestial Navigation: A Complete Home Study Course by David Burch and Tobias Burch. The calculations in this program follow the sight reduction process described in the book.
Table of Contents
-
Installing the Program
- Prerequisites
- Downloading this Program
- HP Connectivity Kit and HP Prime Virtual Calculator
- Installing from Binaries
- Installing from Source Files
- Confirming that Everything Works
- Prerequisites
-
Using the Program
-
Running the Program
-
Units and Conventions
- Negative Numbers
- Position and Angle Format
- Date Format
- Time Format
- Dark Mode
-
Initialization
-
Planning Observations
-
Reducing Sights
-
Running Fixes
-
Making a Fix
- Manual Fix
- Computed Fix
-
Ephemerides
-
Star Finder
-
Setting Default Index Correction
- Direct Entry
- Calculation from Sun diameter measurement
-
Installing the Program
The program can be installed on an HP Prime calculator or on a PC or Mac running the HP Prime Virtual Calculator from the source files in the /src folder of this repository or from the binary files in the /bin folder. To prevent issues during the installation, such as memory limitations, variable or program name clashes, etc., it is STRONGLY recommended to perform the installation on a fresh calculator that just had a soft reset done. To reset your calculator, first save all your important programs using the Connectivity Kit described below and press the On-Apps-ESC keys simultaneously.
Prerequisites
In order to use and install this program, you need to download this repository to your computer and you need to have the HP Connectivity Kit running on your computer and working with either an HP Prime V2 or G2 calculator (has not been tested on a V1) connected to your computer with a USB cable or with the HP Prime Virtual Calculator program running on the same computer as the HP Connectivity Kit.
Downloading this Program
You can download a ZIP archive containing all the files in this repository from this link. Extract it to some folder on your computer. Alternatively, if you are familiar with git, you can clone the repository into your current folder in a command shell window with git clone https://github.com/placidanomaly/HPPrimeSightReduction.git, which will make getting updates easier (using git pull from the main folder of the repository).
HP Connectivity Kit and HP Prime Virtual Calculator
Follow these steps to download and install the HP Connectivity Kit and the HP Prime Virtual Calculator programs:
- Download and install the HP Connectivity Kit program from this link
- If desired, download and install the HP Prime Virtual Calculator program from this link
- Launch the HP Connectivity Kit program
- Connect an HP Prime Calculator to the computer with a USB cable, or launch the HP Prime Virtual Calculator program, and confirm that the calculator appears in the Calculators window of the Connectivity Kit.
NOTE: endpoint protection software like Windows Defender can interfere with the HP Connectivity Kit program. Try disabling any such software if you're having trouble connecting to the HP Prime Virtual Calculator.
Installing from Binaries (RECOMMENDED)
To install from the binaries, the .hpprgm files must be loaded into the Connectivity kit:
- Launch the HP Connectivity Kit program and ensure the Content window is displayed. If not, use the Window->Content menu to display it
- Drag all the
.hpprgmfiles in the/binfolder of the repository into the Content window of the HP Connectivity Kit program - Drag all the files in the Content window of the HP Connectivity Kit program onto the calculator icon in the Calculators window
- Leave the calculator alone for about 2 minutes while programs are being loaded
- Skip the next section and go to Confirming that Everything Works
Installing from Source Files
If you are experiencing issues during the installation of the binaries, you can use this alternate procedure which consists of loading the source code of the programs onto the calculator to let the calculator compile them.
- In the HP Connectivity Kit program, expand the calculator and the Programs folder under the calculator
- If some programs are already installed, either clear the entire calculator memory by pressing the On-Apps-ESC keys simultaneously on the calculator (you may need to unplug and plug the calculator back into the computer after that), or right-click each one of the programs in the HP Connectivity Kit and select Delete
- Right-click on Program and select New
- Enter the name Earth and press Enter. An empty editor window will open
- Open the
src/earth.txtfile from this repository in a text editor on your computer - Select all the text (Ctrl-A), copy it to the clipboard (Ctrl-C), and paste it into the editor window in the HP Connectivity Kit program (Ctrl-V)
- Save the file (Ctrl-S) and close the editor window
- Repeat steps 5-8 above for each text file in the repository
- On the calculator, go to the Programs page with - and confirm that all the programs are loaded
- Open each program and hit to confirm that there are no syntax errors
Confirming that Everything Works
When the installation is completed, whether from binaries or from source, confirm that all the programs appear under the Programs section of the calculator in the HP Connectivity Kit. If the programs are not all present, re-do the installation procedure.
If all programs are listed, confirm that the installation was successful by performing the following verification:
- On the calculator, open the Programs page using the - keys.
- Select the Sight Reduction program using the arrows (the big round button) on the calculator (see note below), press the soft key on the screen
- Touch the 2. Astronomy tile (or press the 2 key), then touch 2. Ephemerides
- Fill out the form with a date, time, and location following the conventions in the next section (or leave the default values) and press . If everything was installed properly, the calculator will process the requested ephemerides for about 16 seconds (on a G1 V2 (Rev. C) calculator) which will allow verifying that all programs are properly installed. The results will then be displayed in the Spreadsheet app. You can scroll through them using the touchscreen to check some of the values against a Nautical Almanac for accuracy.
- If anything fails, double-check that all the programs are installed. Open each one of them using the key. Validate that the file is not empty and push the soft key per Step 12 in the Installing from Source section. If the file is empty, try reinstalling the binary file. If that fails, install it from source following the instructions in the previous section. If you're stuck here, contact the author at the address at the bottom of this document.
IMPORTANT: if you inadvertently click on a program name on the touchscreen or press while a program name is highlighted, you will enter the source code view where you can edit the program. Press the ESC key to leave the source code view. IF YOU OPEN THE AstroCalc PROGRAM FOR EDITING, IT WILL CLEAR ALL YOUR SIGHTS. Instead, use the arrows to navigate to a program and click the soft key to launch it.
Using the Program
All the functionality is accessed through the Sight Reduction program. The other programs support astronomical calculations that are too voluminous to fit within a single program. Those programs need to be present for Sight Reduction to work, but they should not be invoked by the user under normal usage scenarios.
Running the Program
The functionality of the program is accessed by the tile menu that is displayed when the program is run. To access the main menu:
- Press - to access the Program view
- Using the Up/Down arrow keys on the round control on the keyboard, highlight the Sight Reduction program
- Press the soft key
When the program starts, the main menu will be displayed. A menu option can be selecting by touching the screen on the tile of the desired option, or by pressing the number key that corresponds to the number of the desired option.
If you select an option that leads to a submenu, you can go back to the previous menu by touching the Go Back soft key:
To exit the program, press the On key.
Units and Conventions
The program relies on dates, times, positions, and other information to perform the calculations. Whenever a field is highlighted for input, the line at the bottom of the screen will provide hints as to which unit and format should be used for that field. Keep in mind that the units are not consistent, they follow the conventions of celestial navigation. For example positions, hour angles, and declinations are expressed in degrees, corrections are in arc minutes, and the semi-diameter of celestial bodies is expressed in arc seconds, so pay attention to the input hints.
Negative Numbers
Negative numbers must be prefixed by a - symbol entered using the key, and NOT with the subtraction key, which will cause an error. If the calculator is in Reverse Polish Notation (RPN) mode, all characters in an input field must be cleared before a negative value can be entered. This is why we recommend setting the calculator in Textbook mode (the default value) using the SHIFT-Home key combination prior to using this program. An alternative to avoid having to enter negative numbers is to enter western longitudes as their corresponding eastern equivalent, e.g. instead of entering 45W, which must be entered as -45 as will be explained later, you can enter 315E, which is entered as 315.
Position and Angle Format
Positions are represented in degrees of latitude and longitude which can be entered either as DDdegMM'SS" using the - key combination or in decimal degrees DD.ddddddd. Northern latitudes are positive, so 14deg45'21"N is entered as 14deg45'21", while southern latitudes are negative, so 20.2321S is entered as -20.2321. Same with declination: N45.2345 is represented as 45.2345 while S12deg51'03" is represented as -12deg51'03". Positive values of longitude greater than 180deg will be converted to a negative value corresponding to the western longitude, e.g. 220 will be converted to -140.
Celestial navigation positions, declinations, corrections, hour angles, etc., are traditionally represented using degrees and decimal minutes to one decimal place, e.g. DDdegMM.m', but the calculator does not natively support that format. Decimal minutes must be converted to arc seconds which are equal to the decimal part of minutes multiplied by 6. For example, S24deg8.4' must be entered as -24deg8'24". That being said, the program usually outputs values using decimal minutes.
Date Format
Date values are represented using the native calculator format which is YYYY.MMDD. For example, April 23, 2026 must be entered as 2026.0423.
Time Format
Time values are represented in 24-hour format using the same format as angle degrees, i.e. HHdegMM'SS", using the - keys. For example 11:43:12pm is entered as 23deg43'12".
Dark Mode
The color theme used by the calculator can be set to Light or Dark mode on page 2 of the Settings menu. The program will adjust its display based on the theme set. When making observations during twilight hours, it is preferable to set the calculator to a Dark theme to preserve night vision. The screens below illustrate the display in dark mode.
Initialization
Clearing Memory
The program keeps data about sights and lines of position in a global variable named "sights" which is preserved when the calculator is turned off. Generally, you should clear the program's memory prior to any new fix or if you ever get an Invalid Input error. To clear all program variables:
- From the main menu, select 1. Navigation
- From the Navigation menu, seleck 5. Clear sights
- Dismiss the confirmation message to return to the navigation menu
Setting the Time and Time Zone
The calculator has a pretty accurate internal clock that can be used to automatically record the time of observations. It should be set to a reliable external time source from time to time to ensure it is accurate. To set the calculator's internal clock and timezone:
- From the main menu, select 0. Setup and 2. Time set:
-
Fill in the required information:
- Local date: the local date to which to set the calculator's internal clock
- UTC Offset: the number of hours the local time is ahead of or behind UTC. Use a positive value for locations East of Greenwhich and negative for West (e.g. -5 for New York standard time). Keep in mind that this offset changes with Daylight Savings Time (DST). Fractional offset values like the one used in Newfoundland (-3.5 in standard time) are supported.
- Local time: the local time to which to set the calculator's internal clock
-
Make sure to enter a time a few seconds in the future in the Local time field and click the soft key when your time source reads the time entered
Planning Observations
It can be helpful to know which celestial bodies will be visible and where ahead of an observation session with the sextant so that the bodies to be observed can be selected ahead of time based on whether they meet certain a criteria for visibility based on their altitude and azimuth. The program shows, for a given date, all the bodies that meet the visibility criteria at morning and evening nautical twilight, as well as at a specified time during that day.
The ephemerides of the selected celestial bodies will be displayed in the calculator's Spreadsheet app, which will be automatically opened at the end of the computation. You can easily switch back and forth between the program and the ephemerides to review your planning and then record a sight. To go back to the programs from the Spreadsheet app, click -. To return to the ephemerides in the Spreadsheet, click the Apps button and then touch the Spreadsheet icon.
Here's how it works:
- From the main menu, select 2. Astronomy
- From the Astronomy menu, select 1. Sight Planning. An input screen will appear:
-
Fill out the observation parameters and visibility criteria:
- Date: the date on which the observations will be made in YYYY.MMDD format
- Time: an arbitrary time at which to show the visible bodies, in HHdegMM'SS" format
- Latitude: the latitude in degrees where the observations will be made. This will typically be your DR position at the time of the observations.
- Longitude: the longitude in degrees where the observations will be made
- Altitude: the minimum altitude in degrees of the celestial bodies to be included in the list. This can be useful to hide bodies that would be obscured by a ship's superstructure, trees on a shoreline, etc.
- Azimuth from: the true heading in degrees of the beginning of a clockwise arc within which the azimuth of bodies must lie in order to be included in the list. Same as for Altitude, this can be used to suppress bodies that would be obscured by a ship's superstructure or the land side of a shoreline
- Clockwise to: the true heading in degrees of the end of a clockwise arc within which the azimuth of bodies must lie in order to be included in the list
-
It will take about 50 seconds on an HP Prime V2 to compute all the ephemerides. You will be prompted to press a key to show the results at the end of the calculation. The output will be shown in the Spreadsheet app with all times in local time (assuming SET_TIME was run to specify the time zone). It will include, in clockwise order of azimuth within the prescribed arc:
- Sunrise, sunset, civil twilight, and nautical twilight times
- Local time of Meridian passage at the specified longitude
- List of observable bodies (i.e. meeting azimuth and altitude constraints entered on the first screen) with, for each, the azimuth, true altitude (Hc), apparent altitude (Ha) (i.e. the one that a sextant with no index error and no dip would read), Greenwhich Hour Angle (GHA), declination (dec), semi-diameter in arc seconds of the body (if applicable), and rise and set times (if applicable), at 3 different times:
- Morning nautical twilight: from morning Nautical Twilight Time to Civil Twilight Time (if there is a sunrise at that location), with body positions calculated at the midpoint of the twilight period, shown in parentheses
- Evening nautical twilight: from evening Civil Twilight Time to Nautical Twilight Time (if there is a sunset at that location), with body positions calculated at the midpoint of the twilight period, shown in parentheses
- The time specified in the input form
Reducing Sights
Performing a sight reduction is a straightforward process:
- From the main menu, select 1. Navigation
- If needed, reset all previous observations and calculations by selecting the 5. Clear sights menu option
-
To enter a new observation, select the 1. Sights menu option from the Navigation menu.
-
The program can store up to 10 different observations, each resulting in a line of position, and they are accessed by an LOP register number from 1 to 10. Select any empty LOP register for this observation (they should all be empty if you ran 5. Clear sights), and hit the soft key. If you ran the Running fix function, some LOP registers will contain translated LOPs which cannot be edited and, if selected for editing, will be treated as an empty sight that will overwrite the translated LOP. The source of a translated LOP can be edited but its corresponding translated LOP will not be updated so the Running fix functuon should be re-run against the updated values using the same translation values and stored into the same destination register as before.
The Show Progress checkbox simply causes additional computing messages to be displayed during the calculation processes and changes nothing to the results.
- The next screen captures the parameters of the observation:
- UTC Date: the UTC date of the observation in HP Prime date format (YYYY.MMDD). The hint at the bottom of the window displays the current UTC time to help determine if the UTC date is different from the local date. The default value is the current UTC date, which can differ from your local date (e.g. if your time zone is UTC-5 and it is past 19:00, the date will be one day later than your local date).
- DR Lat: the latitude of the dead-reckoning (DR) position in degrees at the time of the observation
- DR Lon: the longitude of the DR position in degrees at the time of the observation
- Body: a drop-down to select the celestial body being observed among a list of the Sun, Moon, 4 planets and 58 stars. For certain celestial bodies, the observed limb must also be selected. The Pre-calculated sights option allows entering the Zn (azimut) and a (distance) of the line of position directly instead of letting the calculator perform the sight reduction calculations. This is useful to plot lines of position that have been calculated manually or some other way to compare them with the calculator-generated LOPs.
- Artificial: check this box if the observation is made on an artificial horizon. If that's the case, the sextant altitude values entered must be the actual reading on the sextant, i.e. double the actual body altitude. When this box is checked, the index correction will be applied before dividing the reading by half and no dip correction will be applied regardless of the eye height or dip short values entered
- Average: check this box to perform the observation averaging process described in the next step. Note: this checkbox is unchecked by default if the LOP register contains a previously entered sextant altitude. Checking it will overwrite the previously entered sextant altitude. If no previous value was entered, the checkbox is checked by default.
- On the next screen, enter the observation conditions which will be used to compute sextant altitude corrections:
- IC: the index correction of the sextant in arc minutes, negative values for "on-scale" correction and positive for "off-scale"
- HE: eye height from the horizon in feet (for dip correction)
- Dip short: distance in nautical miles (nm) from the observer where the horizon ends (e.g. the other side of a large lake), or zero if an infinite horizon is used as reference for the observation
- Temp: the air temperature in degrees C (for refraction correction)
- Pressure: the atmospheric pressure at sea level in millibars (for refraction correction)
- If the Average option was selected, the program will prompt the user to enter sextant observations as they are made. It will show a screen displaying the time and asking to press any key when an observation is made. (It might be useful to extend the Auto-OFF delay of the calculator by setting the value of the TOff system variable to a longer delay. See this link):
- As soon as you've aligned the observed body with the horizon, hit any key or touch the touchscreen. This will note the time of the observation (hence why it is important to reset the calculator's internal clock regularly) and a screen prompting to enter the sextant reading will appear. IMPORTANT: do not halve observations made on an artificial horizon and do not apply any dip or index corrections to the sextant reading, these corrections will be calculated based on the data input in step 6.
-
The program will return to step 8 and allows entering as many observations of the same body as desired. When no more observations are needed, hit Cancel or enter
0in the HS field and click Ok. If only one observation was entered, the program will skip to step 11 and use the time and sextant altitude values entered in Observation #1 -
If more than one observation was entered, the observations will be plotted on a Cartesian graph with time as the horizontal axis and sextant altitude as the vertical axis. The plot allows choosing among various best-fit curves using the soft keys at the bottom of the screen to pick the one most closely approximating the path of the celestial body in the sky: linear and quadratic regressions are available if 3 or fewer observations were made, and cubic and trigonometric regressions are added if 4 or more observations were entered. A red marker indicates a chosen value on the interpolated curve, which is at the midpoint of time range on the regression curve, unless an extremum exists within the time range, in which case that extremum is chosen (useful for Local Apparent Noon observations). When done, hit the soft key to confirm the selected interpolated point.
- The next input screen captures the time of the observation and the actual sextant altitude for the sight. If the observation averaging process was used, the fields will be pre-populated with the averaged values for time and angle and you can just click to confirm it. Otherwise, enter the values for observation time and sextant altitude (and remember NOT to halve the sextant altitude if an artificial horizon was used).
- The calculator will display the values for observed height Ho, Greenwhich Hour Angle GHA, declination dec, Local Hour Angle LHA, and the calculated height Hc of the body. Review them and click OK.
- The calculator will then display the LOP register used and the usual 4 parameters of the line of position: distance a from the LOP either TOWARD or AWAY from the body, azimuth Zn to the body, and the DR position latitude and longitude as entered (no correction of DR position to an assumed position is necessary here because the calculator naturally handles fractional values of LHA and Zn). These parameters enable plotting of the line of position.
- Lastly, the calculator displays the equation for the line of position in a longitude (x) and latitude (y) Cartesian plane which can be used to plot it in a program. That equation is stored in the
Fregister of the Function app of the calculator corresponding to the LOP register selected, e.g. LOP 1 will be stored inF1, which means they can be plotted using the calculator's Function app.
Running Fixes
In order to make a fix using two or more lines of position from observations taking at a different DR position, for example to make a fix based on a morning and an afternoon Sun sight while navigating, the earlier fixes need to be translated by the DR delta between those two positions. Here is the procedure:
-
From the main menu, selection 1. Navigation, then 2. Running fix.
-
From the LOP selection menu, select the LOP that is to be translated:
- Enter the distance and bearing by which to translate the LOP. Enter the bearing in true degrees and the distance in nautical miles:
- Specify the LOP register in which to store the resulting translated LOP. You can select the same LOP as the source LOP, in which case it will be overwritten with the translated LOP and the original observation will be lost (which is usually fine), or any other LOP register:
The calculator will output the magnitude of the translation in degrees of latitude and longitude.
Making a Fix
Once 2 or more LOPs have been defined (i.e. 2 or more sights have been entered in separate LOP registers), a fix can be made either manually by visualizing the LOP plot or automatically by computing a center of LOP intersections.
Manual Fix
A manual fix is made by visualizing the LOPs on a Cartesian plane with longitude as the horizontal axis and latitude the vertical axis. To do that, run the Sight Reduction program and select 1. Navigation then 3. Lines of position. This will open the calculator's Function app and a line of position will be plotted for each LOP defined. The calculator functions accessible through the soft keys can then be used to calculate the intersection of LOPs, etc., and the cursor can be used to manually find the centroid or some other position inside the "cocked hat" to make a fix. In order to determine which line color corresponds to which LOP, use the Symb key to view the color coding and the corresponding LOP equations, and use the Plot key to go back to the graph.
When done, you can return to the program by restarting it. See Running the Program.
Computed Fix
Alternatively, the calculator can compute a fix based on LOPs. The computation varies depending on how many LOPs are defined:
- 2 LOPs: the intersection of the 2 LOPs is the fix
- 3 LOPs: the symmedian center, or Lemoine point, of the triangle formed by the 3 LOPs
- 4 or more LOPs: the coordinate that minimizes the square of the error with each LOP based on the distance between the calculated coordinate and the shortest path to each LOP. This is achieved using derivatives of a function which is the sum of the squares of the distance of the coordinate to each LOP.
LOPs that were translated to a different LOP register are omitted from the calculation, but their translated destination registers are included.
To compute a fix, enter the 1. Navigation menu and select 4. Compute fix. The output will indicate which method was used to compute the fix and the longitude and latitude of the fix. In the screen shots below, we computed a fix after two sights, then entered a third sight and computed the fix again, and entered a fourth sight and computed the fix again:
If you have access to your actual position using a GPS or some other means to make a fix, you can compare the computed fix with your actual position. To do this, click the Check soft key at the bottom of the fix screen. You will be prompted to enter your actual position:
Once your actual position is entered, the calculator will display the distance between the computed fix and the actual position:
Ephemerides
The program can show the ephemerides of the Sun, Moon, Mars, Venus, Jupiter, Saturn, and the 58 celestial navigation stars for any point in time between 1800 and 2200, as well as the corresponding azimuth and altitude from a specified geographical location. The semi-diameter of certain bodies will also be shown. A graphical representation of the ephemerides is available through the Star Finder function which is covered in the next section.
This function is similar to the Sight Planning function but without the overhead of calculating the morning and evening twilight ephemerides, and it also provides additional astronomical parameters such as obliquity of the ecliptic, moon phase, etc. The bodies are ordered by type and name instead of by azimuth and none are filtered out.
Similar to the Sight Planning function, the ephemerides will be displayed in the calculator's Spreadsheet app, which will be automatically opened at the end of the computation. You can easily switch back and forth between the program and the ephemerides: to go back to the programs from the Spreadsheet app, click -. To return to the ephemerides in the Spreadsheet, click the Apps button and then touch the Spreadsheet icon, or click the Num button if the app is already active.
To use this feature:
- From the main menu, select 2. Astronomy and then 2. Ephemerides. An input screen will appear:
-
Fill in the required information:
- Date: the date of the ephemerides in YYYY.MMDD format
- Time: the UTC time of the ephemerides in HHdegMM'SS" format
- Latitude: the latitude in degrees to calculate azimuth and altitude
- Longitude: the longitude in degrees to calculate azimuth and altitude
-
The calculator will display several astronomical calculations such as Delta T, mean and true obliquity of the ecliptic, true GHA Aries, Moon phase (illumination %), UTC time of Meridian passage at the specified longitude, etc. along with the GHA, declination, azimuth, altitude, semi-diameter, rise and set times of all the celestial bodies:
Star Finder
A plot of the sky with the 58 celestial bodies based on their ephemerides can be displayed from the main menu by selecting 2. Astronomy and then 3. Star Finder. The input screen is the same as for the ephemerides function, with additional fields to specify the observer's gaze: the initial center of the star finder view in terms of azimuth and altitude in degrees, and the initial field of view in degrees (the inverse of a zoom level):
Upon submitting the form, the calculator will perform the ephemerides calculation for the selected date and time. At the end of the calculation, a graphical representation of the sky will be displayed. The view is a stereographic projection of the sky which preserves the angles between the celestial bodies and the shapes of constellations. The stars and planets are shown as blue dots if above the horizon or red dots if below the horizon. The center of the screen corresponds to the azimuth and altitude of the viewer and is displayed at the bottom of the screen. The following keys can be used to navigate the plot:
- Up/Down Arrows: tilt view up/down
- Left/Right Arrows: pan view left/right
- Touchscreen drag: you can drag the view using the touchscreen drag gesture
- + / - keys: zoom in/out
- ESC or On: exit the program
While dragging or holding a key down, only the stars and planets will be redrawn. The grid lines will be redrawn when the keys and the touchscreen are released.
Setting Default Index Correction
Whenever a new sight is entered, a value for the index correction of the sextant must be specified. A default value for the index correction can be defined, either by entered a value directly or by calculating it from on a measurement of the diameter of the Sun.
From the main menu, select 0. Setup then 1. Sextant Index Correction. Then choose either the Direct or the Solar method using the soft keys. At the end of the procedure, the value of the index correction for all new sights will be set to the new default index correction value (i.e. the index correction of existing sights will not be changed).
Direct Entry
When selecting the Direct soft key, the following input screen appears. Enter the default index correction in the field in decimal minutes (MM.m), with a negative value for an on-scale correction and a positive value for an off-scale correction.
Calculation from Sun Diameter Measurement
Calculating the index correction from a measurement of the diameter of the Sun is accomplished by following the procedure described in this document. The procedure assumes that the index correction is small enough such that the top measurement is on-scale and the bottom measurement is off-scale. The program briefly describes the measurements that need to be taken:
Values for the Below and Above observations as read on the sextant, in decimal arc minutes (MM.m), can be entered in the input form. Do NOT correct the off scale Below reading by subtracting it from 60 or by entering a negative number, the program will do that for you. Use the positive value directly read off of the instrument.
The order in which the Below and Above values are measured should match the direction in which you align celestial bodies with the horizon during a sight. You can easily see why by performing the procedure in one direction first (e.g. measuring the Below and Above values in that order while raising the reflected view), and then in the opposite direction (e.g. measuring the Above and Below values in that order while lowering the reflected view): you will likely get two very different values of index correction. So if you typically bring the reflected celestial bodies DOWN to the horizon when making a sight, do this procedure by moving the sextant down, i.e. start with the reflected sun above the actual sun and bring it down to read the Above value first, and then down again to read the Below value. If you do it the other way around, i.e. you bring the reflected celestial bodies UP to the horizon, do the procedure from the bottom to the top instead. This is also true if you get your index correction from a sight of the reflected horizon against the horizon.
The program will display the calculated index correction result as well as the implied semi-diameter of the sun, which is then compared with the actual semi-diameter of the sun at the current time. This allows validating the inputs used before applying the calculated index correction to future sights.
If the observed diameter of the Sun is close to the actual value, press the Accept soft key to apply the calculated index correction, or Cancel otherwise. It is recommended to run the procedure a few times to confirm the validity of the index correction. The mean value of several calculations can be entered using the Direct Entry method.
Future Improvements
The ephemeris calculations are usually accurate to within less than 0.1' of the values in the Almanac for the period 1800-2200 (subject to Delta T adjustments), but errors of up to 0.3' are sometimes seen. This is sufficient for most practical cases of celestial navigation but perfect precision would be better. The differences are still being investigated because the same program in Javascript from Henning Umland's web site seems to always output the exact same numbers as the Almanac. The possibility of a discrepancy in the code is one theory but a more likely one is that the lower number of significant digits in the calculator vs. a regular computer introduces rounding errors that add up in the lengthy calculations, but that has yet to be proven.
A test suite is being developed.
Contact
This program was developed by Charles Vaillancourt. I welcome comments and suggestions for improvement and will gladly review pull requests for inclusion into the program. And if you do try it, drop me a note to let me know how the installation and use of the program worked out for you, and if you were able to make a fix!