|
libnova
v 0.16.0
|
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... | |
| double LIBNOVA_EXPORT | ln_find_max (double(*func)(double, double *), double from, double to, double *arg) |
| Find local maximum of function f() at given interval by Golden Section method. More... | |
| double LIBNOVA_EXPORT | ln_find_zero (double(*func)(double, double *), double from, double to, double *arg) |
| Find zero of function f() at given interval by Newton method. More... | |
Misc functions.
| double ln_find_max | ( | double(*)(double, double *) | f, |
| double | from, | ||
| double | to, | ||
| double * | arg | ||
| ) |
Find local maximum of function f() at given interval by Golden Section method.
| f | Function to find maximum |
| from | Lower bound of search interval |
| to | Upper bound of search interval |
| arg | Pointer to the other parameters of the function f |
Find local maximum of function f() at given interval by Golden Section method.
Referenced by ln_lunar_next_apsis(), and ln_lunar_previous_apsis().
| double ln_find_zero | ( | double(*)(double, double *) | f, |
| double | from, | ||
| double | to, | ||
| double * | arg | ||
| ) |
Find zero of function f() at given interval by Newton method.
| f | Function to find zero (root place) |
| from | Lower bound of search interval |
| to | Upper bound of search interval |
| arg | Pointer to the other parameters of the function f |
Find zero of function f() at given interval by Newton method.
Referenced by ln_lunar_next_node(), ln_lunar_next_phase(), ln_lunar_previous_node(), and ln_lunar_previous_phase().
| double ln_get_dec_location | ( | char * | s | ) |
Obtains Latitude, Longitude, RA or Declination from a string.
| s | Location string |
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 S = -42º30'35.53"
90º0'0,01 N ERROR: +- 90º0'00.00" latitude limit
References ln_hms::minutes, and ln_hms::seconds.
| const char * ln_get_humanr_location | ( | double | location | ) |
Obtains a human readable location in the form: ddºmm'ss.ss"
| location | Location angle in degress |
Obtains a human readable location in the form: ddºmm'ss.ss" String must be freed after use.
| double ln_interpolate3 | ( | double | n, |
| double | y1, | ||
| double | y2, | ||
| double | y3 | ||
| ) |
Calculate an intermediate value of the 3 arguments.
| n | Interpolation factor |
| y1 | Argument 1 |
| y2 | Argument 2 |
| y3 | Argument 3 |
Calculate an intermediate value of the 3 arguments for the given interpolation factor.
| double ln_interpolate5 | ( | double | n, |
| double | y1, | ||
| double | y2, | ||
| double | y3, | ||
| double | y4, | ||
| double | y5 | ||
| ) |
Calculate an intermediate value of the 5 arguments.
| n | Interpolation factor |
| y1 | Argument 1 |
| y2 | Argument 2 |
| y3 | Argument 3 |
| y4 | Argument 4 |
| y5 | Argument 5 |
Calculate an intermediate value of the 5 arguments for the given interpolation factor.