1 /*
2  * Copyright 2013 Daniel Warner <contact@danrw.com>
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ORBITALELEMENTS_H_
18 #define ORBITALELEMENTS_H_
19 
20 #include <keplerian_toolbox/detail/visibility.hpp>
21 #include "DateTime.h"
22 #include "Util.h"
23 
24 class Tle;
25 
26 /**
27  * @brief The extracted orbital elements used by the SGP4 propagator.
28  */
29 class KEP_TOOLBOX_DLL_PUBLIC OrbitalElements
30 {
31 public:
32     OrbitalElements(const Tle &tle);
33 
~OrbitalElements()34     virtual ~OrbitalElements()
35     {
36     }
37 
38     /*
39      * XMO
40      */
MeanAnomoly()41     double MeanAnomoly() const
42     {
43         return mean_anomoly_;
44     }
45 
46     /*
47      * XNODEO
48      */
AscendingNode()49     double AscendingNode() const
50     {
51         return ascending_node_;
52     }
53 
54     /*
55      * OMEGAO
56      */
ArgumentPerigee()57     double ArgumentPerigee() const
58     {
59         return argument_perigee_;
60     }
61 
62     /*
63      * EO
64      */
Eccentricity()65     double Eccentricity() const
66     {
67         return eccentricity_;
68     }
69 
70     /*
71      * XINCL
72      */
Inclination()73     double Inclination() const
74     {
75         return inclination_;
76     }
77 
78     /*
79      * XNO
80      */
MeanMotion()81     double MeanMotion() const
82     {
83         return mean_motion_;
84     }
85 
86     /*
87      * BSTAR
88      */
BStar()89     double BStar() const
90     {
91         return bstar_;
92     }
93 
94     /*
95      * AODP
96      */
RecoveredSemiMajorAxis()97     double RecoveredSemiMajorAxis() const
98     {
99         return recovered_semi_major_axis_;
100     }
101 
102     /*
103      * XNODP
104      */
RecoveredMeanMotion()105     double RecoveredMeanMotion() const
106     {
107         return recovered_mean_motion_;
108     }
109 
110     /*
111      * PERIGE
112      */
Perigee()113     double Perigee() const
114     {
115         return perigee_;
116     }
117 
118     /*
119      * Period in minutes
120      */
Period()121     double Period() const
122     {
123         return period_;
124     }
125 
126     /*
127      * EPOCH
128      */
Epoch()129     DateTime Epoch() const
130     {
131         return epoch_;
132     }
133 
134 private:
135     double mean_anomoly_;
136     double ascending_node_;
137     double argument_perigee_;
138     double eccentricity_;
139     double inclination_;
140     double mean_motion_;
141     double bstar_;
142     double recovered_semi_major_axis_;
143     double recovered_mean_motion_;
144     double perigee_;
145     double period_;
146     DateTime epoch_;
147 };
148 
149 #endif
150