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