satellite decoder NEXRCOMP work, change int back to byte, shift index by 50 instead of 100
Former-commit-id: a3c747d55b
This commit is contained in:
parent
5414988819
commit
8c6594a26c
2 changed files with 26 additions and 26 deletions
|
@ -81,18 +81,18 @@ INSERT INTO awips.satellite_physical_elements VALUES (61,'Polar Vis');
|
|||
INSERT INTO awips.satellite_physical_elements VALUES (62,'Polar 3.9u');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (63,'Polar 3.7u');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (64,'Polar IR');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (118,'OHA One Hour Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (119,'DSP Storm Total Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (120,'DTA Storm Total Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (121,'DAA');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (122,'N0C');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (123,'N0X');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (124,'N0Q');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (125,'HHC');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (126,'EET');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (127,'N0R');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (128,'DHR');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (129,'DVL');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (130,'N1P');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (131,'NTP');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (132,'WTF');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (68,'OHA One Hour Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (69,'DSP Storm Total Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (70,'DTA Storm Total Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (71,'DAA');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (72,'N0C');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (73,'N0X');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (74,'N0Q 265-level Level 1 Base Reflectivity');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (75,'HHC Hybrid Hydrometeor Classification');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (76,'EET Enhanced Echo Tops');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (77,'N0R 16-level Base Reflectivity');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (78,'DHR Digital Hybrid Reflectivity');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (79,'DVL Digital VIL');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (80,'N1P One Hour Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (81,'NTP Storm Total Precipitation');
|
||||
INSERT INTO awips.satellite_physical_elements VALUES (82,'WTF');
|
||||
|
|
|
@ -212,7 +212,11 @@ public class SatelliteDecoder {
|
|||
|
||||
// read the physical element
|
||||
byte physByte = byteBuffer.get(3);
|
||||
if (entityByte == 99) physByte = (byte) (100+byteBuffer.get(3));
|
||||
/* 50 here because of byte limit +127, so NEXRCOMP
|
||||
* products start at 68 in satellite_physical_elements
|
||||
* - can't change to int, must keep it byte because of ISpatialEnabled in viz.rsc??
|
||||
*/
|
||||
if (entityByte == 99) physByte = (byte) (50+byteBuffer.get(3));
|
||||
|
||||
SatellitePhysicalElement physElem = dao
|
||||
.getPhysicalElement(physByte);
|
||||
|
@ -222,26 +226,22 @@ public class SatelliteDecoder {
|
|||
+ physByte);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
record.setPhysicalElement(physElem.getElementName());
|
||||
|
||||
// read the units
|
||||
SatelliteUnit unit = dao.getUnit(byteBuffer.get(3));
|
||||
if (entityByte == 99) {
|
||||
SatelliteUnit unit = dao.getUnit((byte) (100+byteBuffer.get(3)));
|
||||
} else {
|
||||
SatelliteUnit unit = dao.getUnit(byteBuffer.get(3));
|
||||
}
|
||||
unit = dao.getUnit((int) (100+byteBuffer.get(3)));
|
||||
}
|
||||
if (unit != null) {
|
||||
record.setUnits(unit.getUnitName());
|
||||
}
|
||||
|
||||
// read the century
|
||||
intValue = 1900 + byteBuffer.get(8);
|
||||
if (byteBuffer.get(8) < 100) {
|
||||
intValue = 2000 + byteBuffer.get(8);
|
||||
}
|
||||
if (byteBuffer.get(8) < 100) {
|
||||
intValue = 2000 + byteBuffer.get(8);
|
||||
}
|
||||
calendar.set(Calendar.YEAR, intValue);
|
||||
|
||||
// read the month of the year
|
||||
|
|
Loading…
Add table
Reference in a new issue