diff --git a/libsgp4/SGP4.cc b/libsgp4/SGP4.cc index dc6039b..4542283 100644 --- a/libsgp4/SGP4.cc +++ b/libsgp4/SGP4.cc @@ -24,12 +24,7 @@ #include #include - -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(); +#include void SGP4::SetTle(const Tle& tle) { @@ -1441,9 +1436,9 @@ void SGP4::Reset() use_simple_model_ = false; use_deep_space_ = false; - common_consts_ = Empty_CommonConstants; - nearspace_consts_ = Empty_NearSpaceConstants; - deepspace_consts_ = Empty_DeepSpaceConstants; - integrator_consts_ = Empty_IntegratorConstants; - integrator_params_ = Empty_IntegratorParams; + std::memset(&common_consts_, 0, sizeof(common_consts_)); + std::memset(&nearspace_consts_, 0, sizeof(nearspace_consts_)); + std::memset(&deepspace_consts_, 0, sizeof(deepspace_consts_)); + std::memset(&integrator_consts_, 0, sizeof(integrator_consts_)); + std::memset(&integrator_params_, 0, sizeof(integrator_params_)); } diff --git a/libsgp4/SGP4.h b/libsgp4/SGP4.h index 4d830a9..4b88791 100644 --- a/libsgp4/SGP4.h +++ b/libsgp4/SGP4.h @@ -290,12 +290,6 @@ private: */ bool use_simple_model_; bool use_deep_space_; - - 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