VLab Issue #4464 - DR_17214 RADAR: NEXRAD Unit Status display problem due to the GSM change; fixes #4464
Change-Id: I0ca330e385000e04ef21142e75adfc55d4615a89 Former-commit-id:a2a2a8cdf9
[formerlydde3ee4904
[formerly3ffac397db
] [formerlya2a2a8cdf9
[formerly 288dc7c439995a8ab48680832b63f7d6974885b4]]] Former-commit-id:dde3ee4904
[formerly3ffac397db
] Former-commit-id:dde3ee4904
Former-commit-id:4d1413888c
This commit is contained in:
parent
f2eafb9460
commit
ff4b5d5570
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
|
* Feb 16, 2009 mnash Initial creation
|
||||||
* 03/07/2012 DR 14660 D. Friedman Added time-based getSTIData* functions.
|
* 03/07/2012 DR 14660 D. Friedman Added time-based getSTIData* functions.
|
||||||
* 03/01/2013 DR 15496 zwang Handle the expanded GSM
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -178,7 +180,7 @@ public class RadarHelper {
|
||||||
"RDA 1", "RDA 2" };
|
"RDA 1", "RDA 2" };
|
||||||
|
|
||||||
public static final String[] vcpInfoStr = { "AVSET",
|
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.)
|
* 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
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 13, 2010 mnash Initial creation
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -282,49 +283,75 @@ public class RadarGSMResource extends AbstractRadarResource<RadarXYDescriptor> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plot elevations
|
// Plot elevations
|
||||||
double[] elevations = message.getElevation().clone();
|
double[] elev = message.getElevation().clone();
|
||||||
char[] charArray = Integer.toBinaryString(
|
char[] charArray = Integer.toBinaryString(
|
||||||
message.getSuperResolutionCuts()).toCharArray();
|
message.getSuperResolutionCuts()).toCharArray();
|
||||||
|
|
||||||
elevations = Arrays.copyOf(elevations, message.getNumCuts());
|
// Find the index of the SAILS elevation
|
||||||
Arrays.sort(elevations);
|
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--) {
|
for (int left = 0, right = elevations.length - 1; left < right; left++, right--) {
|
||||||
double tmp = elevations[left];
|
double tmp = elevations[left];
|
||||||
elevations[left] = elevations[right];
|
elevations[left] = elevations[right];
|
||||||
elevations[right] = tmp;
|
elevations[right] = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = 0;
|
// Handle the super res flag
|
||||||
for (int i = 0; i < elevations.length; i++) {
|
|
||||||
if (elevations[i] == 0) {
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean[] superResElev = new boolean[elevations.length];
|
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++) {
|
for (int i = 0; i < charArray.length; i++) {
|
||||||
if (charArray[i] == '1') {
|
if (charArray[charArray.length - i - 1] == '1') {
|
||||||
superResElev[i] = true;
|
superResElev[elevations.length - i - 1] = true;
|
||||||
} else {
|
}
|
||||||
superResElev[i] = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> theTemp = new ArrayList<String>();
|
List<String> theTemp = new ArrayList<String>();
|
||||||
for (int i = 0; i < elevations.length; i++) {
|
for (int i = 0; i < elevations.length; i++) {
|
||||||
if (elevations[i] != 0) {
|
|
||||||
String s = "";
|
String s = "";
|
||||||
if (superResElev[elevations.length - i - count - 1] == true) {
|
if (superResElev[i] == true) {
|
||||||
s = "S";
|
s = "S";
|
||||||
} else {
|
|
||||||
s = "";
|
|
||||||
}
|
|
||||||
theTemp.add(Double.toString(elevations[i] / 10) + " "
|
|
||||||
+ s);
|
|
||||||
} else {
|
} else {
|
||||||
theTemp.add(Double.toString(elevations[i] / 10));
|
s = "";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
theTemp.add(Double.toString(elevations[i] / 10) + " " + s);
|
||||||
}
|
}
|
||||||
|
|
||||||
int height = 780;
|
int height = 780;
|
||||||
|
|
Loading…
Add table
Reference in a new issue