gov.nasa.gsfc.drl.rtstps.core.output.hdf5
Class GranuleId

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.GranuleId

public class GranuleId
extends java.lang.Object

A Granule identifier is a way of calculating a unique identifier for the IDPS system. It is specified as part of RDR attributes for granules in the specifications. This implements the formula. One item the firstAscendingNodeAfterLaunch is currenlty not known.


Field Summary
static PDSDate firstAscendingNodeAfterLaunch
           
private  java.lang.String name
           
 
Constructor Summary
GranuleId(SpacecraftId spacecraftId, long pktObservationTime, long firstAscendingNodeAfterLaunch, long granuleSizeInTime)
          Build a granule ID from various inputs, most importantly the times are in 64-bit quantities
GranuleId(SpacecraftId spacecraftId, PDSDate pktObservationTime, PDSDate firstAscendingNodeAfterLaunch, long granuleSizeInTime)
          Build a granuleId from various inputs
GranuleId(java.lang.String granuleIdStr)
          Use only for the case of reading the ID from the attributes in an HDF file
 
Method Summary
private  long granuleIDValue(long pktObservationTime, long firstAscendingNodeAfterLaunch, long granuleSizeInTime)
          This implements the formula, taking from the JPSS documentation
private  long granuleIDValue(PDSDate pktObservationTime, PDSDate firstAscendingNodeAfterLaunch, long granuleSizeInTime)
          This implements the formula, taking from the JPSS documentation but uses PDSDate as inputs
 java.lang.String toString()
          Return the GranuleId in a String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

firstAscendingNodeAfterLaunch

public static PDSDate firstAscendingNodeAfterLaunch
Constructor Detail

GranuleId

public GranuleId(java.lang.String granuleIdStr)
Use only for the case of reading the ID from the attributes in an HDF file

Parameters:
granuleIdStr -

GranuleId

public GranuleId(SpacecraftId spacecraftId,
                 PDSDate pktObservationTime,
                 PDSDate firstAscendingNodeAfterLaunch,
                 long granuleSizeInTime)
Build a granuleId from various inputs

Parameters:
spacecraftId - the spacecraft identifier
pktObservationTime - the observation time of the packet
firstAscendingNodeAfterLaunch - the first ascending now after launch (currently not known)
granuleSizeInTime - the granule size in time, this would be time span from first and last packets in the granule in microseconds

GranuleId

public GranuleId(SpacecraftId spacecraftId,
                 long pktObservationTime,
                 long firstAscendingNodeAfterLaunch,
                 long granuleSizeInTime)
Build a granule ID from various inputs, most importantly the times are in 64-bit quantities

Parameters:
spacecraftId - the spacecraft identifier
pktObservationTime - the packet observation time in microseconds
firstAscendingNodeAfterLaunch - the first ascending node after launch (currently unknown)
granuleSizeInTime - the granule size in time (microseconds)
Method Detail

granuleIDValue

private long granuleIDValue(long pktObservationTime,
                            long firstAscendingNodeAfterLaunch,
                            long granuleSizeInTime)
This implements the formula, taking from the JPSS documentation

Parameters:
pktObservationTime - the packet observation time in microseconds
firstAscendingNodeAfterLaunch - the first ascending node after launch (currently unknown)
granuleSizeInTime - the first ascending node after launch (currently unknown)
Returns:
the calculated identifier as an long

granuleIDValue

private long granuleIDValue(PDSDate pktObservationTime,
                            PDSDate firstAscendingNodeAfterLaunch,
                            long granuleSizeInTime)
This implements the formula, taking from the JPSS documentation but uses PDSDate as inputs

Parameters:
pktObservationTime - the packet observation time as a PDSDate
firstAscendingNodeAfterLaunch - the first ascending node after launch (currently unknown) as a PDSDate
granuleSizeInTime - the first ascending node after launch (currently unknown)
Returns:
the calculated identifier as an long

toString

public java.lang.String toString()
Return the GranuleId in a String

Overrides:
toString in class java.lang.Object
Returns:
a string with the granule identifier