terrenus.telemetry
Class CMA1A5CHRPTStream
java.lang.Object
terrenus.telemetry.AbstractTelemetryStream
terrenus.telemetry.CHRPTStream
terrenus.telemetry.CMA1A5CHRPTStream
- All Implemented Interfaces:
- TelemetryStream
public class CMA1A5CHRPTStream
- extends CHRPTStream
The CMA1A5CHRPTStream
class reads China Meteorological
Administration (CMA) 1A5 format CHRPT data:
- 44360 byte header
- 44360 bytes per CHRPT frame composed of 3200 byte frame
header and 40960 byte channel data as 20480 16-bit little endian
values
The 44360 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[40] |
Calibration coefficients for 10 channels:
- Slope
- Intercept
- Standard deviation in slope
- Standard deviation in intercept
|
196 |
short |
Reserved block #3 |
198 |
short |
Orbit number |
200 |
double[7] |
Orbital element values:
- Epoch time
- Orbital semi-major axis
- Orbital ecentricity
- Orbital inclination
- Right ascension of ascending node
- Argument of perigee
- ???
|
256 |
short |
Direction (0 = descending, 1 = ascending) |
258 |
short |
Orbit type |
260 |
short |
Start orbit number |
262 |
short[5] |
Reserved block #4 |
272 |
double[3] |
Satellite attitude: roll, pitch, yaw |
296 |
short[5] |
Reserved block #5 |
306 |
float[8] |
Latitude and longitude of 4 corner points |
338 |
double |
Start time in seconds since Jan 1 1980 00:00 UTC |
346 |
double |
End time in seconds since Jan 1 1980 00:00 UTC |
354 |
short |
Grid flag |
356 |
short |
Grid starting latitude |
358 |
short |
Grid starting longitude |
360 |
short[22000] |
Reserved block #6 |
Each CHRPT 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[20] |
Slope and intercept for 10 channels |
96 |
float[51] |
Solar zenith angle for 51 points in degrees |
300 |
float[102] |
Latitude and longitude for 51 points in degrees |
708 |
short[193] |
First 193 words of CHRPT frame data |
1094 |
short |
??? |
1096 |
float[51] |
Satellite zenith angle for 51 points in degrees |
1300 |
float[51] |
Relative azimuth angle for 51 points in degrees |
1504 |
short[848] |
Reserved block #3 |
Fields inherited from class terrenus.telemetry.CHRPTStream |
AUX_SYNC_BLOCK, BLOCK_LENGTHS, BLOCK_OFFSETS, EARTH_BLOCK, FRAME_SYNC_BLOCK, ID_BLOCK, INTERNAL_TARGET_BLOCK, SPACE_BLOCK, SPARE_BLOCK, TELEMETRY_BLOCK, TIME_CODE_BLOCK |
Constructor Summary |
CMA1A5CHRPTStream(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. |
int |
getDayCount(int frame)
Gets the day count for the specified frame. |
java.lang.String |
getFormat()
Gets a description of the underlying data format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CMA1A5CHRPTStream
public CMA1A5CHRPTStream(java.lang.String fileName)
throws java.io.IOException
- Creates a new stream using the specified file as input.
- Throws:
java.io.IOException
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 CHRPTStream
- 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.
getDayCount
public int getDayCount(int frame)
throws java.io.IOException
- Description copied from class:
CHRPTStream
- Gets the day count for the specified frame. The day count is not
available from the CHRPT telemetry stream from the spacecraft
because the bits in the time code where the day count are
supposed to be are zero filled.
- Specified by:
getDayCount
in class CHRPTStream
- Throws:
java.io.IOException