Stellarium 0.12.3
sgp4ext.h
1 #ifndef _sgp4ext_
2 #define _sgp4ext_
3 /* ----------------------------------------------------------------
4 *
5 * sgp4ext.h
6 *
7 * this file contains extra routines needed for the main test program for sgp4.
8 * these routines are derived from the astro libraries.
9 *
10 * companion code for
11 * fundamentals of astrodynamics and applications
12 * 2007
13 * by david vallado
14 *
15 * (w) 719-573-2600, email dvallado@agi.com
16 *
17 * current :
18 * 20 apr 07 david vallado
19 * misc documentation updates
20 * changes :
21 * 14 aug 06 david vallado
22 * original baseline
23 * ---------------------------------------------------------------- */
24 
25 #include <string.h>
26 #include <math.h>
27 
28 #include "sgp4unit.h"
29 
30 
31 // ------------------------- function declarations -------------------------
32 
33 double sgn
34  (
35  double x
36  );
37 
38 double mag
39  (
40  double x[3]
41  );
42 
43 void cross
44  (
45  double vec1[3], double vec2[3], double outvec[3]
46  );
47 
48 double dot
49  (
50  double x[3], double y[3]
51  );
52 
53 double angle
54  (
55  double vec1[3],
56  double vec2[3]
57  );
58 
59 void newtonnu
60  (
61  double ecc, double nu,
62  double& e0, double& m
63  );
64 
65 double asinh
66  (
67  double xval
68  );
69 
70 void rv2coe
71  (
72  double r[3], double v[3], double mu,
73  double& p, double& a, double& ecc, double& incl, double& omega, double& argp,
74  double& nu, double& m, double& arglat, double& truelon, double& lonper
75  );
76 
77 void jday
78  (
79  int year, int mon, int day, int hr, int minute, double sec,
80  double& jd
81  );
82 
83 void days2mdhms
84  (
85  int year, double days,
86  int& mon, int& day, int& hr, int& minute, double& sec
87  );
88 
89 void invjday
90  (
91  double jd,
92  int& year, int& mon, int& day,
93  int& hr, int& minute, double& sec
94  );
95 
96 #endif
97