libTheSky
Routines to compute sky positions of Sun, Moon, planets and more
All Namespaces Files Functions Variables Pages
thesky_functions Module Reference

Assorted procedures. More...

Functions/Subroutines

subroutine set_thesky_location (lat0, lon0, height, tz0, dsttp)
 Set a location, using the variables in TheSky_local.
 
integer function const_id (jd, ra, dec)
 Identify the constellation a,d lies in.
 
real(double) function plsep (jd0, p1, p2)
 Calculates the angular separation between two planets.
 
real(double) function plpa (jd0, p1, p2)
 Calculates the position angle of planet 2 with respect to planet 1, COUNTERCLOCKWISE from the north.
 
subroutine conabr2conid (myconabr, myconid)
 Convert a three-letter constellation abbreviation to a constellation ID number.
 
character function, dimension(99) fillfloat (x, tot, dgt)
 Print a floating-point number with leading zeros in format (0...0)Ftot.dgt to a string.
 
character function, dimension(11) ds (d)
 Print planet distance in AU as a nice string, but use km for the Moon.
 
character function, dimension(9) ds1 (d)
 Print planet distance in AU as a nice string, but use km for the Moon - smaller string.
 

Detailed Description

Assorted procedures.

Function/Subroutine Documentation

◆ conabr2conid()

subroutine thesky_functions::conabr2conid ( character, dimension(*), intent(in) myconabr,
integer, intent(out) myconid )

Convert a three-letter constellation abbreviation to a constellation ID number.

Parameters
myconabrConstellation abbreviation (e.g. And)
myconidConstellation ID number (output)

Definition at line 227 of file functions.f90.

References thesky_stardata::conabr, and thesky_stardata::nconstel.

◆ const_id()

integer function thesky_functions::const_id ( real(double), intent(in) jd,
real(double), intent(in) ra,
real(double), intent(in) dec )

Identify the constellation a,d lies in.

Parameters
jdEquinox in JD
raRA in radians
decDec in radians
Return values
const_idThe constellation ID

Definition at line 83 of file functions.f90.

References thesky_stardata::conid, thesky_stardata::coniddecl, thesky_stardata::conidral, thesky_stardata::conidrau, const_id(), and thesky_coordinates::precess_eq().

Referenced by const_id().

Here is the call graph for this function:

◆ ds()

character function, dimension(11) thesky_functions::ds ( real(double), intent(in) d)

Print planet distance in AU as a nice string, but use km for the Moon.

Parameters
dDistance (AU)
Return values
dsString containing the formatted distance in AU

Definition at line 285 of file functions.f90.

References ds().

Referenced by ds().

Here is the call graph for this function:

◆ ds1()

character function, dimension(9) thesky_functions::ds1 ( real(double), intent(in) d)

Print planet distance in AU as a nice string, but use km for the Moon - smaller string.

Parameters
dDistance (AU)
Return values
ds1String containing the formatted distance in AU

Definition at line 306 of file functions.f90.

References ds1().

Referenced by ds1().

Here is the call graph for this function:

◆ fillfloat()

character function, dimension(99) thesky_functions::fillfloat ( real(double), intent(in) x,
integer, intent(in) tot,
integer, intent(in) dgt )

Print a floating-point number with leading zeros in format (0...0)Ftot.dgt to a string.

Parameters
xNumber to be printed
totTotal length of printed number - Ftot.dgt
dgtNumber of decimal digits - Ftot.dgt
Return values
fillfloatString containing the float with leading zeros.

Definition at line 257 of file functions.f90.

References fillfloat().

Referenced by fillfloat().

Here is the call graph for this function:

◆ plpa()

real(double) function thesky_functions::plpa ( real(double), intent(in) jd0,
integer, intent(in) p1,
integer, intent(in) p2 )

Calculates the position angle of planet 2 with respect to planet 1, COUNTERCLOCKWISE from the north.

Parameters
jd0Julian day for calculation
p1ID of planet 1
p2ID of planet 2
Return values
plpaThe position angle of planet 2 with respect to planet 1, COUNTERCLOCKWISE from the north (rad)
Note
Uses calpa()

Definition at line 192 of file functions.f90.

References thesky_planets::planet_position(), thesky_planetdata::planpos, and plpa().

Referenced by plpa().

Here is the call graph for this function:

◆ plsep()

real(double) function thesky_functions::plsep ( real(double), intent(in) jd0,
integer, intent(in) p1,
integer, intent(in) p2 )

Calculates the angular separation between two planets.

Parameters
jd0Julian day for calculation
p1ID of planet 1
p2ID of planet 2
Return values
plsepThe angular separation between the two planets (rad)
Note
Uses asep()

Definition at line 152 of file functions.f90.

References thesky_planets::planet_position(), thesky_planetdata::planpos, and plsep().

Referenced by plsep().

Here is the call graph for this function:

◆ set_thesky_location()

subroutine thesky_functions::set_thesky_location ( real(double), intent(in) lat0,
real(double), intent(in) lon0,
real(double), intent(in) height,
real(double), intent(in) tz0,
integer, intent(in) dsttp )

Set a location, using the variables in TheSky_local.

Parameters
lat0Latitude (radians, >0 is northern hemisphere)
lon0Longitude (radians, >0 is east of Greenwich)
heightAltitude/elevation above sealevel, in metres
tz0Default timezone (standard time, no DST, >0 is east of Greenwich)
dsttpDST type: 0-none, 1-EU, 2-USA

Definition at line 53 of file functions.f90.

References thesky_local::dsttp, thesky_local::height, thesky_local::lat0, thesky_local::lon0, thesky_local::tz, and thesky_local::tz0.