Make SGP4 structs private.
parent
566be64e8d
commit
65141920c1
|
@ -8,15 +8,11 @@
|
|||
#include <cmath>
|
||||
#include <iomanip>
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
const struct SGP4::CommonConstants Empty_CommonConstants = SGP4::CommonConstants();
|
||||
const struct SGP4::NearSpaceConstants Empty_NearSpaceConstants = SGP4::NearSpaceConstants();
|
||||
const struct SGP4::DeepSpaceConstants Empty_DeepSpaceConstants = SGP4::DeepSpaceConstants();
|
||||
const struct SGP4::IntegratorConstants Empty_IntegratorConstants = SGP4::IntegratorConstants();
|
||||
const struct SGP4::IntegratorParams Empty_IntegratorParams = SGP4::IntegratorParams();
|
||||
}
|
||||
const SGP4::CommonConstants SGP4::Empty_CommonConstants = SGP4::CommonConstants();
|
||||
const SGP4::NearSpaceConstants SGP4::Empty_NearSpaceConstants = SGP4::NearSpaceConstants();
|
||||
const SGP4::DeepSpaceConstants SGP4::Empty_DeepSpaceConstants = SGP4::DeepSpaceConstants();
|
||||
const SGP4::IntegratorConstants SGP4::Empty_IntegratorConstants = SGP4::IntegratorConstants();
|
||||
const SGP4::IntegratorParams SGP4::Empty_IntegratorParams = SGP4::IntegratorParams();
|
||||
|
||||
void SGP4::SetTle(const Tle& tle)
|
||||
{
|
||||
|
@ -1475,6 +1471,4 @@ void SGP4::Reset()
|
|||
deepspace_consts_ = Empty_DeepSpaceConstants;
|
||||
integrator_consts_ = Empty_IntegratorConstants;
|
||||
integrator_params_ = Empty_IntegratorParams;
|
||||
|
||||
//OrbitalElements elements_;
|
||||
}
|
||||
|
|
161
libsgp4/SGP4.h
161
libsgp4/SGP4.h
|
@ -34,83 +34,6 @@ public:
|
|||
Eci FindPosition(const DateTime& date) const;
|
||||
|
||||
private:
|
||||
void Initialise();
|
||||
Eci FindPositionSDP4(const double tsince) const;
|
||||
Eci FindPositionSGP4(double tsince) const;
|
||||
Eci CalculateFinalPositionVelocity(
|
||||
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,
|
||||
const double cosio,
|
||||
const double sinio) const;
|
||||
void DeepSpaceInitialise(
|
||||
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);
|
||||
void DeepSpaceCalculateLunarSolarTerms(
|
||||
const double tsince,
|
||||
double& pe,
|
||||
double& pinc,
|
||||
double& pl,
|
||||
double& pgh,
|
||||
double& ph) const;
|
||||
void DeepSpacePeriodics(
|
||||
const double tsince,
|
||||
double& em,
|
||||
double& xinc,
|
||||
double& omgasm,
|
||||
double& xnodes,
|
||||
double& xll) const;
|
||||
void DeepSpaceSecular(
|
||||
const double tsince,
|
||||
double& xll,
|
||||
double& omgasm,
|
||||
double& xnodes,
|
||||
double& em,
|
||||
double& xinc,
|
||||
double& xn) const;
|
||||
void DeepSpaceCalcDotTerms(struct IntegratorValues& values) const;
|
||||
void DeepSpaceIntegrator(
|
||||
const double delt,
|
||||
const double step2,
|
||||
const struct IntegratorValues& values) const;
|
||||
void Reset();
|
||||
|
||||
/*
|
||||
* flags
|
||||
*/
|
||||
bool use_simple_model_;
|
||||
bool use_deep_space_;
|
||||
|
||||
/*
|
||||
* the constants used
|
||||
*/
|
||||
struct CommonConstants common_consts_;
|
||||
struct NearSpaceConstants nearspace_consts_;
|
||||
struct DeepSpaceConstants deepspace_consts_;
|
||||
struct IntegratorConstants integrator_consts_;
|
||||
mutable struct IntegratorParams integrator_params_;
|
||||
|
||||
/*
|
||||
* the orbit data
|
||||
*/
|
||||
OrbitalElements elements_;
|
||||
|
||||
struct CommonConstants
|
||||
{
|
||||
double cosio;
|
||||
|
@ -250,7 +173,89 @@ private:
|
|||
*/
|
||||
struct IntegratorValues values_t;
|
||||
};
|
||||
|
||||
void Initialise();
|
||||
Eci FindPositionSDP4(const double tsince) const;
|
||||
Eci FindPositionSGP4(double tsince) const;
|
||||
Eci CalculateFinalPositionVelocity(
|
||||
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,
|
||||
const double cosio,
|
||||
const double sinio) const;
|
||||
void DeepSpaceInitialise(
|
||||
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);
|
||||
void DeepSpaceCalculateLunarSolarTerms(
|
||||
const double tsince,
|
||||
double& pe,
|
||||
double& pinc,
|
||||
double& pl,
|
||||
double& pgh,
|
||||
double& ph) const;
|
||||
void DeepSpacePeriodics(
|
||||
const double tsince,
|
||||
double& em,
|
||||
double& xinc,
|
||||
double& omgasm,
|
||||
double& xnodes,
|
||||
double& xll) const;
|
||||
void DeepSpaceSecular(
|
||||
const double tsince,
|
||||
double& xll,
|
||||
double& omgasm,
|
||||
double& xnodes,
|
||||
double& em,
|
||||
double& xinc,
|
||||
double& xn) const;
|
||||
void DeepSpaceCalcDotTerms(struct IntegratorValues& values) const;
|
||||
void DeepSpaceIntegrator(
|
||||
const double delt,
|
||||
const double step2,
|
||||
const struct IntegratorValues& values) const;
|
||||
void Reset();
|
||||
|
||||
/*
|
||||
* flags
|
||||
*/
|
||||
bool use_simple_model_;
|
||||
bool use_deep_space_;
|
||||
|
||||
/*
|
||||
* the constants used
|
||||
*/
|
||||
struct CommonConstants common_consts_;
|
||||
struct NearSpaceConstants nearspace_consts_;
|
||||
struct DeepSpaceConstants deepspace_consts_;
|
||||
struct IntegratorConstants integrator_consts_;
|
||||
mutable struct IntegratorParams integrator_params_;
|
||||
|
||||
/*
|
||||
* the orbit data
|
||||
*/
|
||||
OrbitalElements elements_;
|
||||
|
||||
static const struct SGP4::CommonConstants Empty_CommonConstants;
|
||||
static const struct SGP4::NearSpaceConstants Empty_NearSpaceConstants;
|
||||
static const struct SGP4::DeepSpaceConstants Empty_DeepSpaceConstants;
|
||||
static const struct SGP4::IntegratorConstants Empty_IntegratorConstants;
|
||||
static const struct SGP4::IntegratorParams Empty_IntegratorParams;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue