Book contents
- Frontmatter
- Contents
- Preface
- Using your personal computer for astronomy
- DEFAULT: default value input routnine & YESNO: ‘Y’ or ‘N’ input routine
- MINSEC: converts between decimal hours/degrees and minutes/seconds form
- JULDAY: calendar date to Julian day number since 1900 January 0.5
- CALDAY: Julian day number since 1900 January 0.5 to calendar date
- TIME: converts between local civil and sidereal times
- EQHOR: converts between equatorial and horizon coordinates
- HRANG: converts between right ascension and hour angle
- OBLIQ: calculates the value of the obliquity of the ecliptic
- NUTAT: finds corrections for nutation in longitude and obliquity
- EQECL: converts between equatorial and ecliptic coordinates
- EQGAL: converts between equatorial and galactic coordinates
- GENCON: converts between any of the coordinate systems
- PRCESS1: approximate precession of equatorial coordinates & PRCESS2: rigorous precession of equatorial coordinates
- PARALLX: converts between geocentric and apparent position
- REFRACT: calculates the effect of atmospheric refraction
- RISET: finds the circumstances of rising and setting
- ANOMALY: solves Kepler's equation for elliptical motion
- SUN: finds the ecliptic coordinates of the Sun
- SUNRS: finds the circumstances of sunrise and sunset
- PELMENT: returns the orbital elements of the major planets
- PLANS: finds the position of a planet
- MOON: finds the position and parallax of the Moon
- MOONRS: finds the circumstances of moonrise and moonset
- MOONNF: finds the times of new and full moon
- ECLIPSE: finds the circumstances of lunar and solar eclipses
- DISPLAY: displays an eclipse in graphical form
- ELOSC: finds positions from osculating elliptical elements
- RELEM: converts elliptic orbital elements from one epoch to another
- PCOMET: finds the position of a comet from parabolic elements
- PFIT: finds parabolic elements from observations & EFIT: finds elliptical elements from observations
- List of variables
- Bibliography
- Index
- PROGRAMS AVAILABLE ON DISK
HRANG: converts between right ascension and hour angle
Published online by Cambridge University Press: 17 February 2010
- Frontmatter
- Contents
- Preface
- Using your personal computer for astronomy
- DEFAULT: default value input routnine & YESNO: ‘Y’ or ‘N’ input routine
- MINSEC: converts between decimal hours/degrees and minutes/seconds form
- JULDAY: calendar date to Julian day number since 1900 January 0.5
- CALDAY: Julian day number since 1900 January 0.5 to calendar date
- TIME: converts between local civil and sidereal times
- EQHOR: converts between equatorial and horizon coordinates
- HRANG: converts between right ascension and hour angle
- OBLIQ: calculates the value of the obliquity of the ecliptic
- NUTAT: finds corrections for nutation in longitude and obliquity
- EQECL: converts between equatorial and ecliptic coordinates
- EQGAL: converts between equatorial and galactic coordinates
- GENCON: converts between any of the coordinate systems
- PRCESS1: approximate precession of equatorial coordinates & PRCESS2: rigorous precession of equatorial coordinates
- PARALLX: converts between geocentric and apparent position
- REFRACT: calculates the effect of atmospheric refraction
- RISET: finds the circumstances of rising and setting
- ANOMALY: solves Kepler's equation for elliptical motion
- SUN: finds the ecliptic coordinates of the Sun
- SUNRS: finds the circumstances of sunrise and sunset
- PELMENT: returns the orbital elements of the major planets
- PLANS: finds the position of a planet
- MOON: finds the position and parallax of the Moon
- MOONRS: finds the circumstances of moonrise and moonset
- MOONNF: finds the times of new and full moon
- ECLIPSE: finds the circumstances of lunar and solar eclipses
- DISPLAY: displays an eclipse in graphical form
- ELOSC: finds positions from osculating elliptical elements
- RELEM: converts elliptic orbital elements from one epoch to another
- PCOMET: finds the position of a comet from parabolic elements
- PFIT: finds parabolic elements from observations & EFIT: finds elliptical elements from observations
- List of variables
- Bibliography
- Index
- PROGRAMS AVAILABLE ON DISK
Summary
The problem of converting between the hour angle and the right ascension of a celestial object at a given local sidereal time is so straightforward as to make it hardly seem worthwhile devoting a separate subroutine to it. Nevertheless, it crops up sufficiently often that one quickly becomes tired of writing the few lines of code needed every time into a new program, and so I have included the routing HRANG here. The equation is the same for conversion in either direction, there being no need for a switch to specify it. The right ascension or hour angle (hours) is input via the variable X and the corresponding hour angle or right ascension (hours) returned by P. The geographical longitude, GL, must be specified in degrees (W negative) and the Greenwich sidereal time, SG, in hours. The routine also returns the local sidereal time, LS, in hours.
Formulae
P = [LS − X]24
LS = [SG + (GL/15)]24
P = hour angle or right ascension
given
X = right ascension or hour angle
SG = Greenwich sidereal time
GL= geographical longitude
[]24 indicates reduction to the range 0-24 by the addition or subtraction of multiples of 24.
Details of HRANG
Called by GOSUB 1600.
Converts X, the hour angle or right ascension, into P, the corresponding right ascension or hour angle, at SG, the Greenwich sidereal time, all quantities in hours.The geographical longitude, GL, must also be specified in degrees(W negative, E positive). The local sidereal time in hours is returned by LS.
- Type
- Chapter
- Information
- Astronomy with your Personal Computer , pp. 44 - 50Publisher: Cambridge University PressPrint publication year: 1990