grs.pds.edr
Class PositionedEdrRecord

java.lang.Object
  |
  +--grs.pds.BasePdsRecord
        |
        +--grs.pds.TimeSeriesRecord
              |
              +--grs.pds.edr.PositionedEdrRecord
All Implemented Interfaces:
PdsRecord
Direct Known Subclasses:
GammaEdrRecord, HendEdrRecord, NsEdrRecord

public abstract class PositionedEdrRecord
extends TimeSeriesRecord

Contains data fields and methods that will be common to positioned records (gamma, ns, and hend). All positional info is computed at the time of the middle of the pixel interval. If pointing is 1, then SPICE kernel info was available to compute pointing information. If intersecting is 1, then the instrument was pointed at the planet.

Version:
$Revision: 1.4 $
Author:
$Author: guym $

Field Summary
 long ceb_time
           
 short day_index
          mars day of year
 double delta_theta
          pointing angle in degrees from
 RCoords instrboresight_mars
           
 byte intersecting
          1 = pointed at planet, 0 = not
 double latitude
           
 byte local_hour
          position of sun at sub-spacecraft point
 byte local_min
          position of sun at sub-spacecraft point
 double longitude
           
 double mars_sol
          solar longitude
 RCoords marspos_instr
           
 RCoords marsvel_instr
           
 int ody_orbit
           
 int orbit
           
 int pixel
           
 byte pointing
          1 = pointing data available, 0 = not
 long sc_ev_time
           
 long sc_recv_time
           
 double scalt
          spacecraft altitude
 RCoords scpos_inert
           
 RCoords scpos_mars
           
 RCoords scvel_inert
           
 RCoords subsc_mars
           
 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
PositionedEdrRecord()
           
 
Method Summary
 long getSCLK()
          Get the Date (time) of record.
 Date getUTC()
          Get the Date (time) of record.
 int prepareInsert(PreparedStatement pstmt)
          Bind the variables to a prepared statement.
 void readHeader(DataInputStream in)
          Read the positioning fields from a DataInputStream.
 void readHeader(ResultSet rs)
          Read the positioning fields from a ResultSet.
 int toStringArray(String[] array)
          Print data contained in this record.
 void writeTo(DataOutputStream out)
          Write positioned data fields to a DataOutputStream.
 
Methods inherited from class grs.pds.BasePdsRecord
endianSwapShort, toStringArray
 
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

sc_ev_time

public long sc_ev_time

ceb_time

public long ceb_time

utc

public Date utc

pixel

public int pixel

orbit

public int orbit

ody_orbit

public int ody_orbit

latitude

public double latitude

longitude

public double longitude

scpos_inert

public RCoords scpos_inert

scvel_inert

public RCoords scvel_inert

marspos_instr

public RCoords marspos_instr

marsvel_instr

public RCoords marsvel_instr

scpos_mars

public RCoords scpos_mars

instrboresight_mars

public RCoords instrboresight_mars

subsc_mars

public RCoords subsc_mars

scalt

public double scalt
spacecraft altitude


delta_theta

public double delta_theta
pointing angle in degrees from


mars_sol

public double mars_sol
solar longitude


pointing

public byte pointing
1 = pointing data available, 0 = not


intersecting

public byte intersecting
1 = pointed at planet, 0 = not


day_index

public short day_index
mars day of year


local_hour

public byte local_hour
position of sun at sub-spacecraft point


local_min

public byte local_min
position of sun at sub-spacecraft point

Constructor Detail

PositionedEdrRecord

public PositionedEdrRecord()
Method Detail

readHeader

public void readHeader(ResultSet rs)
                throws SQLException
Read the positioning fields from a ResultSet. The ResultSet will have been created by a subclass of this class.

Parameters:
rs - ResultSet to read from
Throws:
SQLException - Situation we don't know how to handle, such as unexpected null data.

readHeader

public void readHeader(DataInputStream in)
                throws IOException,
                       ParseException
Read the positioning fields from a DataInputStream.

Parameters:
in - Stream to read from
Throws:
IOException - Error reading from stream
ParseException - utc date from stream is in an invalid format.

writeTo

public void writeTo(DataOutputStream out)
             throws IOException
Write positioned data fields to a DataOutputStream.

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

prepareInsert

public int prepareInsert(PreparedStatement pstmt)
                  throws SQLException
Bind the variables to a prepared statement.

Specified by:
prepareInsert in class BasePdsRecord
Parameters:
pstmt - prepared statement
Returns:
number of columns bound
Throws:
SQLException - could not bind variables

getSCLK

public long getSCLK()
Get the Date (time) of record.

Specified by:
getSCLK in class TimeSeriesRecord
Returns:
ticks

getUTC

public Date getUTC()
Get the Date (time) of record.

Specified by:
getUTC in class TimeSeriesRecord
Returns:
Date

toStringArray

public int toStringArray(String[] array)
Print data contained in this record.

Returns:
number of columns placed in array.


2001 Mars Odyssey Gamma Ray Spectrometer Team