grs.pds.dhd
Class HendDerivedRecord

java.lang.Object
  |
  +--grs.pds.BasePdsRecord
        |
        +--grs.pds.TimeSeriesRecord
              |
              +--grs.pds.dhd.HendDerivedRecord
All Implemented Interfaces:
PdsRecord

public class HendDerivedRecord
extends TimeSeriesRecord

DHD: Derived HEND Data.

Author:
guym

Field Summary
 float latitude
           
 float ld_adjusted_counts
           
 float ld_background
           
 float ld_raw_counts
           
 float longitude
           
 float mars_sol
           
 float md_adjusted_counts
           
 float md_background
           
 float md_raw_counts
           
 float pixel_duration
           
 float sc_high_adjusted_counts
           
 float sc_high_background
           
 float sc_high_raw_counts
           
 float sc_low_adjusted_counts
           
 float sc_low_background
           
 float sc_low_raw_counts
           
 long sc_recv_time
           
 float sd_adjusted_counts
           
 float sd_background
           
 float sd_raw_counts
           
 byte sun_activity
           
 Date utc
           
 
Fields inherited from class grs.pds.BasePdsRecord
PdsTimeFormat
 
Fields inherited from interface grs.pds.PdsRecord
GAMMA_CHANNELS, int10, int12, int2, int3, logger, MESSAGE_LENGTH, NS_MAX_EVENTS, PEF_COMMANDS, prec10, prec12, prec13, prec14, prec15, prec16, prec17, prec5, prec6, prec7, PROFILE_LENGTH, PROFILE_SIZE, PULSER_CHANNELS, QUERY_DATE_FMT, SC_ID
 
Constructor Summary
HendDerivedRecord(DataInputStream in)
          Read DHD record from binary stream.
HendDerivedRecord(ResultSet rs)
          Create a DHD record from a database ResultSet.
 
Method Summary
static String[] createInsertString(String schema)
          Create the SQL to insert DHD records into the PDS schema.
static String[] createSelectString(String schema)
          Create the SQL to fetch DND records.
 long getSCLK()
          The time of this record.
 Date getUTC()
          The time of this record.
static void main(String[] args)
          Demonstrates use of this class to parse a DHD file.
 int prepareInsert(PreparedStatement pstmt)
          Bind values to the insert statement.
 String[] toStringArray()
          Fetch this record as an array of strings.
 void writeTo(DataOutputStream out)
          Write this record to a stream in the format specified in the label.
 
Methods inherited from class grs.pds.BasePdsRecord
endianSwapShort
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sc_recv_time

public long sc_recv_time

utc

public Date utc

sun_activity

public byte sun_activity

latitude

public float latitude

longitude

public float longitude

mars_sol

public float mars_sol

pixel_duration

public float pixel_duration

sd_background

public float sd_background

md_background

public float md_background

ld_background

public float ld_background

sc_low_background

public float sc_low_background

sc_high_background

public float sc_high_background

sd_raw_counts

public float sd_raw_counts

md_raw_counts

public float md_raw_counts

ld_raw_counts

public float ld_raw_counts

sc_low_raw_counts

public float sc_low_raw_counts

sc_high_raw_counts

public float sc_high_raw_counts

sd_adjusted_counts

public float sd_adjusted_counts

md_adjusted_counts

public float md_adjusted_counts

ld_adjusted_counts

public float ld_adjusted_counts

sc_low_adjusted_counts

public float sc_low_adjusted_counts

sc_high_adjusted_counts

public float sc_high_adjusted_counts
Constructor Detail

HendDerivedRecord

public HendDerivedRecord(ResultSet rs)
                  throws SQLException
Create a DHD record from a database ResultSet.

Parameters:
rs - ResultSet from query.
Throws:
SQLException - Error reading from ResultSet.

HendDerivedRecord

public HendDerivedRecord(DataInputStream in)
                  throws IOException,
                         ParseException
Read DHD record from binary stream.

Parameters:
in - Stream in DHD format.
Throws:
IOException - Error reading from stream.
ParseException - Unparseable date (utc)
Method Detail

createSelectString

public static String[] createSelectString(String schema)
Create the SQL to fetch DND records.

Parameters:
schema -
Returns:

createInsertString

public static String[] createInsertString(String schema)
Create the SQL to insert DHD records into the PDS schema.

Parameters:
schema - DB schema to use.
Returns:
SQL insert strings.

getUTC

public Date getUTC()
The time of this record.

Specified by:
getUTC in class TimeSeriesRecord
Returns:
utc UNIX time

writeTo

public void writeTo(DataOutputStream out)
             throws IOException
Write this record to a stream in the format specified in the label.

Specified by:
writeTo in class BasePdsRecord
Parameters:
out - Data stream to write to.
Throws:
IOException - Error writing to stream.

prepareInsert

public int prepareInsert(PreparedStatement pstmt)
                  throws SQLException
Bind values to the insert statement.

Specified by:
prepareInsert in class BasePdsRecord
Parameters:
pstmt -
Returns:
Number of values bound.
Throws:
SQLException

getSCLK

public long getSCLK()
The time of this record.

Specified by:
getSCLK in class TimeSeriesRecord
Returns:
ticks

toStringArray

public String[] toStringArray()
Fetch this record as an array of strings.

Specified by:
toStringArray in class BasePdsRecord
Returns:
Single row, one value per column.

main

public static final void main(String[] args)
                       throws Exception
Demonstrates use of this class to parse a DHD file.

Parameters:
args - Filename
Exception


2001 Mars Odyssey Gamma Ray Spectrometer Team