Renamed SGDP4 to SGP4
parent
bc82bc8ddb
commit
878eb3f7d8
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ SOURCES=Coord.cpp \
|
|||
Globals.cpp \
|
||||
Julian.cpp \
|
||||
Observer.cpp \
|
||||
SGDP4.cpp \
|
||||
SGP4.cpp \
|
||||
Timespan.cpp \
|
||||
Tle.cpp \
|
||||
Vector.cpp \
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Observer.cpp" />
|
||||
<ClCompile Include="SatelliteOrbit.cpp" />
|
||||
<ClCompile Include="SGDP4.cpp" />
|
||||
<ClCompile Include="SGP4.cpp" />
|
||||
<ClCompile Include="Timespan.cpp" />
|
||||
<ClCompile Include="Tle.cpp" />
|
||||
<ClCompile Include="Vector.cpp" />
|
||||
|
@ -94,7 +94,7 @@
|
|||
<ClInclude Include="Observer.h" />
|
||||
<ClInclude Include="SatelliteException.h" />
|
||||
<ClInclude Include="SatelliteOrbit.h" />
|
||||
<ClInclude Include="SGDP4.h" />
|
||||
<ClInclude Include="SGP4.h" />
|
||||
<ClInclude Include="Timespan.h" />
|
||||
<ClInclude Include="Tle.h" />
|
||||
<ClInclude Include="Vector.h" />
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
<ClCompile Include="Tle.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SGDP4.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Observer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -48,6 +45,9 @@
|
|||
<ClCompile Include="SatelliteOrbit.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SGP4.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Coord.h">
|
||||
|
@ -65,9 +65,6 @@
|
|||
<ClInclude Include="Tle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SGDP4.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SatelliteException.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -83,5 +80,8 @@
|
|||
<ClInclude Include="SatelliteOrbit.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SGP4.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
#include "SGDP4.h"
|
||||
#include "SGP4.h"
|
||||
|
||||
#include "Vector.h"
|
||||
#include "SatelliteException.h"
|
||||
|
@ -42,14 +42,14 @@
|
|||
#define TWOTHIRD (2.0 / 3.0)
|
||||
#define THDT (4.37526908801129966e-3)
|
||||
|
||||
SGDP4::SGDP4(void) {
|
||||
SGP4::SGP4(void) {
|
||||
first_run_ = true;
|
||||
}
|
||||
|
||||
SGDP4::~SGDP4(void) {
|
||||
SGP4::~SGP4(void) {
|
||||
}
|
||||
|
||||
void SGDP4::SetTle(const Tle& tle) {
|
||||
void SGP4::SetTle(const Tle& tle) {
|
||||
|
||||
/*
|
||||
* reset all constants etc
|
||||
|
@ -113,7 +113,7 @@ void SGDP4::SetTle(const Tle& tle) {
|
|||
Initialize(theta2, betao2, betao, eosq);
|
||||
}
|
||||
|
||||
void SGDP4::Initialize(const double& theta2, const double& betao2, const double& betao, const double& eosq) {
|
||||
void SGP4::Initialize(const double& theta2, const double& betao2, const double& betao, const double& eosq) {
|
||||
|
||||
if (Period() >= 225.0) {
|
||||
i_use_deep_space_ = true;
|
||||
|
@ -242,7 +242,7 @@ void SGDP4::Initialize(const double& theta2, const double& betao2, const double&
|
|||
first_run_ = false;
|
||||
}
|
||||
|
||||
void SGDP4::FindPosition(Eci& eci, double tsince) const {
|
||||
void SGP4::FindPosition(Eci& eci, double tsince) const {
|
||||
|
||||
if (i_use_deep_space_)
|
||||
FindPositionSDP4(eci, tsince);
|
||||
|
@ -250,14 +250,14 @@ void SGDP4::FindPosition(Eci& eci, double tsince) const {
|
|||
FindPositionSGP4(eci, tsince);
|
||||
}
|
||||
|
||||
void SGDP4::FindPosition(Eci& eci, const Julian& date) const {
|
||||
void SGP4::FindPosition(Eci& eci, const Julian& date) const {
|
||||
|
||||
const double tsince = date.SpanMin(Epoch());
|
||||
|
||||
FindPosition(eci, tsince);
|
||||
}
|
||||
|
||||
void SGDP4::FindPositionSDP4(Eci& eci, double tsince) const {
|
||||
void SGP4::FindPositionSDP4(Eci& eci, double tsince) const {
|
||||
|
||||
/*
|
||||
* the final values
|
||||
|
@ -368,7 +368,7 @@ void SGDP4::FindPositionSDP4(Eci& eci, double tsince) const {
|
|||
|
||||
}
|
||||
|
||||
void SGDP4::FindPositionSGP4(Eci& eci, double tsince) const {
|
||||
void SGP4::FindPositionSGP4(Eci& eci, double tsince) const {
|
||||
|
||||
/*
|
||||
* the final values
|
||||
|
@ -445,7 +445,7 @@ void SGDP4::FindPositionSGP4(Eci& eci, double tsince) const {
|
|||
|
||||
}
|
||||
|
||||
void SGDP4::CalculateFinalPositionVelocity(Eci& eci, const double& tsince, const double& e,
|
||||
void SGP4::CalculateFinalPositionVelocity(Eci& eci, const double& tsince, const double& e,
|
||||
const double& a, const double& omega, const double& xl, const double& xnode,
|
||||
const double& xincl, const double& xlcof, const double& aycof,
|
||||
const double& x3thm1, const double& x1mth2, const double& x7thm1,
|
||||
|
@ -605,7 +605,7 @@ void SGDP4::CalculateFinalPositionVelocity(Eci& eci, const double& tsince, const
|
|||
/*
|
||||
* deep space initialization
|
||||
*/
|
||||
void SGDP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const double& cosio, const double& betao,
|
||||
void SGP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const double& cosio, const double& betao,
|
||||
const double& theta2, const double& betao2,
|
||||
const double& xmdot, const double& omgdot, const double& xnodot) {
|
||||
|
||||
|
@ -937,7 +937,7 @@ void SGDP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const d
|
|||
}
|
||||
}
|
||||
|
||||
void SGDP4::DeepSpaceCalculateLunarSolarTerms(const double t, double& pe, double& pinc,
|
||||
void SGP4::DeepSpaceCalculateLunarSolarTerms(const double t, double& pe, double& pinc,
|
||||
double& pl, double& pgh, double& ph) const {
|
||||
|
||||
static const double ZES = 0.01675;
|
||||
|
@ -990,7 +990,7 @@ void SGDP4::DeepSpaceCalculateLunarSolarTerms(const double t, double& pe, double
|
|||
/*
|
||||
* calculate lunar / solar periodics and apply
|
||||
*/
|
||||
void SGDP4::DeepSpacePeriodics(const double& t, double& em,
|
||||
void SGP4::DeepSpacePeriodics(const double& t, double& em,
|
||||
double& xinc, double& omgasm, double& xnodes, double& xll) const {
|
||||
|
||||
/*
|
||||
|
@ -1085,7 +1085,7 @@ void SGDP4::DeepSpacePeriodics(const double& t, double& em,
|
|||
/*
|
||||
* deep space secular effects
|
||||
*/
|
||||
void SGDP4::DeepSpaceSecular(const double& t, double& xll, double& omgasm,
|
||||
void SGP4::DeepSpaceSecular(const double& t, double& xll, double& omgasm,
|
||||
double& xnodes, double& em, double& xinc, double& xn) const {
|
||||
|
||||
static const double STEP = 720.0;
|
||||
|
@ -1170,7 +1170,7 @@ void SGDP4::DeepSpaceSecular(const double& t, double& xll, double& omgasm,
|
|||
/*
|
||||
* calculate dot terms
|
||||
*/
|
||||
void SGDP4::DeepSpaceCalcDotTerms(double& xndot, double& xnddt, double& xldot) const {
|
||||
void SGP4::DeepSpaceCalcDotTerms(double& xndot, double& xnddt, double& xldot) const {
|
||||
|
||||
static const double G22 = 5.7686396;
|
||||
static const double G32 = 0.95240898;
|
||||
|
@ -1225,7 +1225,7 @@ void SGDP4::DeepSpaceCalcDotTerms(double& xndot, double& xnddt, double& xldot) c
|
|||
/*
|
||||
* deep space integrator for time period of delt
|
||||
*/
|
||||
void SGDP4::DeepSpaceIntegrator(const double delt, const double step2,
|
||||
void SGP4::DeepSpaceIntegrator(const double delt, const double step2,
|
||||
const double xndot, const double xnddt, const double xldot) const {
|
||||
|
||||
/*
|
||||
|
@ -1240,7 +1240,7 @@ void SGDP4::DeepSpaceIntegrator(const double delt, const double step2,
|
|||
d_atime_ += delt;
|
||||
}
|
||||
|
||||
void SGDP4::ResetGlobalVariables() {
|
||||
void SGP4::ResetGlobalVariables() {
|
||||
|
||||
/*
|
||||
* common variables
|
|
@ -4,10 +4,10 @@
|
|||
#include "Tle.h"
|
||||
#include "Eci.h"
|
||||
|
||||
class SGDP4 {
|
||||
class SGP4 {
|
||||
public:
|
||||
SGDP4(void);
|
||||
virtual ~SGDP4(void);
|
||||
SGP4(void);
|
||||
virtual ~SGP4(void);
|
||||
|
||||
void SetTle(const Tle& tle);
|
||||
void FindPosition(Eci& eci, double tsince) const;
|
|
@ -2,7 +2,7 @@
|
|||
#define SATELLITEORBIT_H_
|
||||
|
||||
#include "Tle.h"
|
||||
#include "SGDP4.h"
|
||||
#include "SGP4.h"
|
||||
|
||||
class SatelliteOrbit {
|
||||
public:
|
||||
|
@ -16,7 +16,7 @@ public:
|
|||
unsigned int GetOrbitNumber(const Julian& jul) const;
|
||||
|
||||
private:
|
||||
SGDP4 sgdp4_;
|
||||
SGP4 sgdp4_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
6
main.cpp
6
main.cpp
|
@ -1,6 +1,6 @@
|
|||
#include "Julian.h"
|
||||
#include "Tle.h"
|
||||
#include "SGDP4.h"
|
||||
#include "SGP4.h"
|
||||
#include "Globals.h"
|
||||
#include "Observer.h"
|
||||
#include "Coord.h"
|
||||
|
@ -22,7 +22,7 @@ void FindSatellite(const Julian& time_start, const Julian& time_end) {
|
|||
|
||||
}
|
||||
|
||||
void GeneratePassList(const CoordGeodetic& geo, const SGDP4& model, const Julian& date) {
|
||||
void GeneratePassList(const CoordGeodetic& geo, const SGP4& model, const Julian& date) {
|
||||
Observer obs(geo);
|
||||
Eci eci;
|
||||
model.FindPosition(eci, date);
|
||||
|
@ -52,7 +52,7 @@ int main() {
|
|||
|
||||
CoordGeodetic geo(Globals::Deg2Rad(51.360242), Globals::Deg2Rad(0.101473), 0.07);
|
||||
|
||||
SGDP4 sgp4_model;
|
||||
SGP4 sgp4_model;
|
||||
sgp4_model.SetTle(tle);
|
||||
Julian date;
|
||||
|
||||
|
|
Loading…
Reference in New Issue