satsim.time package

class satsim.time.TimeWrapper(other)

Bases: skyfield.timelib.Time

This class implements the __hash__ function for the Skyfield Time.

satsim.time.to_utc_list(t)

Convert a Skyfield Time object to UTC in array form.

Parameters

tTime, time to convert to UTC

Returns

A list with UTC values for year, month, day, hour, minutes, seconds

satsim.time.utc(year, month, day, hour, minute, seconds)

Generate a Skyfield Time object based on UTC time.

Parameters
  • yearint, UTC year

  • monthint, UTC month of year

  • dayint, UTC day of month

  • hourint, UTC hour

  • minuteint, UTC minute

  • secondsfloat, UTC seconds

Returns

A Skyfield Time object

satsim.time.utc_from_list(t_list, delta_sec=0)

Generate a Skyfield Time object based on UTC time in array form.

Parameters
  • t_listlist, UTC as [year, month, day, hour, minute, seconds]

  • delta_secfloat, seconds to add

Returns

A Skyfield Time object

satsim.time.utc_from_list_or_scalar(t, delta_sec=0, default_t=None)

Generate a Skyfield Time object based on a UTC time in array or scalar form. Scalar form requires default_t to be defined.

Parameters
  • tlist or float, UTC as [year, month, day, hour, minute, seconds] or delta seconds from default_t

  • delta_secfloat, seconds to add

  • default_tlist, UTC as [year, month, day, hour, minute, seconds], required if t is None or a scalar

Returns

A Skyfield Time object