Notes on Celestial Navigation

CNLHA - Calculate Local Hour Angle (LHA)

Description: Determine the LHA of a celestial object from its GHA and the observer's DR longitude.

Inputs:

GHAGHA of the celestial object
LonLongitude of the observer

Outputs:

LHALHA of the celestial object from the observer's meridian

Sample execution:

GHA? 41,16.2
Lon? -5,06.3

LHA: 36° 09.9'

(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/.


# CNLHA - Calculate LHA

from math import *
from CN_LIB import *

gha = stod("GHA? ")
lon = stod("Lon? ")

lha = (gha+lon+360)%360

print("")
print("LHA: "+dtos(lha))