libnova  v 0.16.0
Functions
Rise, Set, Transit

Functions

int LIBNOVA_EXPORT ln_get_object_rst (double JD, struct ln_lnlat_posn *observer, struct ln_equ_posn *object, struct ln_rst_time *rst)
 Calculate the time of rise, set and transit for an object not orbiting the Sun. More...
 
int LIBNOVA_EXPORT ln_get_object_next_rst (double JD, struct ln_lnlat_posn *observer, struct ln_equ_posn *object, struct ln_rst_time *rst)
 Calculate the time of next rise, set and transit for an object not orbiting the Sun. E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range. This function is not too precise, it's good to get general idea when object will rise. More...
 
int LIBNOVA_EXPORT ln_get_object_next_rst_horizon (double JD, struct ln_lnlat_posn *observer, struct ln_equ_posn *object, double horizon, struct ln_rst_time *rst)
 Calculate the time of next rise, set and transit for an object not orbiting the Sun. E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range. More...
 
int LIBNOVA_EXPORT ln_get_body_rst_horizon (double JD, struct ln_lnlat_posn *observer, void(*get_equ_body_coords)(double, struct ln_equ_posn *), double horizon, struct ln_rst_time *rst)
 Calculate the time of rise, set and transit for an object a body, usually Sun, a planet or Moon. More...
 
int LIBNOVA_EXPORT ln_get_body_next_rst_horizon (double JD, struct ln_lnlat_posn *observer, void(*get_equ_body_coords)(double, struct ln_equ_posn *), double horizon, struct ln_rst_time *rst)
 Calculate the time of next rise, set and transit for an object a body, usually Sun, a planet or Moon. E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range. More...
 
int LIBNOVA_EXPORT ln_get_body_next_rst_horizon_future (double JD, struct ln_lnlat_posn *observer, void(*get_equ_body_coords)(double, struct ln_equ_posn *), double horizon, int day_limit, struct ln_rst_time *rst)
 Calculate the time of next rise, set and transit for an object a body, usually Sun, a planet or Moon. E.g. it's sure, that rise, set and transit will be in <JD, JD+day_limit> range. More...
 

Detailed Description

Functions relating to an objects rise, set and transit

All angles are expressed in degrees.

Function Documentation

int ln_get_body_next_rst_horizon ( double  JD,
struct ln_lnlat_posn observer,
void(*)(double, struct ln_equ_posn *)  get_equ_body_coords,
double  horizon,
struct ln_rst_time rst 
)

Calculate the time of next rise, set and transit for an object a body, usually Sun, a planet or Moon. E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range.

Parameters
JDJulian day
observerObservers position
get_motion_body_coordsPointer to ln_get_ell_body_equ_coords. ln_get_para_body_equ_coords or ln_get_hyp_body_equ_coords function
horizonHorizon, see LN_XXX_HORIZON constants
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time of next rise, set and transit (crosses the local meridian at upper culmination) time of the body for the given Julian day and given horizon.

This function guarantee, that rise, set and transit will be in <JD, JD+1> range.

Note 1: this functions returns 1 if the body is circumpolar, that is it remains the whole day either above or below the horizon.

References ln_get_body_next_rst_horizon_future().

int ln_get_body_next_rst_horizon_future ( double  JD,
struct ln_lnlat_posn observer,
void(*)(double, struct ln_equ_posn *)  get_equ_body_coords,
double  horizon,
int  day_limit,
struct ln_rst_time rst 
)

Calculate the time of next rise, set and transit for an object a body, usually Sun, a planet or Moon. E.g. it's sure, that rise, set and transit will be in <JD, JD+day_limit> range.

Parameters
JDJulian day
observerObservers position
get_equ_body_coordsPointer to get_equ_body_coords() function
horizonHorizon, see LN_XXX_HORIZON constants
day_limitMaximal number of days that will be searched for next rise and set
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time of next rise, set and transit (crosses the local meridian at upper culmination) time of the body for the given Julian day and given horizon.

This function guarantee, that rise, set and transit will be in <JD, JD + day_limit> range.

Note 1: this functions returns 1 if the body is circumpolar, that is it remains the whole day either above or below the horizon.

