libnova  v 0.16.0
elliptic_motion.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_ELLIPTIC_MOTION_H
20 #define _LN_ELLIPTIC_MOTION_H
21 
22 #include <libnova/ln_types.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
39 double LIBNOVA_EXPORT ln_solve_kepler(double E, double M);
40 
45 double LIBNOVA_EXPORT ln_get_ell_mean_anomaly(double n, double delta_JD);
46 
51 double LIBNOVA_EXPORT ln_get_ell_true_anomaly(double e, double E);
52 
57 double LIBNOVA_EXPORT ln_get_ell_radius_vector(double a, double e, double E);
58 
63 double LIBNOVA_EXPORT ln_get_ell_smajor_diam(double e, double q);
64 
69 double LIBNOVA_EXPORT ln_get_ell_sminor_diam(double e, double a);
70 
75 double LIBNOVA_EXPORT ln_get_ell_mean_motion(double a);
76 
81 void LIBNOVA_EXPORT ln_get_ell_geo_rect_posn(struct ln_ell_orbit *orbit,
82  double JD, struct ln_rect_posn *posn);
83 
88 void LIBNOVA_EXPORT ln_get_ell_helio_rect_posn(struct ln_ell_orbit *orbit,
89  double JD, struct ln_rect_posn *posn);
90 
95 double LIBNOVA_EXPORT ln_get_ell_orbit_len(struct ln_ell_orbit *orbit);
96 
101 double LIBNOVA_EXPORT ln_get_ell_orbit_vel(double JD,
102  struct ln_ell_orbit *orbit);
103 
108 double LIBNOVA_EXPORT ln_get_ell_orbit_pvel(struct ln_ell_orbit *orbit);
109 
114 double LIBNOVA_EXPORT ln_get_ell_orbit_avel(struct ln_ell_orbit *orbit);
115 
120 double LIBNOVA_EXPORT ln_get_ell_body_phase_angle(double JD,
121  struct ln_ell_orbit *orbit);
122 
127 double LIBNOVA_EXPORT ln_get_ell_body_elong(double JD,
128  struct ln_ell_orbit *orbit);
129 
135 double LIBNOVA_EXPORT ln_get_ell_body_solar_dist(double JD,
136  struct ln_ell_orbit *orbit);
137 
143 double LIBNOVA_EXPORT ln_get_ell_body_earth_dist(double JD,
144  struct ln_ell_orbit *orbit);
145 
151 void LIBNOVA_EXPORT ln_get_ell_body_equ_coords(double JD,
152  struct ln_ell_orbit *orbit, struct ln_equ_posn *posn);
153 
158 int LIBNOVA_EXPORT ln_get_ell_body_rst(double JD,
159  struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit,
160  struct ln_rst_time *rst);
161 
166 int LIBNOVA_EXPORT ln_get_ell_body_rst_horizon(double JD,
167  struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit,
168  double horizon, struct ln_rst_time *rst);
169 
174 int LIBNOVA_EXPORT ln_get_ell_body_next_rst(double JD,
175  struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit,
176  struct ln_rst_time *rst);
177 
182 int LIBNOVA_EXPORT ln_get_ell_body_next_rst_horizon(double JD,
183  struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit,
184  double horizon, struct ln_rst_time *rst);
185 
190 int LIBNOVA_EXPORT ln_get_ell_body_next_rst_horizon_future(double JD,
191  struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit,
192  double horizon, int day_limit, struct ln_rst_time *rst);
193 
198 double LIBNOVA_EXPORT ln_get_ell_last_perihelion(double epoch_JD, double M,
199  double n);
200 
201 #ifdef __cplusplus
202 };
203 #endif
204 
205 #endif
ln_get_ell_orbit_len
double ln_get_ell_orbit_len(struct ln_ell_orbit *orbit)
Calculate the orbital length in AU.
Definition: elliptic_motion.c:311
ln_ell_orbit::e
double e
Definition: ln_types.h:267
ln_get_ell_radius_vector
double ln_get_ell_radius_vector(double a, double e, double E)
Calculate the radius vector.
Definition: elliptic_motion.c:129
ln_ell_orbit::omega
double omega
Definition: ln_types.h:270
ln_get_ell_body_rst_horizon
int ln_get_ell_body_rst_horizon(double JD, struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit, double horizon, struct ln_rst_time *rst)
Calculate the time of rise, set and transit for a body with an elliptic orbit.
Definition: elliptic_motion.c:523
ln_get_ell_geo_rect_posn
void ln_get_ell_geo_rect_posn(struct ln_ell_orbit *orbit, double JD, struct ln_rect_posn *posn)
Calculate the objects rectangular geocentric position.
Definition: elliptic_motion.c:244
ln_rect_posn::Z
double Z
Definition: ln_types.h:242
ln_get_ell_body_solar_dist
double ln_get_ell_body_solar_dist(double JD, struct ln_ell_orbit *orbit)
Calculate the distance between a body and the Sun.
Definition: elliptic_motion.c:382
ln_get_ell_last_perihelion
double ln_get_ell_last_perihelion(double epoch_JD, double M, double n)
Calculate the julian day of the last perihelion.
Definition: elliptic_motion.c:610
ln_rst_time
Rise, Set and Transit times.
Definition: ln_types.h:314
ln_get_ell_body_next_rst_horizon
int ln_get_ell_body_next_rst_horizon(double JD, struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit, double horizon, struct ln_rst_time *rst)
Calculate the time of rise, set and transit for a body with an elliptic orbit.
Definition: elliptic_motion.c:569
ln_rect_posn::X
double X
Definition: ln_types.h:240
ln_get_ell_mean_motion
double ln_get_ell_mean_motion(double a)
Calculate the mean daily motion (degrees/day).
Definition: elliptic_motion.c:165
ln_get_ell_body_elong
double ln_get_ell_body_elong(double JD, struct ln_ell_orbit *orbit)
Calculate the bodies elongation to the Sun..
Definition: elliptic_motion.c:460
ln_get_ell_orbit_vel
double ln_get_ell_orbit_vel(double JD, struct ln_ell_orbit *orbit)
Calculate orbital velocity in km/s.
Definition: elliptic_motion.c:333
ln_equ_posn::ra
double ra
Definition: ln_types.h:177
ln_ell_orbit::a
double a
Definition: ln_types.h:266
ln_get_earth_solar_dist
double ln_get_earth_solar_dist(double JD)
Calculate the distance between Earth and the Sun.
Definition: earth.c:2772
ln_get_ell_mean_anomaly
double ln_get_ell_mean_anomaly(double n, double delta_JD)
Calculate the mean anomaly.
Definition: elliptic_motion.c:96
ln_ell_orbit
Elliptic Orbital elements.
Definition: ln_types.h:265
ln_get_solar_geo_coords
void LIBNOVA_EXPORT ln_get_solar_geo_coords(double JD, struct ln_rect_posn *position)
Calculate geocentric coordinates (rectangular)
Definition: solar.c:116
ln_get_ell_true_anomaly
double ln_get_ell_true_anomaly(double e, double E)
Calculate the true anomaly.
Definition: elliptic_motion.c:109
ln_helio_posn
Heliocentric position.
Definition: ln_types.h:219
ln_ell_orbit::n
double n
Definition: ln_types.h:271
ln_get_ell_smajor_diam
double ln_get_ell_smajor_diam(double e, double q)
Calculate the semi major diameter.
Definition: elliptic_motion.c:142
ln_ell_orbit::i
double i
Definition: ln_types.h:268
ln_get_ell_helio_rect_posn
void ln_get_ell_helio_rect_posn(struct ln_ell_orbit *orbit, double JD, struct ln_rect_posn *posn)
Calculate the objects rectangular heliocentric position.
Definition: elliptic_motion.c:179
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_ell_body_rst
int ln_get_ell_body_rst(double JD, struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit, struct ln_rst_time *rst)
Calculate the time of rise, set and transit for a body with an elliptic orbit.
Definition: elliptic_motion.c:502
ln_get_ell_body_equ_coords
void ln_get_ell_body_equ_coords(double JD, struct ln_ell_orbit *orbit, struct ln_equ_posn *posn)
Calculate a bodies equatorial coords.
Definition: elliptic_motion.c:271
ln_get_ell_orbit_pvel
double ln_get_ell_orbit_pvel(struct ln_ell_orbit *orbit)
Calculate orbital velocity at perihelion in km/s.
Definition: elliptic_motion.c:350
ln_get_ell_body_next_rst
int ln_get_ell_body_next_rst(double JD, struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit, struct ln_rst_time *rst)
Calculate the time of rise, set and transit for a body with an elliptic orbit.
Definition: elliptic_motion.c:546
ln_get_ell_orbit_avel
double ln_get_ell_orbit_avel(struct ln_ell_orbit *orbit)
Calculate the orbital velocity at aphelion in km/s.
Definition: elliptic_motion.c:365
ln_helio_posn::R
double R
Definition: ln_types.h:222
ln_solve_kepler
double ln_solve_kepler(double e, double M)
Calculate the eccentric anomaly.
Definition: elliptic_motion.c:53
ln_rect_posn::Y
double Y
Definition: ln_types.h:241
ln_get_ell_body_earth_dist
double ln_get_ell_body_earth_dist(double JD, struct ln_ell_orbit *orbit)
Calculate the distance between a body and the Earth.
Definition: elliptic_motion.c:405
ln_get_ell_body_next_rst_horizon_future
int ln_get_ell_body_next_rst_horizon_future(double JD, struct ln_lnlat_posn *observer, struct ln_ell_orbit *orbit, double horizon, int day_limit, struct ln_rst_time *rst)
Calculate the time of rise, set and transit for a body with an elliptic orbit.
Definition: elliptic_motion.c:594
ln_helio_posn::B
double B
Definition: ln_types.h:221
ln_get_ell_body_phase_angle
double ln_get_ell_body_phase_angle(double JD, struct ln_ell_orbit *orbit)
Calculate the phase angle of the body. The angle Sun - body - Earth.
Definition: elliptic_motion.c:427
ln_get_ell_sminor_diam
double ln_get_ell_sminor_diam(double e, double a)
Calculate the semi minor diameter.
Definition: elliptic_motion.c:154
ln_rad_to_deg
double LIBNOVA_EXPORT ln_rad_to_deg(double radians)
radians to degrees
Definition: utility.c:87
ln_ell_orbit::JD
double JD
Definition: ln_types.h:272
ln_lnlat_posn
Ecliptical (or celestial) Longitude and Latitude.
Definition: ln_types.h:204
ln_get_rect_from_helio
void LIBNOVA_EXPORT ln_get_rect_from_helio(struct ln_helio_posn *object, struct ln_rect_posn *position)
Calculate geocentric coordinates from heliocentric coordinates
Definition: transform.c:36
ln_equ_posn
Equatorial Coordinates.
Definition: ln_types.h:176
ln_ell_orbit::w
double w
Definition: ln_types.h:269
ln_equ_posn::dec
double dec
Definition: ln_types.h:178
ln_get_earth_helio_coords
void ln_get_earth_helio_coords(double JD, struct ln_helio_posn *position)
Calculate Earth's heliocentric coordinates.
Definition: earth.c:2699
ln_rect_posn
Rectangular coordinates.
Definition: ln_types.h:239