Clock - Zudokakikuto/OreCZML GitHub Wiki

This page describes the content of a CZMLSecondaryObject document. Please read CZMLSecondaryObject for the intern architecture of CZMLPrimaryObjects.

Clock

The clock is a subelement of the Header, it defines for example the time step or the time interval of the simulation.

Implements : CZMLSecondaryObject

Example :

"clock":{
      "interval":"2022-01-17T12:00:00Z/2022-01-17T13:00:00Z",
      "currentTime":"2022-01-17T12:00:00Z",
      "multiplier":60,
      "range":"LOOP_STOP",
      "step":"SYSTEM_CLOCK_MULTIPLIER"
    }

Properties

availability - TimeInterval : Interval of time where the simulation happens.

currentTime - JulianDate : Julian date when the simulation starts.

step - ClockStep : The interval of time defining how time passes by :

  • TICK_DEPENDENT - The current time is advanced by multiplier seconds each tick.
  • SYSTEM_CLOCK_MULTIPLIER - The current time is advanced by the amount of system time since the last tick, multiplied by multiplier.
  • SYSTEM_CLOCK - The clock is always set to the current system time.
  • default : SYSTEM_CLOCK_MULTIPLIER

multiplier - double :

  • When step is set to TICK_DEPENDENT, this is the number of seconds to advance each tick.
  • When step is set to SYSTEM_CLOCK_DEPENDENT, this is multiplied by the elapsed system time between ticks.
  • This value is ignored in SYSTEM_CLOCK mode.
  • default : 60.0

range - ClockRange : The behavior of a clock when its current time reaches its start or end time :

  • UNBOUNDED - The clock will continue advancing in the current direction.
  • CLAMPED - The clock will stop.
  • LOOP_STOP - When the end time is reached while advancing forward, the clock will jump to the start time, and when the start time is reached while advancing backward, the clock will stop.
  • default : LOOP_STOP

Build

The clock object can be build with :

  • An availability, a current time, a multiplier, a range, a step :
Clock clock = new Clock(availability, currentTime, multiplier, range, step);
```

* An [OEMFile](OEMFile) :
```java
Clock clock = new Clock(OEMfile);
```