NEXRCOMP added into new satellite.gini decoder restructure for 14.4.1
Former-commit-id: 8604678a0b
This commit is contained in:
parent
c30abec01b
commit
148d9664ca
7 changed files with 61 additions and 15 deletions
|
@ -97,6 +97,7 @@ import com.raytheon.uf.edex.plugin.satellite.gini.lookup.NumericLookupTable;
|
|||
* Nov 04, 2014 2714 bclement moved from satellite to satellite.gini
|
||||
* renamed from SatelliteDecoder to GiniDecoder
|
||||
* replaced database lookups with in memory tables
|
||||
* Mar 06, 2015 mjames Added support for UCAR NEXRCOMP GINI images
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -115,6 +116,10 @@ public class GiniSatelliteDecoder {
|
|||
|
||||
private static final int GINI_HEADER_SIZE = 512;
|
||||
|
||||
private static final int UCAR = 99;
|
||||
|
||||
private static final int UCAR_PRODUCT_OFFSET = 100;
|
||||
|
||||
private static final int INITIAL_READ = GINI_HEADER_SIZE + 128;
|
||||
|
||||
private final IPerformanceStatusHandler perfLog = PerformanceStatus
|
||||
|
@ -277,15 +282,6 @@ public class GiniSatelliteDecoder {
|
|||
// get the scanning mode
|
||||
int scanMode = byteBuffer.get(37);
|
||||
|
||||
// read the source
|
||||
byte sourceByte = byteBuffer.get(0);
|
||||
String source = sourceTable.lookup(sourceByte);
|
||||
if (source == null) {
|
||||
throw new UnrecognizedDataException(
|
||||
"Unknown satellite source id: " + sourceByte);
|
||||
}
|
||||
record.setSource(source);
|
||||
|
||||
// read the creating entity
|
||||
byte entityByte = byteBuffer.get(1);
|
||||
String entity = creatingEntityTable.lookup(entityByte);
|
||||
|
@ -295,8 +291,19 @@ public class GiniSatelliteDecoder {
|
|||
}
|
||||
record.setCreatingEntity(entity);
|
||||
|
||||
// read the source
|
||||
byte sourceByte = byteBuffer.get(0);
|
||||
if (entityByte == UCAR) sourceByte = (byte) (UCAR_PRODUCT_OFFSET+byteBuffer.get(0));
|
||||
String source = sourceTable.lookup(sourceByte);
|
||||
if (source == null) {
|
||||
throw new UnrecognizedDataException(
|
||||
"Unknown satellite source id: " + sourceByte);
|
||||
}
|
||||
record.setSource(source);
|
||||
|
||||
// read the sector ID
|
||||
byte sectorByte = byteBuffer.get(2);
|
||||
if (entityByte == UCAR) sectorByte = (byte) (UCAR_PRODUCT_OFFSET+byteBuffer.get(2));
|
||||
String sector = sectorIdTable.lookup(sectorByte);
|
||||
if (sector == null) {
|
||||
throw new UnrecognizedDataException(
|
||||
|
@ -305,7 +312,8 @@ public class GiniSatelliteDecoder {
|
|||
record.setSectorID(sector);
|
||||
|
||||
// read the physical element
|
||||
byte physByte = byteBuffer.get(3);
|
||||
int physByte = byteBuffer.get(3);
|
||||
if (entityByte == UCAR) physByte = (int) (UCAR_PRODUCT_OFFSET+byteBuffer.get(3));
|
||||
String physElem = physicalElementTable.lookup(physByte);
|
||||
if (physElem == null) {
|
||||
throw new UnrecognizedDataException(
|
||||
|
@ -316,12 +324,18 @@ public class GiniSatelliteDecoder {
|
|||
|
||||
// read the units
|
||||
String unit = unitTable.lookup(byteBuffer.get(3));
|
||||
if (entityByte == UCAR) {
|
||||
unit = unitTable.lookup((int) (UCAR_PRODUCT_OFFSET+byteBuffer.get(3)));
|
||||
}
|
||||
if (unit != null) {
|
||||
record.setUnits(unit);
|
||||
}
|
||||
|
||||
// read the century
|
||||
intValue = 1900 + byteBuffer.get(8);
|
||||
// correction for pngg2gini
|
||||
if (entityByte == UCAR && byteBuffer.get(8) < 100)
|
||||
intValue = 2000 + byteBuffer.get(8);
|
||||
calendar.set(Calendar.YEAR, intValue);
|
||||
|
||||
// read the month of the year
|
||||
|
|
|
@ -31,4 +31,5 @@
|
|||
Cell: (301) 787-9925
|
||||
-->
|
||||
<regex>TI[CGT]... ....</regex>
|
||||
<regex>.*NEXRCOMP.*</regex>
|
||||
</requestPatterns>
|
||||
|
|
|
@ -40,4 +40,5 @@
|
|||
<entry index="27" value="NOAA17" />
|
||||
<entry index="28" value="NOAA18" />
|
||||
<entry index="29" value="NOAA19" />
|
||||
<entry index="99" value="NEXRCOMP" />
|
||||
</numericLookupTable>
|
|
@ -83,4 +83,18 @@
|
|||
<entry index="62" value="Polar 3.9u" />
|
||||
<entry index="63" value="Polar 3.7u" />
|
||||
<entry index="64" value="Polar IR" />
|
||||
<entry index="118" value="OHA" />
|
||||
<entry index="119" value="DSP" />
|
||||
<entry index="120" value="DTA" />
|
||||
<entry index="121" value="DAA" />
|
||||
<entry index="122" value="N0C" />
|
||||
<entry index="123" value="N0X" />
|
||||
<entry index="124" value="N0Q" />
|
||||
<entry index="125" value="HHC" />
|
||||
<entry index="126" value="EET" />
|
||||
<entry index="127" value="N0R" />
|
||||
<entry index="128" value="DHR" />
|
||||
<entry index="129" value="DVL" />
|
||||
<entry index="130" value="N1P" />
|
||||
<entry index="131" value="NTP" />
|
||||
</numericLookupTable>
|
|
@ -30,4 +30,5 @@
|
|||
<entry index="8" value="Puerto Rico National" />
|
||||
<entry index="9" value="Supernational" />
|
||||
<entry index="10" value="NH Composite - Meteosat-GOES E-GOES W-GMS" />
|
||||
<entry index="101" value="CONUS" />
|
||||
</numericLookupTable>
|
|
@ -20,4 +20,5 @@
|
|||
-->
|
||||
<numericLookupTable id="sources">
|
||||
<entry index="1" value="NESDIS" />
|
||||
<entry index="101" value="UCAR" />
|
||||
</numericLookupTable>
|
|
@ -36,4 +36,18 @@
|
|||
<entry index="57" value="IRPixel" />
|
||||
<entry index="60" value="PercentOfNormalTPWPixel" />
|
||||
<entry index="64" value="IRPixel" />
|
||||
<entry index="118" value="IRPixel" />
|
||||
<entry index="119" value="IRPixel" />
|
||||
<entry index="120" value="IRPixel" />
|
||||
<entry index="121" value="IRPixel" />
|
||||
<entry index="122" value="IRPixel" />
|
||||
<entry index="123" value="IRPixel" />
|
||||
<entry index="124" value="IRPixel" />
|
||||
<entry index="125" value="IRPixel" />
|
||||
<entry index="126" value="IRPixel" />
|
||||
<entry index="127" value="IRPixel" />
|
||||
<entry index="128" value="IRPixel" />
|
||||
<entry index="129" value="IRPixel" />
|
||||
<entry index="130" value="IRPixel" />
|
||||
<entry index="131" value="IRPixel" />
|
||||
</numericLookupTable>
|
Loading…
Add table
Reference in a new issue