Terrenus HRPT v2.2

terrenus.telemetry
Class CMA1A5HRPTStream

java.lang.Object
  extended by terrenus.telemetry.AbstractTelemetryStream
      extended by terrenus.telemetry.HRPTStream
          extended by terrenus.telemetry.CMA1A5HRPTStream
All Implemented Interfaces:
TelemetryStream

public class CMA1A5HRPTStream
extends HRPTStream

The CMA1A5HRPTStream class reads China Meteorological Administration (CMA) 1A5 format HRPT data:

The 21980 byte header contains the following values in little endian byte order:

Byte offset Java type Description
0 short Satellite ID
2 short Last two digits of starting year
4 int Starting millisecond
8 short Starting day
10 short Last two digits of ending year
12 int Ending millisecond
16 short Ending day
18 short Good scan line count
20 short Total record count (scan line count plus header)
22 short Number of errors
24 short Error ratio
26 short Reserved block #1
28 short Time error
30 short Missing scan lines
32 short Ramp slope analysis result
34 short Reserved block #2
36 float[20] Calibration coefficients for 5 channels:
  • Slope
  • Intercept
  • Standard deviation in slope
  • Standard deviation in intercept
116 short Reserved block #3
118 short Orbit number
120 double[7] Orbital element values:
  • Epoch time
  • Orbital semi-major axis
  • Orbital ecentricity
  • Orbital inclination
  • Right ascension of ascending node
  • Argument of perigee
  • ???
176 short Direction (0 = descending, 1 = ascending)
178 short Orbit type
180 short Start orbit number
182 short[5] Reserved block #4
192 double[3] Satellite attitude: roll, pitch, yaw
216 short[4] Reserved block #5
224 float[8] Latitude and longitude of 4 corner points
256 double Start time in seconds since Jan 1 1980 00:00 UTC
264 double End time in seconds since Jan 1 1980 00:00 UTC
272 short Grid flag
274 short Grid starting latitude
276 short Grid starting longitude
278 short[10851] Reserved block #6

Each HRPT minor frame header contains the following values in little endian byte order:

Byte offset Java type Description
0 short Scan line number
2 short Year
4 int Millisecond
8 short Day
10 short Reserved block #1
12 short Quality flag
14 short Reserved block #2
16 float[10] Slope and intercept for 5 channels
56 float[51] Solar zenith angle for 51 points in degrees
260 float[102] Latitude and longitude for 51 points in degrees
668 short[103] First 103 words of HRPT header
874 float[51] Satellite zenith angle for 51 points in degrees
1078 float[51] Relative azimuth angle for 51 points in degrees
1282 short[109] Reserved block #3


Field Summary
 
Fields inherited from class terrenus.telemetry.HRPTStream
AUX_SYNC_BLOCK, BLOCK_LENGTHS, BLOCK_OFFSETS, EARTH_BLOCK, FRAME_SYNC_BLOCK, ID_BLOCK, INTERNAL_TARGET_BLOCK, SPACE_BLOCK, SPARE_BLOCK, SYNC_DELTA_BLOCK, TELEMETRY_BLOCK, TIME_CODE_BLOCK, TIP_BLOCK
 
Fields inherited from class terrenus.telemetry.AbstractTelemetryStream
input
 
Constructor Summary
CMA1A5HRPTStream(java.lang.String fileName)
          Creates a new stream using the specified file as input.
 
Method Summary
 java.nio.ByteBuffer getBlock(int frame, int block)
          Gets the data for the specified block.
protected  int getBlockPosition(int block)
          Gets the position of a block within a frame.
 java.lang.String getFormat()
          Gets a description of the underlying data format.
 
Methods inherited from class terrenus.telemetry.HRPTStream
checkFrame, getBlockCount, getBlockLength, getDecoder
 
Methods inherited from class terrenus.telemetry.AbstractTelemetryStream
checkStream, getDayCount, getFrameCount, getFramePosition, getInputBuffer, getYear, initStream, main, setDayCount, setYear
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMA1A5HRPTStream

public CMA1A5HRPTStream(java.lang.String fileName)
                 throws java.io.IOException
Creates a new stream using the specified file as input.

Throws:
java.io.IOException
Method Detail

getFormat

public java.lang.String getFormat()
Description copied from interface: TelemetryStream
Gets a description of the underlying data format.


getBlockPosition

protected int getBlockPosition(int block)
Description copied from class: AbstractTelemetryStream
Gets the position of a block within a frame.

Overrides:
getBlockPosition in class HRPTStream
Parameters:
block - the block in question.
Returns:
the position in bytes, relative to the end of any frame header data.

getBlock

public java.nio.ByteBuffer getBlock(int frame,
                                    int block)
Description copied from interface: TelemetryStream
Gets the data for the specified block.

Specified by:
getBlock in interface TelemetryStream
Overrides:
getBlock in class AbstractTelemetryStream
Parameters:
frame - the frame to get data.
block - the block number to get data.
Returns:
the block data buffer.

Terrenus HRPT v2.2