Notes on Celestial Navigation

CNPOLE - Calculate Latitude from Pole Star (Polaris)

Description: Calculates the observer's latitude from the Pole Star using the Almanac equation.

Inputs:

GHA AriesGHA of the first point of Aries
SHA PolarisSHA of Polaris on the date of observation
Dec PolarisDeclination of Polaris on the date of observation
DR LatDR Latitude of the observer
DR LonDR Longitude of the observer
HHeight of Polaris measured by sextant

Outputs:

LatCalculated Latitude of the observer
Lat (Almanac)Calculated Latitude of the observer using Almanac formula

Sample execution:

GHA Aries? 118,49.2
SHA Polaris? 315,10.6
Dec Polaris? 89,21.8
DR Lat? 49,41
DR Lon? -6,17
H? 50,04.3

Lat: 49° 49.8'
Lat (Almanac): 49° 50.0'

(For explanation of notation, conventions etc, see python-programs).



Copyright (C) 2024 Ian Staniforth

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.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.


# CNPOLE - Calculate latitude from Pole Star

from math import *
from CN_LIB import *

gharies = stod("GHA Aries? ")
sha = stod("SHA Polaris? ")
dec = stod("Dec Polaris? ")

lat = stod("DR Lat? ")
lon = stod("DR Lon? ")
h = stod("H? ")

gha = (gharies+sha)%360
lha = (gha+lon+360)%360
p = (90-dec)

# First approximation

x = p*Cos(lha)

print("")
print("Lat: "+dtos(h-x))

# Second order approximation using Almanac formula

x = p*Cos(lha)-0.5*p*Sin(p)*Sin(lha)*Sin(lha)*Tan(lat)

print("Lat (Almanac): "+dtos(h-x))