Skip to content

Commit

Permalink
mod: if bstar term goes negative using estimate_batch_orbit_sgp4_bsta…
Browse files Browse the repository at this point in the history
…r(), automatical use estimate_batch_orbit_sgp4() instead with no optimisation of bstar drag term.
  • Loading branch information
joshuacritchleymarrows committed Jul 7, 2023
1 parent 106a48a commit 8121e61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions BatchEstimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ def sgpsolver(para,tle,time):

def estimate_batch_orbit_sgp4_bstar(self):
"""!@brief Calculates the batch orbit estimates using SVD from a set of position and
velocity measurements, where the SGP4 propagator is used.
velocity measurements, where the SGP4 propagator is used. Optimises all six
orbital elements as well as the bstar drag term.
@return success result or return error code of integration tool
"""
Expand Down Expand Up @@ -680,11 +681,13 @@ def sgpsolver(para,tle,time):

iter_count = iter_count + 1


self.t0 = self.time[0]
self.para = y[0:6]
self.bstar = y[6]
self.write_to_tle()
if y[6] < 0:
self.estimate_batch_orbit_sgp4()
else:
self.t0 = self.time[0]
self.para = y[0:6]
self.bstar = y[6]
self.write_to_tle()

return 1

Expand Down
Binary file modified __pycache__/BatchEstimator.cpython-310.pyc
Binary file not shown.

0 comments on commit 8121e61

Please sign in to comment.