pymgp.satorb.ut2gmst#
- pymgp.satorb.ut2gmst(ut1, model='IAU-82')[source]#
Compute Greenwich Mean Siderial Time from UT1.
- Parameters:
- ut1array_like, float64 or datetime64 or str
Universal time datetime64 object, numpy parsable datetime string, or matplotlib sequential datenumber (days since ‘01-Jan-1970’)
- model{‘IAU-82’, ‘APPROXIMATE’}, optional
Model for ut to gmst conversion. Default is ‘IAU-82’ model.
- Returns:
- gmstarray_like
Greenwich Mean Siderial Time GMST [0-2pi rad] for UT1 (radians)
- omegaefloat
Rotation rate of the Earth (rev/day)
Examples
>>> ut2gmst('2012-01-04 00:00') (1.7979884328663978, 1.0027379093)
>>> ut2gmst(['2012-01-04 15:00:03.13', '2012-01-04 16:00:03']) (array([5.73595924, 5.99846593]), 1.0027379093)
Use matplotlib datenumbers as input (days since 1-jan-1970)
>>> datenum = np.datetime64('2012-01-04 15:00:03.13','ns').astype(np.int64)*1e-9/86400 >>> print(datenum) 15343.625036226851 >>> ut2gmst(datenum) (5.7359592379770525, 1.0027379093)
>>> ut2gmst(np.arange(datenum,datenum+1,.1)) (array([5.73595924, 0.08281274, 0.71285155, 1.34289036, 1.97292917, 2.60296798, 3.23300679, 3.8630456 , 4.49308441, 5.12312322]), 1.0027379093) >>> gmst0, omegae = ut2gmst(datenum) >>> gmst = (gmst0 + 2*np.pi*omegae*np.arange(0,1,.1) ) % ( 2*np.pi ) >>> gmst array([5.73595924, 0.08281274, 0.71285155, 1.34289036, 1.97292917, 2.60296798, 3.23300679, 3.8630456 , 4.49308441, 5.12312322])