4.4 Built-in functions and constants
The following built-in functions are available:
sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, asinh, acosh, atanh, exp, ln, log, fabs, fmod, sqrt, int.
The following functions, useful for astronomical computations are defined. The latitude and longitude used for these computations are set in the global system variables LONGITUDE and LATITUDE.
- time(): returns the current time in the hms format.
- lst(): returns the Local Sideral time in the hms format.
- day(): returns the current day.
- month(): returns the current month.
- year(): returns the current year.
- mjd(),fmjd(): returns the current MJD and fractional MJD.
- setlong(MyLongitude): Sets the global variables LONGITUDE
to the given value.
- setlat(MyLatitude): Sets the global variables LATITUDE
to the given value.
4.4.1 Built-in constants
The following useful constants are available:
- PI: The value of PI
- C: The speed of light in meter/second
- R2D: Factor to convert angles in degree to radian
- A2R: Factor to convert angles in arcsecond to radian
- kb: The Boltzmann constant
- PC2M: Factor to convert from Parsec to meter
- PC2LY: Factor to convert from Parsec to Lightyear
- AU2M: Factor to convert from Astronomical Unit to meter
- sigma: [NOT YET USED] Threshold to use for the result of logical operators