Shortcuts
g / G: toggle lat/lon grid
c / C: toggle constellations
l / L: toggle star GP labels
w / W: water opacity +/-
r / R: rotate sky +0.1° / +1°
t / T: rotate sky -0.1° / -1° Reset forms
Observation methodDateTimezoneWatch ErrorIndex ErrorEye HeightPressureTemperatureSpeedBearingDed. ReckoningDed. Reckoning LatitudeDed. Reckoning LongitudeActual PositionActual LatitudeActual LongitudeText input
Dip correction depends on the observation method.
sextant: stanard dip correction
bubble sextant: half of the measured altitude with index error
theodolite: 90° minus zenith angle measurement
cellphone: no dip correction
Index Error will be added to the altitude.
Positive if IE is OFF the arc, negative if IE is ON the arc.
Watch Error will be added to Watch Time.
Positive if watch is behind current time, negative if ahead of current time.
All degree type fields accept decimal values.
The separator between degrees, minutes and seconds can be any non-numeric character.
All degree type fields accept decimal values.
The separator between degrees, minutes and seconds can be any non-numeric character.
All degree type fields accept decimal values.
The separator between degrees, minutes and seconds can be any non-numeric character.
If the actual position of the
observer is known, then the distance between it and the location fix will be calculated as the last step.
Celestial bodies
NameLocal TimeSextant Altitude
Add sight to the list
Celestial bodyAltitudeTimeText inputCalculate location fix
All degree type field accepts decimal values.
The separator between degrees, minutes and seconds can be any non-numeric character.
Enter 24 in the hours field if an observartion falls on the start of the next day. The date will be adjusted in calculations.
The separator between hours, minutes and seconds can be any non-numeric character.
Clear ExamplesGrammarCalculate location fixSave input as textSave worksheet as CSVView on Google Maps
observation
optional
date
height
zone
tzone
zoffset
method
index_error
watch_error
refraction
temperature
pressure
compare
ded_reckoning
heading
speed
sights
sight
star
time
angle
latlon
latitude
longitude
lat
lon
deg360
deg180
deg90
hhmmss
decdeg360
decdeg180
decdeg90
hour
decminsec
utc
methodtype
length_unit
obsheight
we
ie
temp_unit
press_unit
dr
bearing
speed_unit
alt
object
dist_unit
word
float
int
num
sep
dsep
break
comment
nl
_
It is July 18, 1982 and you find yourself lost at sea.
You only know you are within 1200 miles of Hawaii.
Your boat is traveling on a heading of 252° at 6.9 knots.
Your watch's zone description is GMT-7 (UTC = WT + 7).
The index error and watch error are both zero.
You take sextant readings of 2 stars from an eye height of 9 feet: StarSextant readingTimeVega47° 22.5'22 : 37 : 30Alkaid59° 14.0'22 : 40 : 14Challenge: Find your position as accurately as you can!
Legal Disclaimer
The text reproduced here is historic in nature, and does not constitute a challenge, contest, or wager of any sort. It is quoted for historical value and context, and no claims for the funds will be entertained.
A link for the original challenge can be found below.
Use the elevation angles to three separate stars to determine the observer’s position on the earth.
Any method relying on the star’s angular measurements may be used.
Calculations presuming the earth is a globe, flat, or velociraptor shaped may be used.
Observation method: cellphone
Date: 2022-03-28
Eye Height: average 1248.666 feet StarSextant readingTimeArcturus45.7°00 : 22 : 33Polaris45.6°00 : 21 : 45Procyon25.2°00 : 19 : 51Challenge: The position of the observer must be determined to be within 25 statute miles.
The location can be in latitude/longitude or identify the closest town with a population of at least 300. Please note, this challange was solved 4 minutes after it was issued.
Actual Location: 46° 38' 36.4" N, 93° 22' 31.6" W Legal Disclaimer
The text reproduced here is historic in nature, and does not constitute a challenge, contest, or wager of any sort. It is quoted for historical value and context, and no claims for the funds will be entertained.
A link for the original challenge can be found below.
Preface:
Version 2 – 2022-03-24
Celestial navigation has long been used to obtain one’s position on the earth. Navigators have used celestial navigation for centuries. The foundations of celestial navigation are based on knowing specific information about the earth, a rotating globe, and the stars in the celestial sphere around the globe. Celestial navigation uses measuring devices to obtain the angular differences between features on the earth, stars, planets, the sun, or the moon. A common measuring instrument is a Sextant. Using a sextant is so common that the term “using a sextant” is somewhat synonymous with celestial navigation.
Flat earthers (see definition below) often claim that “a sextant can only work on a flat plane” and other variations of this claim. This implies that all usages of sextants to perform celestial navigation have never worked using mathematics applied presuming the earth to be a globe and that celestial navigation can only work using mathematics applied presuming flat earth (as defined below).
Definitions:
Flat earth: the idea that the earth as a whole, excluding topography, is generally a flat plane. This includes these ideas: the earth is an infinite plane, all horizontals are parallel, the surface of undisturbed water is flat, and other ideas that have similar implications.
Flat plane: see definition for “flat earth”.
Flat earther: a person that posits Flat Earth idea as defined above.
Challenge:
Using only mathematics applied presuming flat earth (as defined above), use the elevation angles to three separate stars to determine the observer’s position on the earth. Twice.
In the event that the method accurately identifies the position of the first observer within the acceptance parameters, a second set of elevation angles to three separate stars will be published and the submitter shall use the exact same celestial navigation method to determine the location of the second observer. This will be submitted using the same submission method as the first measurement.
If a different celestial navigation method is used for the second elevation angles to three separate stars, the submission will be invalidated.
Acceptance parameters:
The position of the observer must be determined to be within 25 statute miles for both sets of elevation angles to three separate stars. The location can be in latitude/longitude, street address, or a relative distance and bearing to a landmark.
The exact method used to determine the position must be included in the submission. All details used must be provided so that a third party can perform the same steps to get the position. This method will be tested independently of the submitter’s answer to verify the same answer is obtained. If a different answer is obtained, the submission will be invalidated. If the method is not sufficiently described to perform calculations, the submission will be invalidated.
The method must use only mathematics and data that presumes flat earth (as defined above). Any methods or information presuming the earth to be a globe, or derived from a globe, invalidates the submission. This includes maps, sight reduction tables, dip charts, refraction charts, and calculations of distances over the surface of the earth.
One exemption is allowed which differs from version 1 of this challenge. Even though the star charts place the stars in a concentric sphere around the spherical earth, existing star charts as published in nautical almanacs may be used for the challenge. The specific method used to transform this spherical data to a flat earth (as defined above) plane must be described in detail sufficient to be applied independently during the validation of a submission.
The method must include derivations or citations to the derivations of any numerical constants used in any formulas or calculations.
The method must only use the known and documented behavior of light propagation. Unexplained or arbitrary treatment in the path of light taken from the star to the observer will disqualify a submission.
Submission method:
Any combination of the following methods are acceptable:
-YouTube Video
-Web page hosted on your server
-Email submissions to mctoon@mctoon.net, entries submitted this way will be posted in their entirety on mctoon.net website or via video on MCToon’s YouTube channel.
-Posting on a publicly accessible place on the internet
If there are multiple published submissions, the submitter must identify a single method as the authoritative method. The authoritative method shall be the only method evaluated when judging the challenge.
Submission communication method:
A notification of the submission must be sent via email to mctoon@mctoon.net. A confirmation of receipt via email will be sent back to the submitter. The submission is not complete until a confirmation of receipt has been received via email to the submitter.
Prize: $0, ZERO DOLLARS from me, go and email your solution to MCToon.
Observation date: November 15, 2018
Instrument used: sextant
Method: angle between star and horizon
Eye Height: 2 meters
Index Error: +0.3′
True Bearing: 0°
Speed: 12 knots
Temperature: 12°C
Barometric Pressure: 975 millibars
Watch's Timezone: GMT+0
StarSextant readingTimeRegulus70° 48.7'8 : 28 : 15Arcturus27° 9.0'8 : 30 : 30Dubhe55° 18.4'8 : 32 : 15
You've secured work on a ship, and in your application you wrote that you're skilled in celestial navigation.
You've been at sea for a while and there has been a storm for a few days.
The electronics were damaged in the storm and the ship's location is unknown.
The captain remembered your application so he's handed you a sextant and asked you to get their position.
Nothing matters other than getting the accurate fix. Lifes are on the line.
Get it wrong, get lost at sea and you die.
Date: Thu, 14 Jul 2022 GMT+0
Eye height: 32 meter
Index error: 2' StarSextant readingTimeAchernar63° 17.1'05 : 48 : 12Betelgeuse22° 5.0'05 : 30 : 42Canopus38° 56.0'05 : 31 : 48Challenge: Find your position as accurately as you can!
Actual location: -31.154076, 15.503133
You've secured work on a ship, and in your application you wrote that you're skilled in celestial navigation.
You've been at sea for a while and there has been a storm for a few days.
The electronics were damaged in the storm and the ship's location is unknown.
The captain remembered your application so he's handed you a sextant and asked you to get their position.
Nothing matters other than getting the accurate fix. Lifes are on the line.
Get it wrong, get lost at sea and you die.
Date: Wed, 13 Jul 2022 GMT+0
Eye height: 32 meter
Index error: 2′ StarSextant readingTimeAtria16° 2.1'11 : 40 : 33Canopus40° 8.4'11 : 23 : 03Rigel39° 18.0′11 : 24 : 09Challenge: Find your position as accurately as you can!
Actual location: -32.965812, -71.665188
Date: 2003-03-17
Timezone: GMT+3
Observer Height: 9 feet
Heading: 327°
Speed: 13.6 knots
Index Error: -2' StarSextant readingTimeRegulus33° 58.2'19 : 08 : 15Capella63° 45.0'19 : 14 : 41Aldebaran63° 53.5'19 : 16 : 31Challenge: Find your position as accurately as you can!
Date: 2022-10-01
Timezone: GMT+0
Eye height: 9 feet
Index error: 0' StarSextant readingTimeSchedar39° 36.2'0:33:24Altair55° 33.8'0:34:49Saturn24° 7'0:32:02Challenge: Find your position as accurately as you can!
Actual location: 42° 46.9' N, 87° 45.5' W
Hawaii by sextant
Date: 1982-07-16
Timezone: GMT-7
Ded. reckoning lat: 28° 33' N
Ded. reckoning lon: 142° 41' W
Heading: 245°
Speed: 7.7 knots
Index error: 0'
Watch error: 0 sec
Eye height: 9 feet
Temperature: 10 °C
Pressure: 1010 mbar StarSextant readingTimeDeneb47° 23'6 : 55 : 50Venus15° 56'6 : 58 : 30Moon LL42° 6.8'7 : 14 : 25Challenge: Find your position as accurately as you can!
Actual location: 28° 32' N, 142° 39.6' W
Shoebill's measurements
Date: November 17th, 2023
Timezone: GMT+0
Heading: 0°
Speed: 0 knots
Index error: 0'
Watch error: 0 sec
Eye height: 9 feet
Temperature: 10 °C
Pressure: 1010 mbar StarSextant readingTimeRigel13°0.1'2 : 20 : 42.4Vega15° 33.9'2 : 56 : 18.6Fomalhaut12°59'2 : 52 : 20.7Challenge: Find your position as accurately as you can!
Actual location: 39° 42' 41.103334" N, 77° 44' 27.12836" W
watch on YouTubeGet location fixOriginal challengewatch on YouTubeGet location fixOriginal challengewatch on YouTubeGet location fixOriginal challengewatch on YouTubeGet location fixOriginal challengewatch on YouTubeGet location fixwatch on YouTubeGet location fixwatch on YouTubeGet location fixDavid Burch Navigation BlogGet location fixGet location fix
These are the equations used in this software. The list goes through the calculation steps, and explains how certain values should be entered in the input fields.
Sight reductionHs: sextant altitude
The input field for this value is divided into degrees, arc minutes and arc seconds, but also accepts decimal values for every field.
Any non-numeric character can be used as separator. For example the string entered as 45d 12.3m will be reformatted to 45° 12.3' 00", and it will be converted to decimal degrees internally. IE: Index error OFF the arc
The value entered will be added to the sextant altitude. If the error is ON the arc, a negative value should be entered. r: radius of Earth in meters h: observer height in meters p: pressure in millibar T: temperature in Celsius Dip: dip correction
The method of measurement should also be selected, since it effects dip correction.
Measurements taken with a sextant will be corrected for horizon dip.
Measurements taken with an artificial horizon will be divided by 2 and no dip correction will be applied.
Measurements taken with a cellphone will not be corrected for dip since the cellphone measures the angle against the tangential plane to the local gravity vector.
Measurements taken with a theodolite will not be corrected for dip, but because surveyors measure angles from the zenith, the measured angle will be subtracted from 90°.
Ha: apparent altitude
for horizon measurements:
for artificial horizon measurements:
f: Refraction coefficient
R0: standard refraction at 1010 mbar and 10 °C
R: refraction
Hr: altitude corrected for refraction
SD: semidiameter (added for lower limb sights and subtracted for upper limb sights) Hd: altitude corrected for semidiameter
HP: parallax coefficient for Mars, Venus, Moon or Sun P: parallax
Ho: observed (true) altitude
Date and timeD: date in local time zone WT: watch time in local time zone z: time zone difference in hours
Eastern timezones are represented as GMT+z, the z value will be subtracted
Western timezones are represented as GMT-z, the z value will be added
If observations are taken around midnight, 24 can be entered in the hours field if an observation falls on the start of the next day. The UTC date will be automatically corrected internally. WE: watch error in seconds
positive if watch is behind current time
negative if watch is ahead current time UT: date and time in UTC timezone (a.k.a. GMT+0)
Geographic positionsGHAH: Greenwich hour angle of the observed body at the whole hour GHAAries: Greenwich hour angle of the celestial meridian at the whole hour GHAi: increment of GHA for the minutes and seconds of observation, depends on the ovserved body SHA: Sidereal hour angle of a star (not applicable for the Sun, Moon and planets) v: coefficient for velocity from the daily pages v correction: “The change in hour angle arising from velocity of the body at the time of the sight observation is accounted
for with the v correction.” Source- Bowditch 2017, Chapter 19- Sight Reduction p. 313. The planet’s v is positive
unless preceeded by a minus sign which is sometimes the case with Venus. The sign of the Moon’s v is positive.
The correction values are calculated with the following formula:
corrected GHA for the Sun:
corrected GHA for the Moon and planets:
corrected GHA for the stars: DEC: Declination measured from the celestial equator d: coefficient for declination from the daily pages (not applicable for stars) d correction: “The change in declination of the body at the time of the sight observation is accounted for with the d
correction.” Source- Bowditch 2017, Chapter 19- Sight Reduction p. 313. The sign of the Moon or planet’s d
correction is determined by the declination trend- positive if successive declination values increase and negative if they decrease.
The correction values are calculated with the following formula: DECcorrected:
GP: Geographic position on Earth where the observed body is directly at the zenith
Declination corresponds to latitude on Earth.
GHA corresponds to longitude, but GHA is measured from the celestial meridian (Constellation of Aries) towards west in the [0°, 360°] interval, while
latitude is measured from the Greenwich meridian towards East, in the [-180°, 180°] interval. Location fix
Once the geographic position of a celestial body and the altitude angle is calculated, circles of equal altitude can be drawn on the surface of the Earth.
These circles are the locations from where each observer sees a certain celestial body at the same angle.
For each pair of circles, the coordinates of the intersection point are determined, using A. González's method.
The GP vectors are projected to a unit sphere, and the spherical coordinates are converted to cartesian coordinates.
This same formula can be use to convert celestial coordinates too, with the substitution of lat = declination and lon = -GHA.
The cosine of the angle between two GP vectors can be computed with the dot product, utilising the fact that the vectors are both one unit long.
A trigonometric identity gives the squared sine of the angle, which will be used in later formulas.
The central point of the intersection of two circles can be calculated with the following formula:
The cross product of the two GP vectors gives a direction pointing towards one of the intersection points. This will be scaled down to unit length in the last formula.
Using the direction vector and its inverse, the two intersection points can be obtained.
Next, for each pair of intersection points, their distance is computed using the Haversine formula.
The "crooked hat" is formed with the three points that are closest to eachother, within the distance of the ded. reckoning position.
The average of these three points gives the approximate location fix. This is a rather imprecise approximation, so don't rely on this, or don't get surprised when you're lost at sea and sharks bite your arse off. Special thanks to the following individuals:
MCToon - for creating the celestial navigation challenges
FTFE and Roohif - for demonstrating how it works on a globe
Bacon for giving inspiration by winning the $100 challenge with his own navigation software
Tiny Captain and Proto Thad - for giving me advice on celestial navigation
All the Flerfs who aggravated me so I started to write this software
GitHub RepoLibraries used in this softwareskyfieldSFalmanac-Py3pyscriptopencpn - vector2cop pluginTHREE.jskor-uilitkatexnearley.js
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; INJURY OR LOSS OF LIFE;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
"splashscreen": { "autoclose": false },
"fetch": [{
"from": "almanac",
"to_folder": "almanac",
"files": [
"Hipparcos.csv",
"finals2000A.all",
"de421.bsp",
"almanac.py"
]
}],
"packages": [
"certifi==2022.12.7",
"numpy==1.24.2",
"./pyscript/sgp4-2.21-py3-none-any.whl",
"./pyscript/jplephem-2.18-py3-none-any.whl",
"./pyscript/skyfield-1.45-py3-none-any.whl"
]
}
from pathlib import Path
Path('almanac/__init__.py').touch()
from pyodide.ffi import create_proxy, to_js
from js import window, console, Object
from almanac.almanac import *
if not window.hasOwnProperty('main'):
console.error('Function "window.main" does not exist!')
else:
alma = to_js({
"utc_date" : create_proxy(lambda day, time, zone: to_js(utc_date(day.y, day.m, day.d, time.h, time.m, time.s, zone), dict_converter=Object.fromEntries)),
"vd_corr" : create_proxy(lambda m, vd: to_js(vd_corr(m, vd))),
"gha_increment" : create_proxy(lambda body, min, sec: to_js(gha_increment(body, min, sec))),
"planets" : create_proxy(lambda: to_js(planets())),
"sunmoon" : create_proxy(lambda: to_js(sunmoon())),
"stars" : create_proxy(lambda: to_js(stars())),
"almanac_page" : create_proxy(lambda y, m, d: to_js(almanac(y, m, d), dict_converter=Object.fromEntries)),
"parallax" : create_proxy(lambda hp, altitude: to_js(parallax(hp, altitude))),
"sun_lat" : create_proxy(lambda date: to_js(sun_lat(date), dict_converter=Object.fromEntries)),
"sunpath" : create_proxy(lambda date, minutes, latitude, longitude, elevation_m, temperature_C, pressure_mbar: to_js(sunpath(date, minutes, latitude, longitude, elevation_m, temperature_C, pressure_mbar), dict_converter=Object.fromEntries)),
"solarnoon" : create_proxy(lambda lat, lon, y, m, d: to_js(solarnoon(lat, lon, y, m, d), dict_converter=Object.fromEntries)),
}, dict_converter=Object.fromEntries)
window.setTimeout(create_proxy(lambda: window.main(alma)), 0)
pass