libnova  v 0.16.0
rise_set.h
1 /*
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15  *
16  * Copyright (C) 2000 - 2005 Liam Girdwood
17  */
18 
19 #ifndef _LN_RISE_SET_H
20 #define _LN_RISE_SET_H
21 
22 #include <libnova/ln_types.h>
23 
24 #define LN_STAR_STANDART_HORIZON -0.5667
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 
42 int LIBNOVA_EXPORT ln_get_object_rst(double JD, struct ln_lnlat_posn *observer, struct ln_equ_posn *object, struct ln_rst_time *rst);
43 
49 int LIBNOVA_EXPORT ln_get_object_rst_horizon(double JD, struct ln_lnlat_posn *observer,
50  struct ln_equ_posn *object, long double horizon, struct ln_rst_time *rst);
51 
52 int LIBNOVA_EXPORT ln_get_object_rst_horizon_offset(double JD, struct ln_lnlat_posn *observer,
53  struct ln_equ_posn *object, long double horizon, struct ln_rst_time *rst, double ut_offset);
54 
61 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);
62 
68 int LIBNOVA_EXPORT ln_get_object_next_rst_horizon(double JD, struct ln_lnlat_posn *observer, struct ln_equ_posn *object,
69  double horizon, struct ln_rst_time *rst);
70 
75 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);
76 
77 int LIBNOVA_EXPORT ln_get_body_rst_horizon_offset(double JD, struct ln_lnlat_posn *observer, void (*get_equ_body_coords)(double, struct ln_equ_posn *), double horizon, struct ln_rst_time *rst, double ut_offset);
78 
84 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);
85 
91 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);
92 
93 typedef void (*get_motion_body_coords_t)(double, void * orbit, struct ln_equ_posn *);
94 
99 int LIBNOVA_EXPORT ln_get_motion_body_rst_horizon(double JD, struct ln_lnlat_posn *observer, get_motion_body_coords_t get_motion_body_coords, void * orbit, double horizon, struct ln_rst_time *rst);
100 
101 int LIBNOVA_EXPORT ln_get_motion_body_rst_horizon_offset(double JD, struct ln_lnlat_posn *observer, get_motion_body_coords_t get_motion_body_coords, void * orbit, double horizon, struct ln_rst_time *rst, double offset);
102 
108 int LIBNOVA_EXPORT ln_get_motion_body_next_rst_horizon(double JD, struct ln_lnlat_posn *observer, get_motion_body_coords_t get_motion_body_coords, void * orbit, double horizon, struct ln_rst_time *rst);
109 
115 int LIBNOVA_EXPORT ln_get_motion_body_next_rst_horizon_future(double JD, struct ln_lnlat_posn *observer, get_motion_body_coords_t get_motion_body_coords, void * orbit, double horizon, int day_limit, struct ln_rst_time *rst);
116 
117 #ifdef __cplusplus
118 };
119 #endif
120 
121 #endif
ln_lnlat_posn::lng
double lng
Definition: ln_types.h:205
ln_rst_time
Rise, Set and Transit times.
Definition: ln_types.h:314
ln_get_apparent_sidereal_time
double LIBNOVA_EXPORT ln_get_apparent_sidereal_time(double JD)
Calculate apparent sidereal time from date.
Definition: sidereal_time.c:62
ln_rst_time::set
double set
Definition: ln_types.h:316
ln_get_dynamical_time_diff
double ln_get_dynamical_time_diff(double JD)
Calculate approximate dynamical time difference from Julian day in seconds.
Definition: dynamical_time.c:181
ln_rst_time::transit
double transit
Definition: ln_types.h:317
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....
Definition: rise_set.c:265
ln_deg_to_rad
double LIBNOVA_EXPORT ln_deg_to_rad(double degrees)
degrees to radians
Definition: utility.c:93
ln_range_degrees
double LIBNOVA_EXPORT ln_range_degrees(double angle)
puts a large angle in the correct range 0 - 360 degrees
Definition: utility.c:237
ln_get_object_next_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....
Definition: rise_set.c:219
ln_lnlat_posn::lat
double lat
Definition: ln_types.h:206
ln_interpolate3
double LIBNOVA_EXPORT ln_interpolate3(double n, double y1, double y2, double y3)
Calculate an intermediate value of the 3 arguments.
Definition: utility.c:622
ln_get_object_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.
Definition: rise_set.c:63
ln_rad_to_deg
double LIBNOVA_EXPORT ln_rad_to_deg(double radians)
radians to degrees
Definition: utility.c:87
ln_rst_time::rise
double rise
Definition: ln_types.h:315
ln_lnlat_posn
Ecliptical (or celestial) Longitude and Latitude.
Definition: ln_types.h:204
ln_equ_posn
Equatorial Coordinates.
Definition: ln_types.h:176
ln_equ_posn::dec
double dec
Definition: ln_types.h:178
ln_get_body_rst_horizon
int 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.
Definition: rise_set.c:320
ln_get_body_next_rst_horizon_future
int 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,...
Definition: rise_set.c:528
ln_get_body_next_rst_horizon
int 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,...
Definition: rise_set.c:497