HiRISE

HiRISE.HiPlan.Data_Slacker
Class Model

java.lang.Object
  extended by HiRISE.HiPlan.Data_Slacker.Model

public class Model
extends Object

A model representing an instrument's use of the MRO SSR over time. HiRISE is the nominal instrument, but it could be used for other MRO instruments instead.

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:

  1. An observation is being written (an SSR input event), in which case the SSR usage is increasing at the SsrInput rate.
  2. Data are being downlinked (an SSR drain event), in which case the SSR usage is decreasing at the SsrDrain rate.
  3. An observation is being written while data are being downlinked, in which case the SSR usage is changing at the SsrInput rate - SsrDrain rate.
  4. Neither an input nor a drain is taking place, in which case the SSR usage is unchanging.

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.

Version:
1.6
Author:
Christian Schaller - UA/PIRL

Field Summary
static String ID
          Class identification name with source code version and date.
 
Constructor Summary
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.
 
Method Summary
 List<SsrState> compute(List<SsrInput> inputs, 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values
Constructor Detail

Model

public Model(double rawPartitionBits,
             double framedPartitionBits)
Creates a new Data Slacker model with the indicated raw and framed partition sizes in bits.

Parameters:
rawPartitionBits - the raw partition size in bits.
framedPartitionBits - the framed partition size in bits.

Model

public Model(long rawPartitionBits,
             long framedPartitionBits)
Creates a new Data Slacker model with the indicated raw and framed partition sizes in bits.

Parameters:
rawPartitionBits - the raw partition size in bits.
framedPartitionBits - the framed partition size in bits.
Method Detail

getRawPartitionBits

public long getRawPartitionBits()
Gets the raw partition size in bits. Note that the model does not actually use this value.

Returns:
the raw partition size in bits.

getFramedPartitionBits

public long getFramedPartitionBits()
Gets the framed partition size in bits. Note that the model uses this value only when generating a label for individual SsrStates in the compute method.

Returns:
the framed partition size in bits.

compute

public List<SsrState> compute(List<SsrInput> inputs,
                              List<SsrDrain> drains,
                              SsrState initialState)
Computes the MRO SSR usage over a time span defined by the input parameters. The input lists do not need to be pre-sorted; this method sorts them prior to computation.

Parameters:
inputs - the SSR inputs, e.g., instrument observations.
drains - the SSR drains, e.g., downlink events.
initialState - the initial state of the SSR.
Returns:
a sorted collection of SSR states over the time span defined by the input parameters.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona