gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UnitTest
Class CheckDiary

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

public class CheckDiary
extends java.lang.Object

Open an RDR file and locate the Spacecraft Diary granules. Compare the times stored in the granules with the times in its RawApplicationPackets through the reference in the granule. If the granule times do not encapsulate the RawApplicationPacket, issue and error message.


Constructor Summary
CheckDiary()
           
 
Method Summary
private  Packet getFirstPacket(RawApplicationPackets rap)
           
private  PDSDate getFirstPacketTime(RawApplicationPackets rap)
           
private  Packet getLastPacket(RawApplicationPackets rap)
           
private  PDSDate getLastPacketTime(RawApplicationPackets rap)
           
private  void granuleError(java.lang.String which, PDSDate begObs, PDSDate firstPktTime, PDSDate endObs, PDSDate lastPktTime, Granule g)
           
private  void granulePrint(Granule outside, PDSDate firstPktTime, Granule inside, PDSDate lastPktTime)
           
private  void granuleTime(Granule outside, Granule inside)
          Check that the outside granule encapsulates the inside granule in time!
private  java.lang.String hdrToString(Packet packet)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckDiary

public CheckDiary()
Method Detail

granuleTime

private void granuleTime(Granule outside,
                         Granule inside)
                  throws RtStpsException
Check that the outside granule encapsulates the inside granule in time!

Parameters:
outside - probably the spacecraft diary
inside - probably one of the other sensors like VIIRS, CrIS or ATMS
Throws:
RtStpsException

granuleError

private void granuleError(java.lang.String which,
                          PDSDate begObs,
                          PDSDate firstPktTime,
                          PDSDate endObs,
                          PDSDate lastPktTime,
                          Granule g)

granulePrint

private void granulePrint(Granule outside,
                          PDSDate firstPktTime,
                          Granule inside,
                          PDSDate lastPktTime)
                   throws RtStpsException
Throws:
RtStpsException

hdrToString

private java.lang.String hdrToString(Packet packet)

getLastPacket

private Packet getLastPacket(RawApplicationPackets rap)
                      throws RtStpsException
Throws:
RtStpsException

getFirstPacket

private Packet getFirstPacket(RawApplicationPackets rap)
                       throws RtStpsException
Throws:
RtStpsException

getLastPacketTime

private PDSDate getLastPacketTime(RawApplicationPackets rap)
                           throws RtStpsException
Throws:
RtStpsException

getFirstPacketTime

private PDSDate getFirstPacketTime(RawApplicationPackets rap)
                            throws RtStpsException
Throws:
RtStpsException

main

public static void main(java.lang.String[] args)
Parameters:
args - the RDR HDF file