Package gaiasky.util.gaia.time
Class TimeMediator
java.lang.Object
gaiasky.util.gaia.time.TimeMediator
A small class to convert between GaiaTime/TCB and OBMT transparently. Needed for the
attitude providers which support the retrieval of attitude in OBMT and GaiaTime/TCB.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected gaiasky.util.gaia.time.TimeMediator.TimeConverter -
Constructor Summary
ConstructorsConstructorDescriptionTimeMediator(TimeContext nat, TimeContext req) Construct a new TimeMediator with a given native and requestd time context -
Method Summary
Modifier and TypeMethodDescriptionlongconvert(long t) Convert a given time.static TimeMediatorgetTimeMediator(TimeContext nat, TimeContext req) Get an applicableTimeMediatorfor a given combination of time contexts.voidsetTimeContext(TimeContext nat, TimeContext req) Setup a converter according to a requested and native time context.
-
Field Details
-
converter
protected gaiasky.util.gaia.time.TimeMediator.TimeConverter converter
-
-
Constructor Details
-
TimeMediator
Construct a new TimeMediator with a given native and requestd time context- Parameters:
nat- native time contextreq- requested time context
-
-
Method Details
-
getTimeMediator
Get an applicableTimeMediatorfor a given combination of time contexts.- Parameters:
nat- native time contextreq- requested time context- Returns:
-
convert
public long convert(long t) Convert a given time.- Parameters:
t- time [ns] to convert- Returns:
- converted time
-
setTimeContext
Setup a converter according to a requested and native time context.- Parameters:
nat- native time contextreq- requested time context
-