libnova  v 0.15.0
Functions
Misc. Functions

Functions

double LIBNOVA_EXPORT ln_get_dec_location (char *s)
 Obtains Latitude, Longitude, RA or Declination from a string.
More...
 
const char LIBNOVA_EXPORT * ln_get_humanr_location (double location)
 Obtains a human readable location in the form: ddºmm'ss.ss"
More...
 
double LIBNOVA_EXPORT ln_interpolate3 (double n, double y1, double y2, double y3)
 Calculate an intermediate value of the 3 arguments. More...
 
double LIBNOVA_EXPORT ln_interpolate5 (double n, double y1, double y2, double y3, double y4, double y5)
 Calculate an intermediate value of the 5 arguments. More...
 

Detailed Description

Misc functions.

Function Documentation

◆ ln_get_dec_location()

double ln_get_dec_location ( char *  s)

Obtains Latitude, Longitude, RA or Declination from a string.

Parameters
sLocation string
Returns
angle in degrees

Obtains Latitude, Longitude, RA or Declination from a string.

If the last char is N/S doesn't accept more than 90 degrees.
If it is E/W doesn't accept more than 180 degrees.
If they are hours don't accept more than 24:00
Any position can be expressed as follows:
(please use a 8 bits charset if you want
to view the degrees separator char '0xba')
42.30.35,53
90º0'0,01 W
42º30'35.53 N
42º30'35.53S
42º30'N
- 42.30.35.53
42:30:35.53 S
+ 42.30.35.53
+42º30 35,53
23h36'45,0

42:30:35.53 S = -42º30'35.53"
+ 42 30.35.53 S the same previous position, the plus (+) sign is
considered like an error, the last 'S' has precedence over the sign
90º0'0,01 N ERROR: +- 90º0'00.00" latitude limit

References ln_hms::minutes, and ln_hms::seconds.

◆ ln_get_humanr_location()

const char * ln_get_humanr_location ( double  location)

Obtains a human readable location in the form: ddºmm'ss.ss"

Parameters
locationLocation angle in degress
Returns
Angle string

Obtains a human readable location in the form: ddºmm'ss.ss"

◆ ln_interpolate3()

double ln_interpolate3 ( double  n,
double  y1,
double  y2,
double  y3 
)

Calculate an intermediate value of the 3 arguments.

Returns
interpolation value
Parameters
nInterpolation factor
y1Argument 1
y2Argument 2
y3Argument 3

Calculate an intermediate value of the 3 arguments for the given interpolation factor.

Referenced by ln_get_body_rst_horizon().

◆ ln_interpolate5()

double ln_interpolate5 ( double  n,
double  y1,
double  y2,
double  y3,
double  y4,
double  y5 
)

Calculate an intermediate value of the 5 arguments.

Returns
interpolation value
Parameters
nInterpolation factor
y1Argument 1
y2Argument 2
y3Argument 3
y4Argument 4
y5Argument 5

Calculate an intermediate value of the 5 arguments for the given interpolation factor.