OrbPro2 a Cesium distribution

EphemerisRingBuffer

new Cesium.EphemerisRingBuffer(capacity, stateVectorSize)

A fixed-capacity ring buffer for ephemeris state vectors. Stores time-tagged position (and optionally velocity) samples in contiguous Float64Arrays for cache-efficient access. When the buffer is full, new samples overwrite the oldest data.
Name Type Default Description
capacity number Maximum number of samples.
stateVectorSize number 3 optional Doubles per sample (3=pos, 6=pos+vel).

Members

Maximum number of samples this buffer can hold.
Number of valid samples currently in the buffer.
Doubles per sample.

Methods

appendSamples(times, data, sampleCount)

Append new samples to the ring buffer.
Name Type Description
times Float64Array Julian day numbers for each sample.
data Float64Array State vectors, flat: `[x0,y0,z0,(vx0,vy0,vz0,)...]`
sampleCount number optional Number of samples (defaults to times.length).

getTimeRange(result)object|undefined

Get the valid time range of the buffer.
Name Type Description
result object optional Object to store {startDays, endDays}.
Returns:
The time range, or undefined if empty.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.