Merge branch 'master_14.2.4' (14.2.4-6) into omaha_14.2.4
Former-commit-id:f7e39c9d6f
[formerly3b6a003884
] [formerlye7705c328e
[formerly 09b94266f1f3aeaaa7fcf622487d751097d271a4]] Former-commit-id:e7705c328e
Former-commit-id:92a45c76fb
This commit is contained in:
commit
79c7e0b492
6 changed files with 105 additions and 70 deletions
|
@ -65,7 +65,8 @@ import com.raytheon.uf.viz.ui.menus.widgets.tearoff.TearOffMenuDialog.MenuPathEl
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 15, 2011 mnash Initial creation
|
||||
* Apr 10, 2013 DR 15185 D. Friedman Preserve tear-offs over perspective switches.
|
||||
* Jev 26, 2014 2842 mpduff Utilize the command listener.
|
||||
* Jev 26, 2014 2842 mpduff Utilize the command listener.
|
||||
* Aug 21, 2014 15664 snaples Updated dispose method to fix issue when closing perspecitive with tear offs open.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -559,27 +560,27 @@ public class MenuItemComposite extends Composite {
|
|||
highlightedArrow.dispose();
|
||||
}
|
||||
|
||||
if (item != null) {
|
||||
if (updateListener != null && !item.isDisposed()) {
|
||||
if (item != null && !item.isDisposed()) {
|
||||
if (updateListener != null) {
|
||||
item.removeListener(SWT.Modify, updateListener);
|
||||
}
|
||||
|
||||
if (radioListener != null && !item.isDisposed()) {
|
||||
if (radioListener != null) {
|
||||
item.removeSelectionListener(radioListener);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.getData() instanceof CommandContributionItem) {
|
||||
ICommandService service = (ICommandService) PlatformUI
|
||||
.getWorkbench().getService(ICommandService.class);
|
||||
Command c = service.getCommand(((CommandContributionItem) item
|
||||
.getData()).getCommand().getId());
|
||||
c.removeCommandListener(commandListener);
|
||||
if (item.getData() instanceof CommandContributionItem) {
|
||||
ICommandService service = (ICommandService) PlatformUI
|
||||
.getWorkbench().getService(ICommandService.class);
|
||||
Command c = service.getCommand(((CommandContributionItem) item
|
||||
.getData()).getCommand().getId());
|
||||
c.removeCommandListener(commandListener);
|
||||
}
|
||||
}
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
public void setSelection(boolean selection) {
|
||||
if (firstItem instanceof Button) {
|
||||
((Button) firstItem).setSelection(selection);
|
||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Sep 14, 2011 mnash Initial creation
|
||||
* Jan 09, 2013 1442 rferrel Add Simulated Time Change Listener.
|
||||
* Apr 10, 2013 DR 15185 D. Friedman Preserve tear-offs over perspective switches.
|
||||
* Aug 21, 2014 15664 snaples Updated dispose method to fix issue when closing perspecitive with tear offs open.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -215,7 +216,9 @@ public class TearOffMenuDialog extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
shell.removeListener(SWT.Show, swtListener);
|
||||
menu.removeListener(SWT.Show, swtListener);
|
||||
if (!menu.isDisposed()) {
|
||||
menu.removeListener(SWT.Show, swtListener);
|
||||
}
|
||||
super.disposed();
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 5, 2009 snaples Initial creation
|
||||
*
|
||||
* Aug 20, 2014 17094 snaples Fixed issue when reading snow data file, did not parse properly.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
|
@ -49,19 +50,19 @@ public class ReadSnowData {
|
|||
|
||||
int j, k, ier, m, qual;
|
||||
|
||||
char cbuf[] = new char[100];
|
||||
String cbuf = "";
|
||||
|
||||
char p, q;
|
||||
|
||||
char buf[] = new char[100];
|
||||
String buf = "";
|
||||
|
||||
String hb5 = "";
|
||||
|
||||
char pc;
|
||||
|
||||
char datbuf[] = new char[50];
|
||||
String datbuf = "";
|
||||
|
||||
char parmbuf[] = new char[50];
|
||||
String parmbuf = "";
|
||||
|
||||
int maxk, startk;
|
||||
|
||||
|
@ -73,6 +74,8 @@ public class ReadSnowData {
|
|||
|
||||
try {
|
||||
|
||||
in = new BufferedReader(new FileReader(prece));
|
||||
|
||||
for (k = 0; k < numPstations; k++) {
|
||||
for (int m = 0; m < 5; m++) {
|
||||
pdata[i].stn[k].srain[m].data = -99;
|
||||
|
@ -80,16 +83,15 @@ public class ReadSnowData {
|
|||
pdata[i].stn[k].sflag[m] = -1;
|
||||
}
|
||||
}
|
||||
in = new BufferedReader(new FileReader(prece));
|
||||
bad: while (in.ready()) {
|
||||
|
||||
int p = 1;
|
||||
String sn = cbuf.toString();
|
||||
Scanner s = new Scanner(sn);
|
||||
bad: while (p != -1) {
|
||||
cbuf = in.readLine().trim();
|
||||
if (cbuf.length() < 1) {
|
||||
break;
|
||||
}
|
||||
Scanner s = new Scanner(cbuf);
|
||||
|
||||
in.read(cbuf, 0, 100);
|
||||
|
||||
if (cbuf[0] == ':') {
|
||||
if (cbuf.charAt(0) == ':') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -97,19 +99,20 @@ public class ReadSnowData {
|
|||
if (s.hasNext() == false) {
|
||||
continue;
|
||||
}
|
||||
s.next();
|
||||
hb5 = s.next();
|
||||
datbuf = s.next().toCharArray();
|
||||
parmbuf = s.next().toCharArray();
|
||||
datbuf = s.next();
|
||||
parmbuf = s.next();
|
||||
|
||||
int q = parmbuf.toString().indexOf('/');
|
||||
char c = ' ';
|
||||
if (q >= 0) {
|
||||
c = parmbuf[q];
|
||||
c = parmbuf.charAt(q);
|
||||
}
|
||||
if (c < 0) {
|
||||
continue;
|
||||
}
|
||||
char pc = parmbuf[q + 5];
|
||||
char pc = parmbuf.charAt(q + 5);
|
||||
|
||||
for (j = 0; j < numPstations; j++) {
|
||||
if ((precip_stations.get(j).hb5.equals(hb5) && (pc == precip_stations
|
||||
|
@ -120,12 +123,12 @@ public class ReadSnowData {
|
|||
if (j == numPstations) {
|
||||
continue;
|
||||
}
|
||||
int u = cbuf.toString().indexOf('/');
|
||||
int u = cbuf.indexOf('/');
|
||||
if (u < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
q = cbuf.toString().indexOf(' ', u);
|
||||
q = cbuf.indexOf(' ', u);
|
||||
if (q < 0) {
|
||||
continue;
|
||||
}
|
||||
|
@ -135,19 +138,19 @@ public class ReadSnowData {
|
|||
|
||||
pdata[i].stn[j].srain[k].qual = 0;
|
||||
|
||||
if ((cbuf.toString().indexOf('/', q)) < 0
|
||||
&& (cbuf.toString().indexOf('\n', q)) < 0) {
|
||||
if ((cbuf.indexOf('/', q)) < 0
|
||||
&& (cbuf.indexOf('\n', q)) < 0) {
|
||||
continue bad;
|
||||
}
|
||||
|
||||
u = 0;
|
||||
|
||||
buf = cbuf.toString().substring(q).toCharArray();
|
||||
buf = cbuf.substring(q);
|
||||
|
||||
if ((buf.toString().indexOf('.')) < 0) {
|
||||
if ((buf.indexOf('.')) < 0) {
|
||||
|
||||
if ((buf.toString().indexOf('m')) < 0
|
||||
&& (buf.toString().indexOf('M')) < 0) {
|
||||
if ((buf.indexOf('m')) < 0
|
||||
&& (buf.indexOf('M')) < 0) {
|
||||
|
||||
pdata[i].stn[j].srain[k].data = -1;
|
||||
pdata[i].stn[j].srain[k].qual = -1;
|
||||
|
@ -166,9 +169,8 @@ public class ReadSnowData {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
s.close();
|
||||
}
|
||||
|
||||
in.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -67,9 +67,9 @@
|
|||
<productDependent format='MN: %dkt' index='3' />
|
||||
<productDependent format='MX: %dkt' index='4' />
|
||||
<blank />
|
||||
<sails />
|
||||
<srmSource />
|
||||
<srmMovement />
|
||||
<sails />
|
||||
</upperText>
|
||||
|
||||
<!-- Base Spectrum Width -->
|
||||
|
|
Loading…
Add table
Reference in a new issue