Note 2: This function will not work for body, which ra changes more than 180 deg in one day (get_equ_body_coords changes so much). But you should't use that function for any body which moves to fast..use some special function for such things.

References ln_rst_time::rise, ln_rst_time::set, and ln_rst_time::transit.

Referenced by ln_get_body_next_rst_horizon().

int ln_get_body_rst_horizon ( double  JD,
struct ln_lnlat_posn observer,
void(*)(double, struct ln_equ_posn *)  get_equ_body_coords,
double  horizon,
struct ln_rst_time rst 
)

Calculate the time of rise, set and transit for an object a body, usually Sun, a planet or Moon.

Parameters
JDJulian day
observerObservers position
get_equ_body_coordsPointer to get_equ_body_coords() function
horizonHorizon, see LN_XXX_HORIZON constants
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time the rise, set and transit (crosses the local meridian at upper culmination) time of the body for the given Julian day and given horizon.

Note 1: this functions returns 1 if the object is circumpolar, that is it remains the whole day above the horizon. Returns -1 when it remains whole day bellow the horizon.

Note 2: this function will not work for body, which ra changes more then 180 deg in one day (get_equ_body_coords changes so much). But you should't use that function for any body which moves to fast..use some special function for such things.

Parameters
JDJulian day
observerObservers position
get_motion_body_coordsPointer to ln_get_ell_body_equ_coords. ln_get_para_body_equ_coords or ln_get_hyp_body_equ_coords function
horizonHorizon, see LN_XXX_HORIZON constants
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time the rise, set and transit (crosses the local meridian at upper culmination) time of the body for the given Julian day and given horizon.

Note 1: this functions returns 1 if the body is circumpolar, that is it remains the whole day either above or below the horizon.

Referenced by ln_get_jupiter_rst(), ln_get_lunar_rst(), ln_get_mars_rst(), ln_get_mercury_rst(), ln_get_neptune_rst(), ln_get_pluto_rst(), ln_get_saturn_rst(), ln_get_solar_rst_horizon(), ln_get_uranus_rst(), and ln_get_venus_rst().

int ln_get_object_next_rst ( double  JD,
struct ln_lnlat_posn observer,
struct ln_equ_posn object,
struct ln_rst_time rst 
)

Calculate the time of next rise, set and transit for an object not orbiting the Sun. E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range. This function is not too precise, it's good to get general idea when object will rise.

Parameters
JDJulian day
observerObservers position
objectObject position
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time of next rise, set and transit (crosses the local meridian at upper culmination) time of the object for the given Julian day and horizon.

This function guarantee, that rise, set and transit will be in <JD, JD+1> range.

Note: this functions returns 1 if the object is circumpolar, that is it remains the whole day above the horizon. Returns -1 when it remains whole day bellow the horizon.

References ln_get_object_next_rst_horizon().

int ln_get_object_next_rst_horizon ( double  JD,
struct ln_lnlat_posn observer,
struct ln_equ_posn object,
double  horizon,
struct ln_rst_time rst 
)

Calculate the time of next rise, set and transit for an object not orbiting the Sun. E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range.

Parameters
JDJulian day
observerObservers position
objectObject position
horizonHorizon height
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time of next rise, set and transit (crosses the local meridian at upper culmination) time of the object for the given Julian day and horizon.

This function guarantee, that rise, set and transit will be in <JD, JD+1> range.

Note: this functions returns 1 if the object is circumpolar, that is it remains the whole day above the horizon. Returns -1 when it remains whole day bellow the horizon.

References ln_rst_time::rise, ln_rst_time::set, and ln_rst_time::transit.

Referenced by ln_get_object_next_rst().

int ln_get_object_rst ( double  JD,
struct ln_lnlat_posn observer,
struct ln_equ_posn object,
struct ln_rst_time rst 
)

Calculate the time of rise, set and transit for an object not orbiting the Sun.

Parameters
JDJulian day
observerObservers position
objectObject position
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, 1 for circumpolar (above the horizon), -1 for circumpolar (bellow the horizon)

Calculate the time the rise, set and transit (crosses the local meridian at upper culmination) time of the object for the given Julian day.

Note: this functions returns 1 if the object is circumpolar, that is it remains the whole day above the horizon. Returns -1 when it remains the whole day bellow the horizon.