Stellarium 0.15.2
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 <cstring>
26 #include <cmath>
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 void rv2coe
66  (
67  double r[3], double v[3], double mu,
68  double& p, double& a, double& ecc, double& incl, double& omega, double& argp,
69  double& nu, double& m, double& arglat, double& truelon, double& lonper
70  );
71 
72 void jday
73  (
74  int year, int mon, int day, int hr, int minute, double sec,
75  double& jd
76  );
77 
78 void days2mdhms
79  (
80  int year, double days,
81  int& mon, int& day, int& hr, int& minute, double& sec
82  );
83 
84 void invjday
85  (
86  double jd,
87  int& year, int& mon, int& day,
88  int& hr, int& minute, double& sec
89  );
90 
91 #endif
92