public class Model
extends java.lang.Object
The model uses a list of SsrInputs
, representing instrument
observations, a list of SsrDrains
, representing MRO
downlink events, and an initial condition. Its compute
method produces a list of SsrStates
, representing discrete samples in time of the number of
bits stored in the SSR.
Computation starts with the earliest SSR input or the earliest SSR drain,
whichever is earlier; it starts at the time indicated by the initial SSR
state if the initial state's SsrState.getDateMillis()
value is not
Long.MIN_VALUE
. It ends with the latest SSR input or the latest SSR
drain, whichever is later. (If the initial SSR state is later than either of
these, then the computation immediately ends.)
The algorithm does not use time steps. Rather, it identifies four distinct events:
SsrInput rate
.
SsrDrain rate
.
SsrInput rate
- SsrDrain rate
.
The algorithm further assumes that the rates are constant between events. It
thus only performs the calculation at the start and end of each of these
events, and the output collection of SsrStates
consists
only of these points.
The Data Slacker model is a good approximation of the HiRISE SSR usage, but it differs from the MRO Project-supplied data volume tool, Data Tracker, in two important ways.
First, it ignores the SSR raw space. It models data as being written immediately to framed space, whereas in reality (and in the Data Tracker tool), data are first written to raw space. The data are then moved to framed, along with headers and engineering data, but this transfer is not instantaneous. Data Slacker thus shows data accumulating in framed space slightly earlier than Data Tracker, and it shows an accumulated data volume slightly smaller than Data Tracker.
Note that although the Data Slacker model is constructed with a rawPartitionBits parameter and a framedPartitionBits parameter, the raw parameter is unused. The framed parameter is used only in assigning a label to each output SSR state.
Second, the Data Slacker model is single-instrument only. It has no provision for the complex interplay between the MRO instruments. Whatever downlink allocation is assigned to HiRISE is the maximum allocation modeled. In reality, if an instrument does not use its complete allocation on a particular downlink event, the remainder of that allocation is divided up amongst the instruments that are using theirs. Since an instrument's allocation is a minimum guarantee, the Data Slacker output is essentially also a minimum; in this respect, it behaves like a Data Tracker single-instrument run, with the provisions noted above regarding raw space.
There exists a third key difference: The Data Slacker model ignores the distinction between X-band downlink and Ka-band downlink. This difference has no real effect, however, since the MRO Ka-band radio is disabled and there is no Ka-band downlink.
Original Python code by Ross Beyer of NASA Ames.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Constructor and Description |
---|
Model(double rawPartitionBits,
double framedPartitionBits)
Creates a new Data Slacker model with the indicated raw and framed partition
sizes in bits.
|
Model(long rawPartitionBits,
long framedPartitionBits)
Creates a new Data Slacker model with the indicated raw and framed partition
sizes in bits.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<SsrState> |
compute(java.util.List<SsrInput> inputs,
java.util.List<SsrDrain> drains,
SsrState initialState)
Computes the MRO SSR usage over a time span defined by the input parameters.
|
long |
getFramedPartitionBits()
Gets the framed partition size in bits.
|
long |
getRawPartitionBits()
Gets the raw partition size in bits.
|
public static final java.lang.String ID
public Model(double rawPartitionBits, double framedPartitionBits)
rawPartitionBits
- the raw partition size in bits.framedPartitionBits
- the framed partition size in bits.public Model(long rawPartitionBits, long framedPartitionBits)
rawPartitionBits
- the raw partition size in bits.framedPartitionBits
- the framed partition size in bits.public long getRawPartitionBits()
public long getFramedPartitionBits()
SsrStates
in
the compute
method.public java.util.List<SsrState> compute(java.util.List<SsrInput> inputs, java.util.List<SsrDrain> drains, SsrState initialState)
inputs
- the SSR inputs, e.g., instrument observations.drains
- the SSR drains, e.g., downlink events.initialState
- the initial state of the SSR.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona