From 1e319dc910dd37cc991bdb8734233a6532eeaf74 Mon Sep 17 00:00:00 2001 From: Daniel Warner Date: Mon, 27 Aug 2018 11:36:48 +0100 Subject: [PATCH] Move variables --- libsgp4/SGP4.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libsgp4/SGP4.cc b/libsgp4/SGP4.cc index 9dfe842..152aba7 100644 --- a/libsgp4/SGP4.cc +++ b/libsgp4/SGP4.cc @@ -383,7 +383,7 @@ Eci SGP4::FindPositionSGP4(double tsince) const double omega; double xl; double xnode; - double xincl; + const double xincl = elements_.Inclination(); /* * update for secular gravity and atmospheric drag @@ -395,16 +395,15 @@ Eci SGP4::FindPositionSGP4(double tsince) const const double xnoddf = elements_.AscendingNode() + common_consts_.xnodot * tsince; + omega = omgadf; + double xmp = xmdf; + const double tsq = tsince * tsince; xnode = xnoddf + common_consts_.xnodcf * tsq; double tempa = 1.0 - common_consts_.c1 * tsince; double tempe = elements_.BStar() * common_consts_.c4 * tsince; double templ = common_consts_.t2cof * tsq; - xincl = elements_.Inclination(); - omega = omgadf; - double xmp = xmdf; - if (!use_simple_model_) { const double delomg = nearspace_consts_.omgcof * tsince;