Esempio n. 1
0
def calcTg(date):

    jdut1 = jday(date.year, date.month, date.day, date.hour, date.minute,
                 date.second)
    Tg = _gstime(jdut1)

    return Tg
    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)
Esempio n. 3
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)
Esempio n. 4
0
def gstime_from_datetime(when_utc):
    timelist = list(when_utc.timetuple()[:6])
    timelist[5] = timelist[5] + when_utc.microsecond * 1e-6
    return _gstime(jday(*timelist))
Esempio n. 5
0
def gstime_from_datetime(when_utc):
    timetuple = when_utc.timetuple()[:6]
    return _gstime(jday(*timetuple))
Esempio n. 6
0
def gstime_from_datetime(when_utc):
    timetuple = timetuple_from_dt(when_utc)
    return _gstime(jday(*timetuple))