VLab Issue #4464 - DR_17214 RADAR: NEXRAD Unit Status display problem due to the GSM change; fixes #4464
Change-Id: I0ca330e385000e04ef21142e75adfc55d4615a89 Former-commit-id:3ffac397db
[formerly3ffac397db
[formerly 288dc7c439995a8ab48680832b63f7d6974885b4]] Former-commit-id:a2a2a8cdf9
Former-commit-id:0785965b62
This commit is contained in:
parent
1339b41cb5
commit
a7a47a11ca
2 changed files with 58 additions and 29 deletions
|
@ -71,7 +71,9 @@ import com.raytheon.viz.awipstools.common.StormTrackData;
|
|||
* Feb 16, 2009 mnash Initial creation
|
||||
* 03/07/2012 DR 14660 D. Friedman Added time-based getSTIData* functions.
|
||||
* 03/01/2013 DR 15496 zwang Handle the expanded GSM
|
||||
* Correct some status according to B14 ICD
|
||||
* Correct some status according to B14 ICD
|
||||
* 08/20/2014 DR17214 zwang Report more status for VCP supplemental Info
|
||||
* according to RPG B16 ICD
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -178,7 +180,7 @@ public class RadarHelper {
|
|||
"RDA 1", "RDA 2" };
|
||||
|
||||
public static final String[] vcpInfoStr = { "AVSET",
|
||||
"SAILS", "Site-Specific VCP" };
|
||||
" SAILS", " Site-Specific VCP", " RxRN", " CBT" };
|
||||
|
||||
/**
|
||||
* The default maximimum difference in time used when retrieving STI data (15 minutes.)
|
||||
|
|
|
@ -54,7 +54,8 @@ import com.raytheon.viz.radar.rsc.RadarResourceData;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 13, 2010 mnash Initial creation
|
||||
* 03/01/2013 DR 15496 zwang Handled expanded GSM, display more status
|
||||
* 03/01/2013 DR 15496 zwang Handled expanded GSM, display more status
|
||||
* 07/16/2014 DR 17214 zwang Handled B15 GSM change about super res flag
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -282,49 +283,75 @@ public class RadarGSMResource extends AbstractRadarResource<RadarXYDescriptor> {
|
|||
}
|
||||
|
||||
// Plot elevations
|
||||
double[] elevations = message.getElevation().clone();
|
||||
double[] elev = message.getElevation().clone();
|
||||
char[] charArray = Integer.toBinaryString(
|
||||
message.getSuperResolutionCuts()).toCharArray();
|
||||
|
||||
elevations = Arrays.copyOf(elevations, message.getNumCuts());
|
||||
Arrays.sort(elevations);
|
||||
// Find the index of the SAILS elevation
|
||||
int sailsIndex = -1;
|
||||
for (int i = 1; i < elev.length; i++) {
|
||||
if (elev[i] == elev[0]) {
|
||||
sailsIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Ignore the super res flag for SAILS
|
||||
if (sailsIndex != -1 && sailsIndex < charArray.length) {
|
||||
charArray[charArray.length - sailsIndex - 1] = '0';
|
||||
}
|
||||
|
||||
// Remove elevation 0 and duplicate elevations
|
||||
Arrays.sort(elev);
|
||||
int j = 0;
|
||||
int k = 1;
|
||||
while (k < elev.length){
|
||||
if (elev[j] == 0) {
|
||||
elev[j] = elev[k];
|
||||
k++;
|
||||
}
|
||||
else if (elev[k] == elev[j]) {
|
||||
k++;
|
||||
}
|
||||
else {
|
||||
j++;
|
||||
elev[j] = elev[k];
|
||||
k++;
|
||||
}
|
||||
}
|
||||
|
||||
double[] elevations = Arrays.copyOf(elev, j+1);
|
||||
|
||||
for (int left = 0, right = elevations.length - 1; left < right; left++, right--) {
|
||||
double tmp = elevations[left];
|
||||
elevations[left] = elevations[right];
|
||||
elevations[right] = tmp;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < elevations.length; i++) {
|
||||
if (elevations[i] == 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle the super res flag
|
||||
boolean[] superResElev = new boolean[elevations.length];
|
||||
// Initiate all flags to non super res
|
||||
for (int i = 0; i < elevations.length; i++) {
|
||||
superResElev[i] = false;
|
||||
}
|
||||
|
||||
// Ignore the flag for SAILS
|
||||
for (int i = 0; i < charArray.length; i++) {
|
||||
if (charArray[i] == '1') {
|
||||
superResElev[i] = true;
|
||||
} else {
|
||||
superResElev[i] = false;
|
||||
}
|
||||
if (charArray[charArray.length - i - 1] == '1') {
|
||||
superResElev[elevations.length - i - 1] = true;
|
||||
}
|
||||
}
|
||||
|
||||
List<String> theTemp = new ArrayList<String>();
|
||||
for (int i = 0; i < elevations.length; i++) {
|
||||
if (elevations[i] != 0) {
|
||||
String s = "";
|
||||
if (superResElev[elevations.length - i - count - 1] == true) {
|
||||
s = "S";
|
||||
} else {
|
||||
s = "";
|
||||
}
|
||||
theTemp.add(Double.toString(elevations[i] / 10) + " "
|
||||
+ s);
|
||||
|
||||
String s = "";
|
||||
if (superResElev[i] == true) {
|
||||
s = "S";
|
||||
} else {
|
||||
theTemp.add(Double.toString(elevations[i] / 10));
|
||||
break;
|
||||
s = "";
|
||||
}
|
||||
theTemp.add(Double.toString(elevations[i] / 10) + " " + s);
|
||||
}
|
||||
|
||||
int height = 780;
|
||||
|
|
Loading…
Add table
Reference in a new issue