PyEci#
- class cysgp4.PyEci(PyDateTime pydt=None, PyCoordGeodetic geo_loc=None)#
Bases:
object
Thin wrapper around sgp4 (C++) Eci class.
The Eci class holds an ECI location (latitude, longitude, altitude) for a particular datetime.
Note, internally, the coordinates (and velocities) are stored in Cartesian form (read-only!). One can access these, via the
loc
andvel
properties. Setting new parameters is only possible via a geographic location.- Parameters:
- pydt
PyDateTime
Date and time.
- geo_loc
PyCoordGeodetic
Geographic location.
- pydt
- Returns:
Examples
Constructing and using a
PyEci
object is straightforward:>>> from cysgp4 import PyEci, PyCoordGeodetic, PyDateTime >>> pydt = PyDateTime.from_mjd(55555.) >>> lon_deg, lat_deg = 6.88375, 50.525 >>> alt_km = 0.366 >>> geo = PyCoordGeodetic(lon_deg, lat_deg, alt_km) >>> eci = PyEci(pydt, geo) >>> eci <PyEci: 6.8837d, 50.5250d, 0.3660km 2010-12-25 00:00:00.000000 UTC> >>> # Access is also possible via properties, e.g.: >>> eci.loc (-725.3304166274728, 3997.924210010933, 4900.402205553537) >>> eci.pydt = PyDateTime.from_mjd(55556.) >>> # or the update method: >>> eci.update(pydt, PyCoordGeodetic(0, 0, 0))
Constructor PyEci(PyDateTime pydt, PyCoordGeodetic geo_loc)
Attributes Summary
Geographic location (see also Class documentation).
Cartesian location (readonly, see also Class documentation).
Datetime (see also Class documentation).
Cartesian velocity (readonly, see also Class documentation).
Methods Summary
update
(self, PyDateTime pydt=None, ...)Update
PyEci
object.Attributes Documentation
- geo_loc#
Geographic location (see also Class documentation).
- loc#
Cartesian location (readonly, see also Class documentation).
- pydt#
Datetime (see also Class documentation).
- vel#
Cartesian velocity (readonly, see also Class documentation).
Methods Documentation
- update(self, PyDateTime pydt=None, PyCoordGeodetic geo_loc=None)#
Update
PyEci
object.- Parameters:
- pydt
PyDateTime
Date and time.
- geo_loc
PyCoordGeodetic
Geographic location.
- pydt