Package orbdetpy
orbdetpy is a Python orbit determination library.
Features
Dynamics in orbdetpy can be configured with:
- EGM96 gravity field up to degree and order 360.
- Earth solid tides due to the influence of the Sun and Moon.
- FES 2004 ocean tide model up to degree and order 100.
- NRL MSISE-00 and exponential atmospheric drag models.
- Solar radiation pressure.
- Third body perturbations from the Sun and Moon.
- Satellite box-wing models and maneuvers.
Range, range-rate, angles, and inertial state measurements are supported. Filtering can be done with an EKF, UKF, or Batch Least Squares. Dynamic Model Compensation (DMC) can be used to estimate unmodeled accelerations.
Installation
If you have docker installed and wish to use a pre-built environment refer to the Docker section in this README.
-
Install Java SE 11 (11.0.10) from https://www.oracle.com/javadownload. Set the
JAVA_HOME
environment variable to the Java installation folder. Thejava
executable must be added to the system path. -
Install Python 3.8.0 or higher and run
pip install orbdetpy
to install orbdetpy and other package dependencies. -
Update the astrodynamics data under
orbdetpy/orekit-data
periodically by running the following. You will needroot
privileges on some systems.
python -c "from orbdetpy.astro_data import update_data; update_data();"
Development
-
Download and extract https://github.com/ut-astria/orbdetpy/releases/download/2.1.0/orekit-data.tar.gz under the
orbdetpy/
sub-folder. -
Developers will need Apache Maven 3+ to build the Java library. Build using the following from the
orbdetpy/
sub-folder, whereos_cpu_type
islinux-x86_64
,linux-x86_32
,windows-x86_64
,windows-x86_32
,osx-x86_64
, orosx-x86_32
depending on your CPU and OS:
mvn -e -Dos.detected.classifier=os_cpu_type package
The command-line is simpler on Intel/AMD 64-bit Linux:
mvn -e package
- Run
pip install -e ./
from the top-level folder containingsetup.py
.
Docker
-
Build the docker image on a machine that has docker installed and go to the root folder of this repository where the
Dockerfile
is and run,docker build --build-arg ORBDETPY_VERSION=2.0.7 -t orbdetpy:2.0.7 .
-
Run orbdetpy:2.0.7 image in a daemon state:
docker run -it --rm orbdetpy:2.0.7 bash
-
Next we will activate the python environment and run a test to determine a successful docker image build
cd && . env_orbdetpy/bin/activate && python orbdetpy/examples/test_estimation.py
- From here, you can either develop in orbdetpy or build scripts and test in this pre-built environment
Examples
-
fit_radec.py
: Run OD with real angles measurements. Also demonstrates the Laplace IOD method for estimating an initial state vector. -
interpolate_oem.py
: Command-line tool for interpolating state vectors from CCSDS OEM ephemeris files. OEM files are available for download at http://astria.tacc.utexas.edu/AstriaGraph. -
predict_passes.py
: Predict satellite passes for ground stations or geographic regions using TLEs. Current elements may be obtained from sites such as http://www.celestrak.com. -
propagate_tle.py
: Propagate TLEs given by command-line arguments. -
test_conversion.py
: Test reference frame and other conversion functions. -
test_estimation.py
: Demonstrates measurement simulation and orbit determination functions. -
test_interpolation.py
: Interpolate state vectors.
Known Issues
-
Give orbdetpy network access permissions if you get warnings from the Microsoft Windows Firewall.
-
If you use orbdetpy with Python's
multiprocessing
package, call the functionmultiprocessing.set_start_method("spawn")
before othermultiprocessing
calls.
Sub-modules
orbdetpy.astro_data
orbdetpy.ccsds
orbdetpy.conversion
orbdetpy.estimation
orbdetpy.plotting
orbdetpy.propagation
orbdetpy.rpc
orbdetpy.utilities
orbdetpy.version
Functions
def add_facet(cfg: messages_pb2.Settings, normal: Tuple[float, float, float], area: float) ‑> messages_pb2.Facet
-
Add a facet to a box-wing spacecraft model.
Parameters
cfg : Settings object. normal : Facet unit outward normal vector in the spacecraft's co-moving LVLH frame. area : Facet area [m^2].
Returns
Added Facet object
def add_maneuver(cfg: messages_pb2.Settings, time: float, trigger_event: int, trigger_params: Optional[List[float]], maneuver_type: int, maneuver_params: Optional[List[float]]) ‑> messages_pb2.Maneuver
-
Add maneuver to propagation force models.
Parameters
cfg : Settings object. time : TT offset from J2000 epoch [s]. trigger_event : Constant from ManeuverTrigger. trigger_params : Additional data for trigger event. maneuver_type : Constant from ManeuverType. maneuver_params : Additional maneuver specific data.
Returns
Added Maneuver object.
def add_station(cfg: messages_pb2.Settings, name: str, latitude: float, longitude: float, altitude: float, fov_azimuth: float = None, fov_elevation: float = None, fov_aperture: float = None, bias: Optional[List[float]] = None, bias_estimation: int = None) ‑> messages_pb2.Station
-
Add a ground station.
Parameters
cfg : Settings object. name : Station name. latitude : Station WGS-84 latitude [rad]. longitude : Station WGS-84 longitude [rad]. altitude : Station height above WGS-84 reference geoid [m]. fov_azimuth : FOV center azimuth [rad]. fov_elevation : FOV center elevation [rad]. fov_aperture : FOV aperture angle [rad]. bias : Measurement biases. bias_estimation : Constant from EstimationType.
Returns
Added Station object.
def build_measurement(time: float, station_name: str, values: List[float], angle_rates: Optional[List[float]] = None) ‑> messages_pb2.Measurement
-
Build Measurement object from observed or simulated data.
Parameters
time : Measurement time; TT offset from J2000 epoch [s]. station_name : Station name. values : Measurement data corresponding to types configured in Settings object. angle_rates : Optional time rates of angle measurements [rad/s].
Returns
Measurement object.
def configure(**kwargs) ‑> messages_pb2.Settings
-
Create Settings object with default values.
Parameters
**kwargs : Keyword arguments for non-default parameters.
Returns
Settings object initialized with defaults and given values.
Classes
class AttitudeType
-
Orekit attitude providers.
Class variables
var BODY_CENTER_POINTING
var FIXED_RATE
var NADIR_POINTING
var UNDEFINED
class Constant
-
Miscellaneous constants.
Class variables
var ARC_SECOND_TO_RAD
var DEGREE_TO_RAD
var MINUS_I
var MINUS_J
var MINUS_K
var PLUS_I
var PLUS_J
var PLUS_K
var ZERO_VECTOR
class DragModel
-
Atmospheric drag density models.
Class variables
var EXPONENTIAL
var MSISE2000
var UNDEFINED
var WAM
class Epoch
-
Orekit AbsoluteDate epochs.
Class variables
var BEIDOU_EPOCH
var CCSDS_EPOCH
var FIFTIES_EPOCH
var GALILEO_EPOCH
var GLONASS_EPOCH
var GPS_EPOCH
var IRNSS_EPOCH
var J2000_EPOCH
var JULIAN_EPOCH
var MODIFIED_JULIAN_EPOCH
var QZSS_EPOCH
var UNIX_EPOCH
class EstimationType
-
Parameter estimation types.
Class variables
var CONSIDER
var ESTIMATE
var UNDEFINED
class Facet (*args, **kwargs)
-
A ProtocolMessage
Ancestors
- google.protobuf.pyext._message.CMessage
- google.protobuf.message.Message
Class variables
var DESCRIPTOR
Instance variables
var area
-
Field Facet.area
var normal
-
Field Facet.normal
class Filter
-
Estimation filters.
Class variables
var BATCH_LEAST_SQUARES
var EXTENDED_KALMAN
var UNSCENTED_KALMAN
class Frame
-
Orekit reference frames.
Class variables
var CIRF_CONVENTIONS_1996_ACCURATE_EOP
var CIRF_CONVENTIONS_1996_SIMPLE_EOP
var CIRF_CONVENTIONS_2003_ACCURATE_EOP
var CIRF_CONVENTIONS_2003_SIMPLE_EOP
var CIRF_CONVENTIONS_2010_ACCURATE_EOP
var CIRF_CONVENTIONS_2010_SIMPLE_EOP
var ECLIPTIC_CONVENTIONS_1996
var ECLIPTIC_CONVENTIONS_2003
var ECLIPTIC_CONVENTIONS_2010
var EME2000
var GCRF
var GTOD_CONVENTIONS_1996_ACCURATE_EOP
var GTOD_CONVENTIONS_1996_SIMPLE_EOP
var GTOD_CONVENTIONS_2003_ACCURATE_EOP
var GTOD_CONVENTIONS_2003_SIMPLE_EOP
var GTOD_CONVENTIONS_2010_ACCURATE_EOP
var GTOD_CONVENTIONS_2010_SIMPLE_EOP
var GTOD_WITHOUT_EOP_CORRECTIONS
var ICRF
var ITRF_CIO_CONV_1996_ACCURATE_EOP
var ITRF_CIO_CONV_1996_SIMPLE_EOP
var ITRF_CIO_CONV_2003_ACCURATE_EOP
var ITRF_CIO_CONV_2003_SIMPLE_EOP
var ITRF_CIO_CONV_2010_ACCURATE_EOP
var ITRF_CIO_CONV_2010_SIMPLE_EOP
var ITRF_EQUINOX_CONV_1996_ACCURATE_EOP
var ITRF_EQUINOX_CONV_1996_SIMPLE_EOP
var ITRF_EQUINOX_CONV_2003_ACCURATE_EOP
var ITRF_EQUINOX_CONV_2003_SIMPLE_EOP
var ITRF_EQUINOX_CONV_2010_ACCURATE_EOP
var ITRF_EQUINOX_CONV_2010_SIMPLE_EOP
var MOD_CONVENTIONS_1996
var MOD_CONVENTIONS_2003
var MOD_CONVENTIONS_2010
var MOD_WITHOUT_EOP_CORRECTIONS
var PZ90_11
var TEME
var TIRF_CONVENTIONS_1996_ACCURATE_EOP
var TIRF_CONVENTIONS_1996_SIMPLE_EOP
var TIRF_CONVENTIONS_2003_ACCURATE_EOP
var TIRF_CONVENTIONS_2003_SIMPLE_EOP
var TIRF_CONVENTIONS_2010_ACCURATE_EOP
var TIRF_CONVENTIONS_2010_SIMPLE_EOP
var TOD_CONVENTIONS_1996_ACCURATE_EOP
var TOD_CONVENTIONS_1996_SIMPLE_EOP
var TOD_CONVENTIONS_2003_ACCURATE_EOP
var TOD_CONVENTIONS_2003_SIMPLE_EOP
var TOD_CONVENTIONS_2010_ACCURATE_EOP
var TOD_CONVENTIONS_2010_SIMPLE_EOP
var TOD_WITHOUT_EOP_CORRECTIONS
var VEIS_1950
class Maneuver (*args, **kwargs)
-
A ProtocolMessage
Ancestors
- google.protobuf.pyext._message.CMessage
- google.protobuf.message.Message
Class variables
var DESCRIPTOR
Instance variables
var maneuver_params
-
Field Maneuver.maneuver_params
var maneuver_type
-
Field Maneuver.maneuver_type
var time
-
Field Maneuver.time
var trigger_event
-
Field Maneuver.trigger_event
var trigger_params
-
Field Maneuver.trigger_params
class ManeuverTrigger
-
Maneuver trigger events.
Class variables
var APSIDE_CROSSING
var DATE_TIME
var LATITUDE_CROSSING
var LATITUDE_EXTREMUM
var LONGITUDE_CROSSING
var LONGITUDE_EXTREMUM
var NODE_CROSSING
var UNDEFINED
class ManeuverType
-
Maneuver types.
Class variables
var ARG_PERIGEE_CHANGE
var CONSTANT_THRUST
var EAST_WEST_STATIONING
var ECCENTRICITY_CHANGE
var INCLINATION_CHANGE
var NORTH_SOUTH_STATIONING
var PERIGEE_CHANGE
var RAAN_CHANGE
var SEMI_MAJOR_AXIS_CHANGE
var STOP_PROPAGATION
var UNDEFINED
class Measurement (*args, **kwargs)
-
A ProtocolMessage
Ancestors
- google.protobuf.pyext._message.CMessage
- google.protobuf.message.Message
Class variables
var DESCRIPTOR
Instance variables
var angle_rates
-
Field Measurement.angle_rates
var station
-
Field Measurement.station
var time
-
Field Measurement.time
var true_state
-
Field Measurement.true_state
var values
-
Field Measurement.values
class MeasurementType
-
Measurement types.
Class variables
var AZIMUTH
var DECLINATION
var ELEVATION
var POSITION
var POSITION_VELOCITY
var RANGE
var RANGE_RATE
var RIGHT_ASCENSION
class OutputFlag
-
Bit flags that control propagation and estimation output.
Class variables
var OUTPUT_DENSITY
var OUTPUT_ECLIPSE
var OUTPUT_ESTM_COV
var OUTPUT_INNO_COV
var OUTPUT_PROP_COV
var OUTPUT_RESIDUALS
class Parameter (*args, **kwargs)
-
A ProtocolMessage
Ancestors
- google.protobuf.pyext._message.CMessage
- google.protobuf.message.Message
Class variables
var DESCRIPTOR
Instance variables
var estimation
-
Field Parameter.estimation
var max
-
Field Parameter.max
var min
-
Field Parameter.min
var value
-
Field Parameter.value
class PositionAngle
-
Orekit position angles.
Class variables
var ECCENTRIC
var MEAN
var TRUE
class Settings (*args, **kwargs)
-
A ProtocolMessage
Ancestors
- google.protobuf.pyext._message.CMessage
- google.protobuf.message.Message
Class variables
var DESCRIPTOR
var MeasurementsEntry
-
A ProtocolMessage
var StationsEntry
-
A ProtocolMessage
Instance variables
var drag_MSISE_flags
-
Field Settings.drag_MSISE_flags
var drag_coefficient
-
Field Settings.drag_coefficient
var drag_exp_H0
-
Field Settings.drag_exp_H0
var drag_exp_Hscale
-
Field Settings.drag_exp_Hscale
var drag_exp_rho0
-
Field Settings.drag_exp_rho0
var drag_model
-
Field Settings.drag_model
var estm_DMC_acceleration
-
Field Settings.estm_DMC_acceleration
var estm_DMC_corr_time
-
Field Settings.estm_DMC_corr_time
var estm_DMC_sigma_pert
-
Field Settings.estm_DMC_sigma_pert
var estm_covariance
-
Field Settings.estm_covariance
var estm_detection_probability
-
Field Settings.estm_detection_probability
var estm_filter
-
Field Settings.estm_filter
var estm_gating_probability
-
Field Settings.estm_gating_probability
var estm_gating_threshold
-
Field Settings.estm_gating_threshold
var estm_outlier_sigma
-
Field Settings.estm_outlier_sigma
var estm_outlier_warmup
-
Field Settings.estm_outlier_warmup
var estm_process_noise
-
Field Settings.estm_process_noise
var estm_smoother_iterations
-
Field Settings.estm_smoother_iterations
var geo_zone_lat_lon
-
Field Settings.geo_zone_lat_lon
var gravity_degree
-
Field Settings.gravity_degree
var gravity_order
-
Field Settings.gravity_order
var integ_abs_tolerance
-
Field Settings.integ_abs_tolerance
var integ_max_time_step
-
Field Settings.integ_max_time_step
var integ_min_time_step
-
Field Settings.integ_min_time_step
var integ_rel_tolerance
-
Field Settings.integ_rel_tolerance
var maneuvers
-
Field Settings.maneuvers
var measurements
-
Field Settings.measurements
var ocean_tides_degree
-
Field Settings.ocean_tides_degree
var ocean_tides_order
-
Field Settings.ocean_tides_order
var output_flags
-
Field Settings.output_flags
var prop_end
-
Field Settings.prop_end
var prop_inertial_frame
-
Field Settings.prop_inertial_frame
var prop_initial_TLE
-
Field Settings.prop_initial_TLE
var prop_initial_state
-
Field Settings.prop_initial_state
var prop_start
-
Field Settings.prop_start
var prop_step
-
Field Settings.prop_step
var rp_coeff_absorption
-
Field Settings.rp_coeff_absorption
var rp_coeff_reflection
-
Field Settings.rp_coeff_reflection
var rp_sun
-
Field Settings.rp_sun
var rso_area
-
Field Settings.rso_area
var rso_attitude_provider
-
Field Settings.rso_attitude_provider
var rso_facets
-
Field Settings.rso_facets
var rso_mass
-
Field Settings.rso_mass
var rso_solar_array_area
-
Field Settings.rso_solar_array_area
var rso_solar_array_axis
-
Field Settings.rso_solar_array_axis
var rso_spin_acceleration
-
Field Settings.rso_spin_acceleration
var rso_spin_velocity
-
Field Settings.rso_spin_velocity
var sim_measurements
-
Field Settings.sim_measurements
var solid_tides_moon
-
Field Settings.solid_tides_moon
var solid_tides_sun
-
Field Settings.solid_tides_sun
var stations
-
Field Settings.stations
var third_body_moon
-
Field Settings.third_body_moon
var third_body_sun
-
Field Settings.third_body_sun
class Station (*args, **kwargs)
-
A ProtocolMessage
Ancestors
- google.protobuf.pyext._message.CMessage
- google.protobuf.message.Message
Class variables
var DESCRIPTOR
Instance variables
var altitude
-
Field Station.altitude
var bias
-
Field Station.bias
var bias_estimation
-
Field Station.bias_estimation
var fov_aperture
-
Field Station.fov_aperture
var fov_azimuth
-
Field Station.fov_azimuth
var fov_elevation
-
Field Station.fov_elevation
var latitude
-
Field Station.latitude
var longitude
-
Field Station.longitude
class TDMFileFormat
-
CCSDS TDM file formats.
Class variables
var KEYVALUE
var UNKNOWN
var XML