예제 #1
0
 def _propagate_ecef(self, when_utc=None):
     """Return position and velocity in the given date using ECEF coordinate system."""
     position_eci, velocity_eci = self._propagate_eci(when_utc)
     gmst = gstime_from_datetime(when_utc)
     position_ecef = coordinate_systems.eci_to_ecef(position_eci, gmst)
     velocity_ecef = coordinate_systems.eci_to_ecef(velocity_eci, gmst)
     return position_ecef, velocity_ecef
예제 #2
0
    def _propagate_ecef(self, when_utc):
        """Return position and velocity in the given date using ECEF coordinate system."""
        timetuple = (when_utc.year, when_utc.month, when_utc.day,
                     when_utc.hour, when_utc.minute, when_utc.second)

        position_eci, velocity_eci = self.propagator.propagate(*timetuple)
        gmst = _gstime(jday(*timetuple))
        position_ecef = coordinate_systems.eci_to_ecef(position_eci, gmst)
        velocity_ecef = coordinate_systems.eci_to_ecef(velocity_eci, gmst)
        return (position_ecef, velocity_ecef)
예제 #3
0
    def _propagate_only_position_ecef(self, when_utc):
        """Return position in the given date using ECEF coordinate system."""
        jd, fr = jday_from_datetime(when_utc)
        status, position_eci, _ = self._propagator.sgp4(jd, fr)
        if status != 0:
            raise PropagationError(SGP4_ERRORS[status])

        gmst = gstime(jd + fr)
        return coordinate_systems.eci_to_ecef(position_eci, gmst)
예제 #4
0
 def get_only_position_jd(self, jd: float) -> np.ndarray:
     """
     Get satellite position in ECEF coordinates [km]
     """
     status, position_eci, _ = self._propagator.sgp4(jd, 0.0)
     if status != 0:
         raise PropagationError(SGP4_ERRORS[status])
     gmst = gstime(jd)
     pos_tuple = eci_to_ecef(position_eci, gmst)
     return np.array(pos_tuple)
예제 #5
0
 def _propagate_only_position_ecef(self, timetuple):
     """Return position in the given date using ECEF coordinate system."""
     position_eci, _ = self.propagator.propagate(*timetuple)
     gmst = _gstime(jday(*timetuple))
     return coordinate_systems.eci_to_ecef(position_eci, gmst)