Simple batch filter estimation algorithm via SVD to determine the orbit of a satellite by GPS single-point positioning measurements. Code provides the following features:
- Read GPS receiver telemetry files.
- Batch filter to calculate estimate position and velocity of satellite at initial measurement epoch.
- Convert position and velocity in xyz to Kepler orbital parameters.
- Write and read satellite TLE files based on estimated ephemeris.
-
Functions
- The
BatchEstimator
class manages the GPS measurement and TLE files, estimates position and transforms between TLE.
- The
-
Related Files
data\
folder should contain the GPS measurements to be readkernel\
folder should contain the appropriate SPICE library files. The required files are:- de440.bsp
- earth_assoc_itrf93.tf
- earth_latest_high_prec.bpc
- naif0012.tls
- earth_720101_XXXXXX.bpc
- XXXXXX is the most recent file date.
- pck00011.tpc
-
Dependencies
-
This code is developed and tested on Python3. There is a number of class dependencies:
- numpy
- pandas
- pyatmos
- spiceypy
- numdifftools
- scipy
- pyshtools
- sgp4
- astropy
-
These may be simply installed using:
pip3 install numpy pandas pyatmos spiceypy numdifftools scipy pyshtools sgp4 astropy
-
-
How to use
- Make an instance of the
BatchEstimator
class bybatch_estimator = BatchEstimator.BatchEstimator()
. - Read a TLE sample of the spacecraft, perhaps from Celestrack or another source, specifying the string using
batch_estimator.read_tle(tle_string)
. - Read the GPS data file, specifying filepath, using
batch_estimator.read_gps_data(filepath)
. - Estimate the orbit by the GPS data using an SGP4 propagator estimate,
batch_estimator.estimate_batch_orbit_sgp4()
- To retrieve the new TLE string, use
tle_string = batch_estimator.write_to_tle()
.
- Make an instance of the
- Orbit estimate by SGP4 propagated truth
-
Overview
- Propagate a sample set of TLE using SGP4. The sample set of TLE is:
1 55072U 23001BR 23040.15743944 .00016529 00000+0 91057-3 0 9998
2 55072 97.5013 101.7243 0016943 94.7500 265.5667 15.13962877 5687
- Satellite measurements are taken every 10 s for 1000 samples, with a noise of 10 m in each GPS receiver measurement.
- Introduce measurements to the
BatchEstimator
as a supposed GPS measurement dataset. - Estimate the batch orbit by SGP4.
- Compare both the estimated TLE and the error difference.
- Propagate a sample set of TLE using SGP4. The sample set of TLE is:
-
Results
-
The estimated TLE code.
1 55072U 23001BR 23040.15743944 .00016529 00000+0 91057-3 0 9998
2 55072 97.5013 101.7243 0016943 94.7495 265.5671 15.13962885 5684
-
Calculated position error by the SGP4 sample data to the estimated position by the newly calculated data.
- Calculated velocity error by the SGP4 sample data to the estimated position by the newly calculated data.
-
-
- The estimator can also consider the bstar term. Simply replace
batch_estimator.estimate_batch_orbit_sgp4()
withbatch_estimator.estimate_batch_orbit_sgp4_bstar()
- Data editing can be introduced to remove outliers from a GPS/GNSS receiver data set. Replace
USE_DATA_EDITING
in the preamble from0
to1
.
-
Some improvements are still be made in the code. These include:
- Fixing fidelity to the standard propagator (non-SGP4), where the atmosphere drag 'expo' and 'jb2008' and and spherical harmonic gravtitational acceleration 'spherical' models are not yet working.
-
The function
estimate_batch_orbit_sgp4
performs much better thanestimate_batch_orbit
as it the SGP4 model is better developed than using newtonian based propagation. Currently, theestimate_batch_orbit_sgp4
code should be preferenced.