Merge branch 'master_16.2.1' into asdt_16.2.1
Former-commit-id: 8ee3557b04ad9054e8e0c0e0671efa6f4e3abdad
This commit is contained in:
commit
b1adfc8043
697 changed files with 610087 additions and 77684 deletions
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.rcm.server.dataarchive;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -682,14 +683,14 @@ public class DataArchiveEndpoint extends RadarEventAdapter {
|
|||
if (pdb.isBzip2Compressed()) {
|
||||
int uncompressedSize = pdb.getUncompressedSize();
|
||||
byte[] uncompressed;
|
||||
try {
|
||||
InputStream ins = new ByteArrayInputStream(msg, 120,
|
||||
msg.length - 120);
|
||||
ins = new BZip2InputStream(ins, false);
|
||||
try (DataInputStream di = new DataInputStream(
|
||||
new BZip2InputStream(
|
||||
new ByteArrayInputStream(msg,
|
||||
120, msg.length - 120), false))) {
|
||||
// ByteArrayOutputStream outs = new
|
||||
// ByteArrayOutputStream(uncompressedSize);
|
||||
uncompressed = new byte[uncompressedSize];
|
||||
ins.read(uncompressed);
|
||||
di.readFully(uncompressed);
|
||||
} catch (IOException e) {
|
||||
Log.errorf("Error decompressing product: %s", e);
|
||||
return msg;
|
||||
|
|
|
@ -259,6 +259,9 @@
|
|||
<antcall target="p2.build.repo">
|
||||
<param name="feature" value="com.raytheon.uf.viz.acarssounding.feature" />
|
||||
</antcall>
|
||||
<antcall target="p2.build.repo">
|
||||
<param name="feature" value="com.raytheon.uf.viz.ncep.npp.feature" />
|
||||
</antcall>
|
||||
<antcall target="p2.build.repo">
|
||||
<param name="feature" value="com.raytheon.viz.avnfps.feature" />
|
||||
</antcall>
|
||||
|
|
|
@ -94,7 +94,7 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
export apps_dir=${HYDRO_APPS_DIR}
|
||||
|
||||
SWITCHES=()
|
||||
SWITCHES=($SWITCHES)
|
||||
TESTCHECK="$TMCP_HOME/bin/getTestMode"
|
||||
if [ -x ${TESTCHECK} ]; then
|
||||
echo "Calling getTestMode()"
|
||||
|
|
Binary file not shown.
|
@ -1,17 +1,9 @@
|
|||
#!/bin/sh
|
||||
export DISPLAY=":0.0"
|
||||
export FXA_HOME=/awips2/cave/caveEnvironment
|
||||
export TMCP_HOME=/awips2/cave/caveEnvironment
|
||||
|
||||
$FXA_HOME/bin/MonitorTestMode >& /dev/null &
|
||||
|
||||
# Need to make sure we determine what TMCP_HOME should
|
||||
# be if it is not set.
|
||||
dir=${0%/*}
|
||||
if [ "$dir" = "$0" ]; then
|
||||
dir="."
|
||||
fi
|
||||
cd "$dir/.."
|
||||
|
||||
if [ ! -n "${TMCP_HOME}" ]
|
||||
then
|
||||
export TMCP_HOME=.
|
||||
fi
|
||||
|
||||
DISPLAY=$1:0.0; export DISPLAY
|
||||
$TMCP_HOME/bin/MonitorTestMode &
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -5,6 +5,10 @@ path_to_script=`readlink -f $0`
|
|||
RUN_FROM_DIR=`dirname ${path_to_script}`
|
||||
BASE_ENV_DIR=`dirname ${RUN_FROM_DIR}`
|
||||
|
||||
#DR 18113 rehost. /awips/fxa/... Has kicked the bit-bucket.
|
||||
export TMCP_HOME=/awips2/cave/caveEnvironment
|
||||
export FXA_HOME=/awips2/cave/caveEnvironment
|
||||
|
||||
if [ ! -n "${TMCP_HOME}" ]
|
||||
then
|
||||
echo -e "\e[1;31mTMCP_HOME is not set.\e[m"
|
||||
|
@ -37,19 +41,24 @@ then
|
|||
then
|
||||
echo -e "\e[1;31mFXA_WARNGEN_PRODUCT_ID is not set.\e[m"
|
||||
echo -e "\e[0;32mSetting FXA_WARNGEN_PRODUCT_ID to '${TMP_HOST_NUMBER}'.\e[m"
|
||||
export FXA_WARNGEN_PRODUCT_ID=${TMP_HOST_NUMBER}
|
||||
export FXA_WARNGEN_PRODUCT_ID=${TMP_HOST_NUMBER}
|
||||
else
|
||||
echo "FXA_WARNGEN_PRODUCT_ID is '${FXA_WARNGEN_PRODUCT_ID}'."
|
||||
fi
|
||||
else
|
||||
echo -e "\e[1;31mPartner host \""${ALT_HOST}"\" is unreachable by network!\e[m"
|
||||
echo ${ALT_HOME}
|
||||
echo
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH=$TMCP_HOME/lib:$LD_LIBRARY_PATH
|
||||
|
||||
# for TMCP logs
|
||||
if [ ! -d $HOME/tmcpLogs ]; then
|
||||
mkdir $HOME/tmcpLogs
|
||||
if [ ! -d $HOME/caveData/tmcpLogs ]; then
|
||||
mkdir -p $HOME/caveData/tmcpLogs
|
||||
fi
|
||||
export LOG_DIR=$HOME/caveData/tmcpLogs
|
||||
|
||||
export LOG_DIR=$HOME/tmcpLogs
|
||||
|
||||
$TMCP_HOME/bin/tmcp
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,22 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Need to make sure we determine what TMCP_HOME should
|
||||
# be if it is not set because this script may be ran
|
||||
# remotely under certain conditions.
|
||||
dir=${0%/*}
|
||||
if [ "$dir" = "$0" ]; then
|
||||
dir="."
|
||||
fi
|
||||
cd "$dir/.."
|
||||
|
||||
if [ ! -n "${TMCP_HOME}" ]
|
||||
then
|
||||
export TMCP_HOME=.
|
||||
fi
|
||||
|
||||
export DISPLAY=:0.0
|
||||
export FXA_HOME=/awips2/cave/caveEnvironment
|
||||
if [ $6 = "kde" ]
|
||||
then
|
||||
kstart --alldesktops $TMCP_HOME/bin/showBanner $2 $3 $4 $5 &
|
||||
kstart --alldesktops $FXA_HOME/bin/showBanner $2 $3 $4 $5 &
|
||||
else
|
||||
$TMCP_HOME/bin/showBanner $2 $3 $4 $5 &
|
||||
$FXA_HOME/bin/showBanner $2 $3 $4 $5 &
|
||||
fi
|
||||
|
||||
|
|
Binary file not shown.
BIN
cave/build/static/linux/cave/caveEnvironment/bin/tmbRemoteCheck
Normal file → Executable file
BIN
cave/build/static/linux/cave/caveEnvironment/bin/tmbRemoteCheck
Normal file → Executable file
Binary file not shown.
Binary file not shown.
BIN
cave/build/static/linux/cave/caveEnvironment/bin/tmcp
Normal file → Executable file
BIN
cave/build/static/linux/cave/caveEnvironment/bin/tmcp
Normal file → Executable file
Binary file not shown.
|
@ -109,5 +109,11 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Relocate localization files.
|
||||
/bin/bash /awips2/cave/relocateLocalization.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Successfully installed feature: ${feature_id}."
|
||||
exit 0
|
||||
exit 0
|
83
cave/build/static/linux/cave/caveUpdate.sh
Normal file
83
cave/build/static/linux/cave/caveUpdate.sh
Normal file
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script can be used to upgrade the currently installed CAVE features to the latest
|
||||
# versions available in the repositories.
|
||||
|
||||
# This script currently expects one argument: the location of the Eclipse repository.
|
||||
|
||||
# Only the root user and the awips user are able to successfully run this script.
|
||||
if [ "${USER}" != "root" -a "${USER}" != "awips" ]; then
|
||||
echo "ERROR: ${USER} does not have the required privileges to run ${0}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_awips_tmp_dir=/awips2/tmp
|
||||
_cave_install_prefix=cave-upgrade-
|
||||
|
||||
# Common function to print usage information.
|
||||
function usage() {
|
||||
echo "Usage: ${0} <repository-location>"
|
||||
echo "Example: ${0} /path/to/repo-location/eclipse/v2.7"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Verify that the expected arguments have been provided.
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "ERROR: Invalid arguments provided!"
|
||||
usage
|
||||
fi
|
||||
|
||||
repository_loc=${1}
|
||||
|
||||
# Verify that the specified repository exists.
|
||||
if [ ! -d ${repository_loc} ]; then
|
||||
echo "ERROR: The specified repository does not exist!"
|
||||
usage
|
||||
fi
|
||||
|
||||
_unique_ident=`echo $$`
|
||||
_staging_dir=${_awips_tmp_dir}/${_cave_install_prefix}${_unique_ident}
|
||||
if [ -d ${_staging_dir} ]; then
|
||||
rm -rf ${_staging_dir}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to remove the existing staging directory: ${_staging_dir}!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
mkdir -p ${_staging_dir}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to create the staging directory: ${_staging_dir}!"
|
||||
exit 1
|
||||
fi
|
||||
_output=${_staging_dir}/upgrades.txt
|
||||
|
||||
/awips2/java/bin/java -jar -DcaveInstall=/awips2/cave -DeclipseRepo=${repository_loc} \
|
||||
-DoutputFile=${_output} /awips2/cave/VizUpdater.jar
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: The upgrade has failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine if any upgrades were found.
|
||||
if [ ! -f ${_output} ]; then
|
||||
echo "INFO: There are no upgrades to apply."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Iterate through the upgrades and apply them.
|
||||
for feature in `cat ${_output}`; do
|
||||
echo "Upgrading feature: ${feature} ..."
|
||||
/bin/bash /awips2/cave/caveInstall.sh "${repository_loc}" ${feature}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to upgrade feature: ${feature}!"
|
||||
fi
|
||||
done
|
||||
|
||||
# Relocate localization files.
|
||||
/bin/bash /awips2/cave/relocateLocalization.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: Upgrades Finished."
|
||||
exit 0
|
23
cave/build/static/linux/cave/relocateLocalization.sh
Normal file
23
cave/build/static/linux/cave/relocateLocalization.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Post-installation script that copies the unpacked localization files
|
||||
# to /awips2/cave/etc.
|
||||
|
||||
pushd . > /dev/null 2>&1
|
||||
cd /awips2/cave/plugins
|
||||
for localizationDirectory in `find . -maxdepth 2 -name localization -type d`;
|
||||
do
|
||||
# copy the contents of the localization directory to the
|
||||
# etc directory.
|
||||
cp -rf ${localizationDirectory}/* /awips2/cave/etc
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove the localization directory.
|
||||
rm -rf ${localizationDirectory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
popd > /dev/null 2>&1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -7,6 +7,7 @@
|
|||
blink and color items followed the A1 configuring master.gcf file.
|
||||
01/31/2012 dyninaj DR14427 added category NDFD
|
||||
11/30/2012 jzeng DR14016 update GFE configuration
|
||||
11/04/2015 pwu DR18174 AlertViz message corrections
|
||||
-->
|
||||
<alertConfiguration name="DEFAULT">
|
||||
<globalConfiguration height="37" width="-1" yPosition="-1" xPosition="-1" logLength="10" audioDuration="30" blinkDuration="5" expandedPopup="false" categoryShown="false" sourceKeyShown="false" priorityShown="false" mode="H2"/>
|
||||
|
@ -307,14 +308,14 @@
|
|||
<metadata omit="false" imageFile="SS.png"/>
|
||||
</configurationMonitor>
|
||||
</source>
|
||||
<source locked="true" name="NWRWAVES" longName="NWRWAVES">
|
||||
<source longName="NWRWAVES" name="NWRWAVES" locked="true">
|
||||
<configurationItem>
|
||||
<metadata foreground="#000000" background="#12ffff" pythonEnabled="false" log="true" priority="SIGNIFICANT" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#7e7e7e" pythonEnabled="false" log="false" priority="EVENTB" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#ffffff" pythonEnabled="false" log="false" priority="VERBOSE" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#ff0000" pythonEnabled="false" log="false" priority="PROBLEM" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#ff0000" background="#000000" pythonEnabled="false" log="true" priority="CRITICAL" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#00ff00" pythonEnabled="false" log="false" priority="EVENTA" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#ff9d00" pythonEnabled="false" log="true" priority="SIGNIFICANT" popup="true" blink="false" text="true" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#ffffff" pythonEnabled="false" log="false" priority="VERBOSE" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#ff0000" pythonEnabled="false" log="true" priority="CRITICAL" popup="true" blink="false" text="true" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#feff00" pythonEnabled="false" log="true" priority="PROBLEM" popup="true" blink="false" text="true" audioEnabled="false"/>
|
||||
<metadata foreground="#000000" background="#7e7e7e" pythonEnabled="false" log="false" priority="EVENTB" popup="false" blink="false" text="false" audioEnabled="false"/>
|
||||
</configurationItem>
|
||||
<configurationMonitor>
|
||||
<metadata omit="false"/>
|
||||
|
|
|
@ -17,11 +17,6 @@
|
|||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.base.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dissemination"
|
||||
download-size="0"
|
||||
|
|
|
@ -46,14 +46,17 @@ import com.raytheon.uf.common.time.DataTimeComparator;
|
|||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 19, 2007 chammack Initial Creation.
|
||||
* May 31, 2013 15908 dhuffman Removed a null from a method call to
|
||||
* cease a null pointer exception.
|
||||
* May 5, 2014 DR 17201 D. Friedman Make same-radar time matching work more like A1.
|
||||
* Aug 08, 2013 2245 bsteffen Make all DataTime comparisons consistent.
|
||||
* Jul 18, 2014 ASM #15049 D. Friedman Fix LAPS problem introduced by DR 17201
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ---------- -------------------------------------------
|
||||
* Jun 19, 2007 chammack Initial Creation.
|
||||
* May 31, 2013 15908 dhuffman Removed a null from a method call to cease
|
||||
* a null pointer exception.
|
||||
* May 05, 2014 17201 dfriedman Make same-radar time matching work more
|
||||
* like A1.
|
||||
* Aug 08, 2013 2245 bsteffen Make all DataTime comparisons consistent.
|
||||
* Jul 18, 2014 15049 dfriedman Fix LAPS problem introduced by DR 17201
|
||||
* Nov 03, 2015 4857 bsteffen Set radar on radar volume scan interval
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -69,11 +72,8 @@ public class TimeMatcher {
|
|||
// 2 minutes in milliseconds
|
||||
private static final long TWO_MINUTES_MS = 2 * ONE_MINUTE_MS;
|
||||
|
||||
// 5 minutes in milliseconds
|
||||
private static final long FIVE_MINUTES_MS = 5 * ONE_MINUTE_MS;;
|
||||
|
||||
// 11 minutes in milliseconds
|
||||
private static final long ELEVEN_MINUTES_MS = 11 * ONE_MINUTE_MS;;
|
||||
private static final long ELEVEN_MINUTES_MS = 11 * ONE_MINUTE_MS;
|
||||
|
||||
// 1 hour in milliseconds
|
||||
private static final long ONE_HOUR_MS = 60 * ONE_MINUTE_MS;
|
||||
|
@ -104,7 +104,7 @@ public class TimeMatcher {
|
|||
private static long autoIntervals[] = { 300, 900, 1800, 3600, 10800, 21600,
|
||||
43200, 86400 };
|
||||
|
||||
private boolean radarOnRadarYes = false;
|
||||
private long radarOnRadarVolumeScanInterval = -1;
|
||||
|
||||
// Package access
|
||||
TimeMatcher() {
|
||||
|
@ -247,8 +247,9 @@ public class TimeMatcher {
|
|||
if (haveForecasts) {
|
||||
haveForecasts = haveFcst;
|
||||
}
|
||||
if (radarOnRadarYes) {
|
||||
return new IntrinsicReturnVal(haveForecasts, FIVE_MINUTES_MS);
|
||||
if (isRadarOnRadar()) {
|
||||
return new IntrinsicReturnVal(haveForecasts,
|
||||
radarOnRadarVolumeScanInterval);
|
||||
}
|
||||
return new IntrinsicReturnVal(haveForecasts, ONE_DAY_MS);
|
||||
}
|
||||
|
@ -307,7 +308,7 @@ public class TimeMatcher {
|
|||
return new IntrinsicReturnVal(haveForecasts, ONE_DAY_MS);
|
||||
}
|
||||
if (dt2 < 0x7FFFFFFF && dt <= TWO_MINUTES_MS && dt2 > 50 * dt
|
||||
&& !radarOnRadarYes) {
|
||||
&& !isRadarOnRadar()) {
|
||||
dt = dt2;
|
||||
} else {
|
||||
nn = 0;
|
||||
|
@ -318,7 +319,7 @@ public class TimeMatcher {
|
|||
if (haveForecasts) {
|
||||
haveForecasts = haveFcst;
|
||||
}
|
||||
if (haveFcst || radarOnRadarYes) {
|
||||
if (haveFcst || isRadarOnRadar()) {
|
||||
return new IntrinsicReturnVal(haveForecasts, dt);
|
||||
}
|
||||
|
||||
|
@ -376,8 +377,9 @@ public class TimeMatcher {
|
|||
if (haveForecasts) {
|
||||
haveForecasts = haveFcst;
|
||||
}
|
||||
if (radarOnRadarYes) {
|
||||
return new IntrinsicReturnVal(haveForecasts, FIVE_MINUTES_MS);
|
||||
if (isRadarOnRadar()) {
|
||||
return new IntrinsicReturnVal(haveForecasts,
|
||||
radarOnRadarVolumeScanInterval);
|
||||
}
|
||||
return new IntrinsicReturnVal(haveForecasts, ONE_DAY_MS);
|
||||
}
|
||||
|
@ -423,7 +425,7 @@ public class TimeMatcher {
|
|||
return new IntrinsicReturnVal(haveForecasts, ONE_DAY_MS);
|
||||
}
|
||||
if (dt2 < 0x7FFFFFFF && dt <= TWO_MINUTES_MS && dt2 > 50 * dt
|
||||
&& !radarOnRadarYes) {
|
||||
&& !isRadarOnRadar()) {
|
||||
dt = dt2;
|
||||
} else {
|
||||
nn = 0;
|
||||
|
@ -434,7 +436,7 @@ public class TimeMatcher {
|
|||
if (haveForecasts) {
|
||||
haveForecasts = haveFcst;
|
||||
}
|
||||
if (haveFcst || radarOnRadarYes) {
|
||||
if (haveFcst || isRadarOnRadar()) {
|
||||
return new IntrinsicReturnVal(haveForecasts, dt);
|
||||
}
|
||||
|
||||
|
@ -665,7 +667,7 @@ public class TimeMatcher {
|
|||
// A1 TimeMatchFunctions.C ~ line 952
|
||||
if (dt > ONE_MINUTE_MS && dt <= ELEVEN_MINUTES_MS
|
||||
&& dtf > ONE_MINUTE_MS && dtf <= ELEVEN_MINUTES_MS
|
||||
&& radarOnRadarYes) {
|
||||
&& isRadarOnRadar()) {
|
||||
if (dtf<dt) {
|
||||
dt = dtf;
|
||||
}
|
||||
|
@ -673,18 +675,13 @@ public class TimeMatcher {
|
|||
dt = dtf;
|
||||
}
|
||||
|
||||
/* A1 TimeMatchingFunctions.C ~ line 960
|
||||
* For 88D radar, dt is usually 300 seconds or larger
|
||||
* For TDWR radar, dt is usually 180 seconds or less
|
||||
* To allow 3 minutes overlay for TDWR products, dt is set to 300 seconds
|
||||
*/
|
||||
if (radarOnRadarYes && dt < FIVE_MINUTES_MS) {
|
||||
dt = FIVE_MINUTES_MS;
|
||||
if (isRadarOnRadar()) {
|
||||
dt = radarOnRadarVolumeScanInterval;
|
||||
}
|
||||
|
||||
if (tolerance > 99) {
|
||||
dt = 0x7FFFFFl * 1000l;
|
||||
} else {
|
||||
} else if (!isRadarOnRadar()) {
|
||||
dt = (int) (dt * tolerance);
|
||||
}
|
||||
if (dt == 0) {
|
||||
|
@ -719,7 +716,8 @@ public class TimeMatcher {
|
|||
vf = (frameTimes)[f].getMatchValid() + deltaTime;
|
||||
v1 = vf - dt; // first usable valid time
|
||||
v2 = vf + dt; // last usable valid time
|
||||
if (!radarOnRadarYes && !dataFcsts && !frameFcsts && vf > latest.getTime()) {
|
||||
if (!isRadarOnRadar() && !dataFcsts && !frameFcsts
|
||||
&& vf > latest.getTime()) {
|
||||
// if we are dealing with live data(without forecast times) then
|
||||
// we want to allow extra time on the latest frame. For example
|
||||
// LAPS data arrives hourly, and radar arrives every 6 minutes,
|
||||
|
@ -1688,12 +1686,13 @@ public class TimeMatcher {
|
|||
}
|
||||
return intervals;
|
||||
}
|
||||
|
||||
public boolean isRadarOnRadar() {
|
||||
return radarOnRadarYes;
|
||||
|
||||
protected boolean isRadarOnRadar() {
|
||||
return radarOnRadarVolumeScanInterval > 0;
|
||||
}
|
||||
|
||||
public void setRadarOnRadar(boolean radarOnRadar) {
|
||||
this.radarOnRadarYes = radarOnRadar;
|
||||
|
||||
public void setRadarOnRadar(long volumeScanInterval) {
|
||||
this.radarOnRadarVolumeScanInterval = volumeScanInterval;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,3 +29,4 @@ Export-Package: com.raytheon.uf.viz.d2d.nsharp,
|
|||
com.raytheon.uf.viz.d2d.nsharp.rsc,
|
||||
com.raytheon.uf.viz.d2d.nsharp.vb
|
||||
Bundle-ClassPath: com.raytheon.uf.viz.d2d.nsharp.jar
|
||||
Import-Package: gov.noaa.nws.ncep.viz.soundingrequest
|
||||
|
|
|
@ -62,6 +62,10 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* 2/23/2015 RM#5694,7788 Chin Chen Use NCP's Nsharp text file loader
|
||||
* and comment out openNspFile()
|
||||
* Aug 05, 2015 4486 rjpeter Changed Timestamp to Date.
|
||||
* Aug 31, 2011 bsteffen Initial creation
|
||||
* 2/23/2015 RM#5694,7788 Chin Chen Use NCP's Nsharp text file loader
|
||||
* and comment out openNspFile()
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
|
|
@ -23,7 +23,7 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingCube;
|
|||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.ObsSndType;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
|
||||
import gov.noaa.nws.ncep.viz.common.soundingQuery.NcSoundingQuery;
|
||||
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile;
|
|||
import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigManager;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigStore;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
|
||||
import gov.noaa.nws.ncep.viz.common.soundingQuery.NcSoundingQuery;
|
||||
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ package com.raytheon.uf.viz.d2d.nsharp.rsc;
|
|||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingCube;
|
||||
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
|
||||
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
|
||||
import gov.noaa.nws.ncep.viz.common.soundingQuery.NcSoundingQuery;
|
||||
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<import feature="com.raytheon.uf.viz.displays.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.viz.text.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.d2d.nsharp.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
|
|
@ -107,6 +107,11 @@
|
|||
class="com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord"
|
||||
name="Metar Time Series Adapter">
|
||||
</timeSeriesAdapter>
|
||||
<timeSeriesAdapter
|
||||
adapter="com.raytheon.uf.viz.d2d.xy.adapters.timeseries.PointDataTimeSeriesAdapter"
|
||||
class="com.raytheon.uf.common.dataplugin.ldadmesonet.MesonetLdadRecord"
|
||||
name="Mesonet Time Series Adapter">
|
||||
</timeSeriesAdapter>
|
||||
<timeSeriesAdapter
|
||||
adapter="com.raytheon.uf.viz.d2d.xy.adapters.timeseries.PointDataTimeSeriesAdapter"
|
||||
class="com.raytheon.uf.common.dataplugin.bufrmos.common.BufrMosData"
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.d2d.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.displays.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.viz.avnfps.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.viz.satellite.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
|
|
@ -17,11 +17,6 @@
|
|||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.common.core.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dataplugin.obs"
|
||||
download-size="0"
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
package com.raytheon.uf.viz.drawables.triangulated.generic;
|
||||
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IView;
|
||||
import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback;
|
||||
import com.raytheon.uf.viz.core.drawables.IColormappedImage;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
|
@ -30,6 +32,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
import com.raytheon.uf.viz.drawables.triangulated.ITriangleLocationCallback;
|
||||
import com.raytheon.uf.viz.drawables.triangulated.ITriangulatedImage;
|
||||
import com.raytheon.uf.viz.drawables.triangulated.ITriangulatedImageExtension;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
|
||||
/**
|
||||
* Generic implementation of {@link ITriangulatedImageExtension} that uses a
|
||||
|
@ -42,8 +45,9 @@ import com.raytheon.uf.viz.drawables.triangulated.ITriangulatedImageExtension;
|
|||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- --------- --------------------------
|
||||
* ------------- -------- --------- ----------------------------
|
||||
* Aug 18, 2015 4709 bsteffen Initial creation
|
||||
* Dec 04, 2015 5146 bsteffen Limit the size of the image
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -61,12 +65,25 @@ public class GenericTriangulatedImageExtension extends
|
|||
IColormappedImageExtension imageExtension = target
|
||||
.getExtension(IColormappedImageExtension.class);
|
||||
TriangleFlattener flattener = new TriangleFlattener(dataCallback,
|
||||
locationCallback);
|
||||
locationCallback, getViewArea());
|
||||
IColormappedImage image = imageExtension.initializeRaster(flattener,
|
||||
colorMapParameters);
|
||||
return new GenericTriangulatedImage(image, flattener);
|
||||
}
|
||||
|
||||
private Envelope getViewArea() {
|
||||
/*
|
||||
* Use the extent area multiplied by the zoom level to determine the
|
||||
* full view size when zoomed out.
|
||||
*/
|
||||
IView view = target.getView();
|
||||
IExtent extent = view.getExtent();
|
||||
double zoom = view.getZoom();
|
||||
double width = extent.getWidth() / zoom;
|
||||
double height = extent.getHeight() / zoom;
|
||||
return new Envelope(0, width, 0, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawImage(PaintProperties paintProps, ITriangulatedImage image)
|
||||
throws VizException {
|
||||
|
|
|
@ -62,8 +62,9 @@ import com.vividsolutions.jts.geom.Triangle;
|
|||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- --------- --------------------------
|
||||
* ------------- -------- --------- ----------------------------
|
||||
* Aug 18, 2015 4709 bsteffen Initial creation
|
||||
* Dec 04, 2015 5146 bsteffen Limit the size of the image
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -79,11 +80,17 @@ public class TriangleFlattener implements IColorMapDataRetrievalCallback {
|
|||
|
||||
private Envelope envelope = new Envelope();
|
||||
|
||||
/*
|
||||
* Limit the size of the image, this is general the size of the displayed
|
||||
* area.
|
||||
*/
|
||||
private Envelope maximumArea;
|
||||
|
||||
public TriangleFlattener(IColorMapDataRetrievalCallback dataSource,
|
||||
ITriangleLocationCallback locationSource) {
|
||||
ITriangleLocationCallback locationSource, Envelope maximumArea) {
|
||||
this.dataSource = dataSource;
|
||||
this.locationSource = locationSource;
|
||||
this.maximumArea = maximumArea;
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,6 +98,9 @@ public class TriangleFlattener implements IColorMapDataRetrievalCallback {
|
|||
for (double[] coordinate : coordinates) {
|
||||
envelope.expandToInclude(coordinate[0], coordinate[1]);
|
||||
}
|
||||
if (maximumArea != null) {
|
||||
envelope = envelope.intersection(maximumArea);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -127,6 +137,11 @@ public class TriangleFlattener implements IColorMapDataRetrievalCallback {
|
|||
triEnv.expandToInclude(p1);
|
||||
triEnv.expandToInclude(p2);
|
||||
|
||||
triEnv = triEnv.intersection(envelope);
|
||||
if (triEnv.isNull()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int minX = (int) ((triEnv.getMinX() - envelope.getMinX()) / dx);
|
||||
int maxX = (int) ((triEnv.getMaxX() - envelope.getMinX()) / dx);
|
||||
int minY = (int) ((triEnv.getMinY() - envelope.getMinY()) / dy);
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.common.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.common.base.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.gl.triangulated;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
|
@ -79,8 +80,9 @@ import com.vividsolutions.jts.geom.Triangle;
|
|||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- --------- --------------------------
|
||||
* ------------- -------- --------- ---------------------------------
|
||||
* Aug 24, 2015 4709 bsteffen Initial creation
|
||||
* Dec 04, 2015 5146 bsteffen Rewind attrib buffer before use.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -201,6 +203,9 @@ public class GLTriangulatedImage implements ITriangulatedImage {
|
|||
gl.glPolygonMode(GL.GL_BACK, GL.GL_FILL);
|
||||
gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
|
||||
|
||||
gl.glEnable(GL.GL_BLEND);
|
||||
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GLTextureObject cmapTexture = target
|
||||
.getColorMapTexture(colorMapParameters);
|
||||
|
||||
|
@ -243,8 +248,10 @@ public class GLTriangulatedImage implements ITriangulatedImage {
|
|||
vertexBuffer.rewind();
|
||||
gl.glVertexPointer(2, GL.GL_FLOAT, 0, vertexBuffer);
|
||||
|
||||
Buffer attribBufferData = attribBuffer.getData();
|
||||
attribBufferData.rewind();
|
||||
program.setVertexAttributeData("attrib_value",
|
||||
attribBuffer.getTextureType(), attribBuffer.getData());
|
||||
attribBuffer.getTextureType(), attribBufferData);
|
||||
|
||||
indexBuffer.rewind();
|
||||
gl.glDrawElements(GL.GL_TRIANGLES, indexBuffer.capacity(),
|
||||
|
@ -255,6 +262,8 @@ public class GLTriangulatedImage implements ITriangulatedImage {
|
|||
|
||||
gl.glActiveTexture(GL.GL_TEXTURE1);
|
||||
gl.glBindTexture(GL.GL_TEXTURE_1D, 0);
|
||||
|
||||
gl.glDisable(GL.GL_BLEND);
|
||||
} finally {
|
||||
target.popGLState();
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -201,6 +201,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Dec 16, 2014 3026 mpduff Change location of text.
|
||||
* Feb 13, 2015 4121 mpduff Change label caching.
|
||||
* Sep 28, 2015 4756 dhladky Multiple guidance sources.
|
||||
* Oct 26, 2015 5056 dhladky Simplified Guidance Interpolation.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -3411,10 +3412,6 @@ public class FFMPResource extends
|
|||
|
||||
if (guidanceInterpolator.isInterpolate()) {
|
||||
guidancev = guidBasin.getInterpolatedValue(
|
||||
guidanceInterpolator.getSource1(),
|
||||
guidanceInterpolator.getSource2(),
|
||||
guidanceInterpolator
|
||||
.getInterpolationOffset(),
|
||||
guidanceInterpolator,
|
||||
getGuidSourceExpiration(ffgGraphType));
|
||||
} else {
|
||||
|
@ -3829,10 +3826,7 @@ public class FFMPResource extends
|
|||
// interpolating
|
||||
if (interp.isInterpolate()) {
|
||||
// Interpolating between sources
|
||||
String source1 = interp.getSource1();
|
||||
String source2 = interp.getSource2();
|
||||
dvalue = basin.getInterpolatedValue(source1, source2,
|
||||
interp.getInterpolationOffset(), interp,
|
||||
dvalue = basin.getInterpolatedValue(interp,
|
||||
sourceExpiration);
|
||||
} else {
|
||||
dvalue = basin.getValue(interp.getStandardSource(), interp,
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPResourceData;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 04, 2013 2075 njensen Initial creation
|
||||
* Jun 07, 2013 2075 njensen Added progress monitoring
|
||||
* Oct 26, 2015 5056 dhladky Removed println.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -128,8 +129,8 @@ public class BackgroundLoadJob extends AbstractLoadJob {
|
|||
}
|
||||
|
||||
smonitor.done();
|
||||
System.out.println(this.getName() + " took: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
statusHandler.debug(this.getName() + " took: "
|
||||
+ (System.currentTimeMillis() - t0) + " ms");
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Couldn't complete " + this.getName(), e);
|
||||
|
|
|
@ -57,6 +57,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPResourceData;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 04, 2013 2075 njensen Initial creation
|
||||
* Jun 07, 2013 2075 njensen Added progress monitoring
|
||||
* Oct 26, 2015 5056 dhladky Removed println.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -154,8 +155,8 @@ public class InitialLoadJob extends AbstractLoadJob {
|
|||
smonitor.subTask("Processing Guidance...");
|
||||
doGuidance(startTime, smonitor.newChild(200));
|
||||
|
||||
System.out.println("Initial Load Job took: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
statusHandler.debug(this.getName() + " took: "
|
||||
+ (System.currentTimeMillis() - t0) + " ms");
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
isTopOfTheHour="false">
|
||||
<binOffset posOffset="1800" negOffset="1800"
|
||||
virtualOffset="0" />
|
||||
<metadataMap>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
|
@ -194,10 +194,6 @@
|
|||
<constraint constraintValue="1006,1003"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
|
@ -256,15 +252,10 @@
|
|||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1007"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
|
|
|
@ -197,14 +197,11 @@
|
|||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1006,1003"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
|
@ -227,7 +224,6 @@
|
|||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
|
@ -240,7 +236,6 @@
|
|||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
@ -272,10 +267,6 @@
|
|||
<constraint constraintValue="1007"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0"
|
||||
|
|
|
@ -85,6 +85,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
* Sep 18, 2015 3873 skorolev Removed common definitions. Replaced deprecated NotificationMessage.
|
||||
* Oct 19, 2015 3841 skorolev Corrected constructor.
|
||||
* Oct 21, 2015 3873 dhladky Get Obs load off UI thread.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -352,6 +353,9 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
monitor.removeMonitorListener(zoneDialog);
|
||||
monitor.fogResources.removeAll(getMonitorListeners());
|
||||
stopObserver(OBS, this);
|
||||
if (obsJob != null) {
|
||||
obsJob.cancel();
|
||||
}
|
||||
monitor = null;
|
||||
}
|
||||
|
||||
|
@ -634,4 +638,5 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.raytheon.uf.viz.monitor.data.ObReport;
|
|||
* May 15, 2012 14510 zhao Modified generateObReport()
|
||||
* Jan 06, 2014 2653 skorolev Included SNOW data into ObReport.
|
||||
* Sep 20, 2015 3873 skorolev Added IsStationary and getReportType.
|
||||
* Dec 02, 2015 3873 dhladky Fixed missing parameters.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -48,6 +49,7 @@ public class GenerateFSSObReport {
|
|||
// Generate the observation report.
|
||||
ObReport obReport = new ObReport();
|
||||
FSSObsRecord fssData = (FSSObsRecord) report;
|
||||
|
||||
try {
|
||||
obReport.setObservationTime(fssData.getTimeObs().getTime());
|
||||
obReport.setRefHour(fssData.getRefHour().getTime());
|
||||
|
@ -59,7 +61,7 @@ public class GenerateFSSObReport {
|
|||
obReport.setTimesFromFssobDataURI(report.getDataURI());
|
||||
}
|
||||
obReport.setPlatformId(fssData.getPlatformId());
|
||||
obReport.setStationary(fssData.getIsStationary());
|
||||
obReport.setStationary(fssData.isStationary());
|
||||
obReport.setLatitude((float) fssData.getLatitude());
|
||||
obReport.setLongitude((float) fssData.getLongitude());
|
||||
// Table data:
|
||||
|
@ -117,19 +119,31 @@ public class GenerateFSSObReport {
|
|||
return obReport;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the type of the report. ReportType Enumeration
|
||||
*/
|
||||
private static ReportType getReportType(String reportType) {
|
||||
if (reportType == null) {
|
||||
reportType = "";
|
||||
}
|
||||
switch (reportType) {
|
||||
case "1003":
|
||||
case "1004":
|
||||
case "1005":
|
||||
case "1006":
|
||||
case "1007":
|
||||
case "1003":
|
||||
return ReportType.SYNOPTIC_SHIP;
|
||||
case "1004":
|
||||
return ReportType.SYNOPTIC_CMAN;
|
||||
case "1005":
|
||||
return ReportType.SYNOPTIC_MOORED_BUOY;
|
||||
case "1006":
|
||||
return ReportType.DRIFTING_BUOY;
|
||||
case "1007":
|
||||
return ReportType.MARITIME;
|
||||
// TODO:MESONET
|
||||
default:
|
||||
case "SPECI":
|
||||
return ReportType.SPECI;
|
||||
case "METAR":
|
||||
return ReportType.METAR;
|
||||
case "MESONET":
|
||||
return ReportType.MESONET;
|
||||
default:
|
||||
return ReportType.METAR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,14 +20,13 @@
|
|||
package com.raytheon.uf.viz.monitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
||||
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
|
@ -41,7 +40,6 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.alerts.AlertMessage;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
|
@ -66,6 +64,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* May 08, 2014 3086 skorolev Added current site definition.
|
||||
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUsefrom vals.
|
||||
* Sep 18, 2015 3873 skorolev Included common definitions.
|
||||
* Oct 21, 2015 3873 dhladky Get Obs load off UI thread.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -78,6 +77,8 @@ public abstract class ObsMonitor extends Monitor {
|
|||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ObsMonitor.class);
|
||||
|
||||
protected ProcessObsJob obsJob = null;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -229,7 +230,7 @@ public abstract class ObsMonitor extends Monitor {
|
|||
try {
|
||||
Map<String, RequestConstraint> constraints = RequestConstraint
|
||||
.toConstraintMapping(DataURIUtil.createDataURIMap(dataURI));
|
||||
FSSObsRecord[] pdos = requestFSSObs(constraints, null);
|
||||
FSSObsRecord[] pdos = requestFSSObs(constraints);
|
||||
if (pdos.length > 0 && pdos[0].getTimeObs() != null) {
|
||||
final FSSObsRecord objectToSend = pdos[0];
|
||||
try {
|
||||
|
@ -272,47 +273,19 @@ public abstract class ObsMonitor extends Monitor {
|
|||
*/
|
||||
public void processProductAtStartup() {
|
||||
|
||||
/**
|
||||
* Assume this number for MaxNumObsTimes is larger enough to cover data
|
||||
* of all observations (at least 24 hours' worth of data) in database
|
||||
* [changed from 10 to 240 on May, 18, 2010 for DR #6015, zhao]
|
||||
*/
|
||||
int MaxNumObsTimes = 240;
|
||||
Map<String, RequestConstraint> vals = new HashMap<String, RequestConstraint>();
|
||||
try {
|
||||
vals.put(FSSObsRecord.PLUGIN_NAME_ID, new RequestConstraint(
|
||||
FSSObsRecord.PLUGIN_NAME));
|
||||
|
||||
DataTime[] dataTimesAvailable = DataCubeContainer.performTimeQuery(
|
||||
vals, false);
|
||||
DataTime[] selectedTimes = dataTimesAvailable;
|
||||
|
||||
// Ensure that the latest product is retrieved.
|
||||
// [Modified: retrieve at most MaxNumObsTimes data
|
||||
// points, Feb
|
||||
// 19, 2010, zhao]
|
||||
if (dataTimesAvailable.length > 0) {
|
||||
Arrays.sort(dataTimesAvailable);
|
||||
// at most, MaxNumObsTimes observation times are
|
||||
// considered
|
||||
if (dataTimesAvailable.length > MaxNumObsTimes) {
|
||||
selectedTimes = new DataTime[MaxNumObsTimes];
|
||||
System.arraycopy(dataTimesAvailable,
|
||||
dataTimesAvailable.length - MaxNumObsTimes,
|
||||
selectedTimes, 0, MaxNumObsTimes);
|
||||
}
|
||||
|
||||
FSSObsRecord[] obsRecords = requestFSSObs(vals, selectedTimes);
|
||||
for (FSSObsRecord objectToSend : obsRecords) {
|
||||
ObReport result = GenerateFSSObReport
|
||||
.generateObReport(objectToSend);
|
||||
processAtStartup(result);
|
||||
}
|
||||
final long start = System.currentTimeMillis();
|
||||
obsJob = null;
|
||||
obsJob = new ProcessObsJob(this);
|
||||
obsJob.addJobChangeListener(new JobChangeAdapter() {
|
||||
@Override
|
||||
public void done(IJobChangeEvent event) {
|
||||
// do nothing at this point
|
||||
final long end = System.currentTimeMillis();
|
||||
statusHandler.info("Obs Load took: "+(end-start)+" ms");
|
||||
obsJob = null;
|
||||
}
|
||||
} catch (DataCubeException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"No data in database at startup.");
|
||||
}
|
||||
});
|
||||
obsJob.schedule();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -324,17 +297,9 @@ public abstract class ObsMonitor extends Monitor {
|
|||
* @throws VizException
|
||||
* @throws DataCubeException
|
||||
*/
|
||||
private FSSObsRecord[] requestFSSObs(
|
||||
Map<String, RequestConstraint> constraints, DataTime[] times)
|
||||
protected FSSObsRecord[] requestFSSObs(
|
||||
Map<String, RequestConstraint> constraints)
|
||||
throws DataCubeException {
|
||||
if (times != null) {
|
||||
String[] timeStrs = new String[times.length];
|
||||
for (int i = 0; i < times.length; ++i) {
|
||||
timeStrs[i] = times[i].toString();
|
||||
}
|
||||
constraints.put(PluginDataObject.DATATIME_ID,
|
||||
new RequestConstraint(timeStrs));
|
||||
}
|
||||
PointDataContainer pdc = DataCubeContainer.getPointData(
|
||||
FSSObsRecord.PLUGIN_NAME, FSSObsRecordTransform.FSSOBS_PARAMS,
|
||||
constraints);
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.monitor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.SubMonitor;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
|
||||
import com.raytheon.uf.common.inventory.exception.DataCubeException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.monitor.data.ObReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* Load Obs off the UI thread.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 21, 2015 3873 dhladky Initial creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
|
||||
public class ProcessObsJob extends Job {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ProcessObsJob.class);
|
||||
|
||||
protected static final int PROGRESS_FACTOR = 1;
|
||||
|
||||
/** how many hours do FSSObs go back we wish to load here **/
|
||||
public static final int HOUR_BACK = 12;
|
||||
|
||||
private ObsMonitor obsMonitor;
|
||||
|
||||
public ProcessObsJob(ObsMonitor obsMonitor) {
|
||||
super("Obs Load Process");
|
||||
this.setSystem(false);
|
||||
this.setPriority(INTERACTIVE);
|
||||
this.obsMonitor = obsMonitor;
|
||||
}
|
||||
|
||||
public IStatus run(IProgressMonitor monitor) {
|
||||
|
||||
try {
|
||||
|
||||
long backTime = TimeUtil.newCalendar().getTimeInMillis();
|
||||
Date time = new Date(backTime
|
||||
- (HOUR_BACK * TimeUtil.MILLIS_PER_HOUR));
|
||||
|
||||
Map<String, RequestConstraint> vals = new HashMap<String, RequestConstraint>();
|
||||
vals.put("dataTime.refTime",
|
||||
new RequestConstraint(TimeUtil.formatToSqlTimestamp(time),
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
|
||||
long startPoint = System.currentTimeMillis();
|
||||
FSSObsRecord[] recs = obsMonitor.requestFSSObs(vals);
|
||||
long endPoint = System.currentTimeMillis();
|
||||
SubMonitor smonitor = SubMonitor.convert(monitor, "Loading "
|
||||
+ recs.length + " observations...", recs.length);
|
||||
smonitor.beginTask(null, recs.length);
|
||||
statusHandler.info("Point Data Request, took: "
|
||||
+ (endPoint - startPoint) + " ms");
|
||||
|
||||
for (FSSObsRecord rec : recs) {
|
||||
if (rec != null) {
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
long start = System.currentTimeMillis();
|
||||
doOb(rec, smonitor.newChild(PROGRESS_FACTOR));
|
||||
long end = System.currentTimeMillis();
|
||||
statusHandler.info("Processed " + rec.getIdentifier()
|
||||
+ " in " + (end - start) + " ms");
|
||||
}
|
||||
}
|
||||
|
||||
statusHandler.info("Processed " + recs.length + " FSSObs records.");
|
||||
// fire event to trigger re-paint
|
||||
obsMonitor.fireMonitorEvent();
|
||||
|
||||
} catch (DataCubeException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"No data in database at startup.");
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the Ob
|
||||
*
|
||||
* @param objectToSend
|
||||
**/
|
||||
protected void doOb(FSSObsRecord objectToSend, SubMonitor smonitor) {
|
||||
|
||||
smonitor.beginTask(null, PROGRESS_FACTOR);
|
||||
ObReport result = GenerateFSSObReport
|
||||
.generateObReport(objectToSend);
|
||||
obsMonitor.processAtStartup(result);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -33,6 +33,7 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.ReportType;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML;
|
||||
import com.raytheon.uf.common.monitor.xml.StationIdXML;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -59,6 +60,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Mar 17 2015 3888 dhladky check for nulls
|
||||
* Sep 25 2015 3873 skorolev Corrected addReport for moving platforms.
|
||||
* Oct 19 2015 3841 skorolev Added try to saveConfigXml
|
||||
* Nov 12 2015 3841 dhladky Augmented Slav's fix for moving platforms.
|
||||
* Dec 02 2015 3873 dhladky Pulled 3841 changes to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -164,9 +167,22 @@ public class ObHourReports {
|
|||
try {
|
||||
// use only marine zones
|
||||
if (zone.charAt(2) == 'Z') {
|
||||
|
||||
Coordinate zcoor = MonitorAreaUtils.getZoneCenter(zone);
|
||||
double shipToZone = distance(latShip, lonShip, zcoor.y,
|
||||
zcoor.x);
|
||||
double latZone;
|
||||
double lonZone;
|
||||
|
||||
if (zcoor != null) {
|
||||
latZone = zcoor.y;
|
||||
lonZone = zcoor.x;
|
||||
} else {
|
||||
// Newly added zone
|
||||
AreaIdXML zoneXML = configMgr.getAreaXml(zone);
|
||||
latZone = zoneXML.getCLat();
|
||||
lonZone = zoneXML.getCLon();
|
||||
}
|
||||
double shipToZone = distance(latShip, lonShip, latZone,
|
||||
lonZone);
|
||||
if (shipToZone <= shipDist) {
|
||||
// associate moving platform with monitoring zone.
|
||||
shipZones.add(zone);
|
||||
|
@ -184,16 +200,17 @@ public class ObHourReports {
|
|||
continue;
|
||||
}
|
||||
} catch (SpatialException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Could not determine distance from moving platform to zone: Platform: "
|
||||
+ report.getPlatformId() + " Zone: " + zone, e);
|
||||
}
|
||||
}
|
||||
// Update configuration file.
|
||||
try {
|
||||
configMgr.saveConfigXml();
|
||||
} catch (LocalizationException | SerializationException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Unable to save "
|
||||
+ configMgr.getConfigFileName(), e);
|
||||
} catch (LocalizationException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Problem saving Localization file!", e);
|
||||
} catch (SerializationException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Problem serializaing Localization File!", e);
|
||||
}
|
||||
return shipZones;
|
||||
}
|
||||
|
@ -214,9 +231,12 @@ public class ObHourReports {
|
|||
*/
|
||||
public TableData getZoneTableData() {
|
||||
TableData tblData = new TableData(appName);
|
||||
for (String zone : hourReports.keySet()) {
|
||||
tblData.addTableRowData(this.getObZoneHourReports(zone)
|
||||
.getZoneTableRowData());
|
||||
// Area configuration manager controls what gets displayed
|
||||
for (String zone : configMgr.getAreaList()) {
|
||||
if (hourReports.containsKey(zone)) {
|
||||
tblData.addTableRowData(this.getObZoneHourReports(zone)
|
||||
.getZoneTableRowData());
|
||||
}
|
||||
}
|
||||
return tblData;
|
||||
}
|
||||
|
@ -229,15 +249,18 @@ public class ObHourReports {
|
|||
*/
|
||||
public TableData getFogZoneTableData(Map<String, CellType> algCellType) {
|
||||
TableData tblData = new TableData(AppName.FOG);
|
||||
for (String zone : hourReports.keySet()) {
|
||||
CellType theAlgCellType;
|
||||
if (algCellType.containsKey(zone)) {
|
||||
theAlgCellType = algCellType.get(zone);
|
||||
} else {
|
||||
theAlgCellType = CellType.NotAvailable;
|
||||
// Area configuration manager controls what gets displayed
|
||||
for (String zone : configMgr.getAreaList()) {
|
||||
if (hourReports.containsKey(zone)) {
|
||||
CellType theAlgCellType;
|
||||
if (algCellType.containsKey(zone)) {
|
||||
theAlgCellType = algCellType.get(zone);
|
||||
} else {
|
||||
theAlgCellType = CellType.NotAvailable;
|
||||
}
|
||||
tblData.addTableRowData(this.getObZoneHourReports(zone)
|
||||
.getFogZoneTableRowData(theAlgCellType));
|
||||
}
|
||||
tblData.addTableRowData(this.getObZoneHourReports(zone)
|
||||
.getFogZoneTableRowData(theAlgCellType));
|
||||
}
|
||||
return tblData;
|
||||
}
|
||||
|
@ -250,15 +273,18 @@ public class ObHourReports {
|
|||
*/
|
||||
public TableData getSSZoneTableData(Map<String, CellType> fogCellType) {
|
||||
TableData tblData = new TableData(AppName.SAFESEAS);
|
||||
for (String zone : hourReports.keySet()) {
|
||||
CellType theFogCellType;
|
||||
if (fogCellType.containsKey(zone)) {
|
||||
theFogCellType = fogCellType.get(zone);
|
||||
} else {
|
||||
theFogCellType = CellType.NotAvailable;
|
||||
// Area configuration manager controls what gets displayed
|
||||
for (String zone : configMgr.getAreaList()) {
|
||||
if (hourReports.containsKey(zone)) {
|
||||
CellType theFogCellType;
|
||||
if (fogCellType.containsKey(zone)) {
|
||||
theFogCellType = fogCellType.get(zone);
|
||||
} else {
|
||||
theFogCellType = CellType.NotAvailable;
|
||||
}
|
||||
tblData.addTableRowData(this.getObZoneHourReports(zone)
|
||||
.getSSZoneTableRowData(theFogCellType));
|
||||
}
|
||||
tblData.addTableRowData(this.getObZoneHourReports(zone)
|
||||
.getSSZoneTableRowData(theFogCellType));
|
||||
}
|
||||
return tblData;
|
||||
}
|
||||
|
@ -310,7 +336,7 @@ public class ObHourReports {
|
|||
if (!hourReports.keySet().contains(zone)) {
|
||||
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
|
||||
appName, thresholdMgr));
|
||||
}
|
||||
}
|
||||
}
|
||||
// add and(or) remove stations
|
||||
for (String zone : updtZones) {
|
||||
|
|
|
@ -36,8 +36,6 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.M
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
|
||||
|
@ -61,6 +59,8 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
|||
* Jan 29, 2013 15654 zhao add Wind Chill calculation for SNOW
|
||||
* Sep 04, 2014 3220 skorolev Updated getStationTableData method.
|
||||
* Sep 25, 2015 3873 skorolev Added multiHrsTabData.
|
||||
* Nov 12, 2015 3841 dhladky Augmented Slav's update fix.
|
||||
* Dec 02 2015 3873 dhladky Pulled 3841 changes to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -69,8 +69,6 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
|||
*/
|
||||
|
||||
public class ObMultiHrsReports {
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ObMultiHrsReports.class);
|
||||
|
||||
/**
|
||||
* Thresholds manager
|
||||
|
@ -129,6 +127,7 @@ public class ObMultiHrsReports {
|
|||
*/
|
||||
public void addReport(ObReport report) {
|
||||
Date nominalTime = report.getRefHour();
|
||||
|
||||
/**
|
||||
* DR #8723: if wind speed is zero, wind direction should be N/A, not 0
|
||||
*/
|
||||
|
@ -169,11 +168,15 @@ public class ObMultiHrsReports {
|
|||
// update multiHrsReports with new data
|
||||
obHourReports = multiHrsReports.get(nominalTime);
|
||||
}
|
||||
obHourReports.addReport(report);
|
||||
// update data cache
|
||||
multiHrsReports.put(nominalTime, obHourReports);
|
||||
TableData tblData = obHourReports.getZoneTableData();
|
||||
multiHrsTabData.put(nominalTime, tblData);
|
||||
|
||||
if (report != null && obHourReports != null) {
|
||||
obHourReports.addReport(report);
|
||||
// update data cache
|
||||
multiHrsReports.put(nominalTime, obHourReports);
|
||||
TableData tblData = obHourReports.getZoneTableData();
|
||||
multiHrsTabData.put(nominalTime, tblData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -522,7 +525,7 @@ public class ObMultiHrsReports {
|
|||
* @return
|
||||
*/
|
||||
public ObHourReports getObHourReports() {
|
||||
if (multiHrsReports.isEmpty()) {
|
||||
if (multiHrsReports.isEmpty() || multiHrsTabData.isEmpty()) {
|
||||
ObHourReports obHrsReps = new ObHourReports(
|
||||
TableUtil.getNominalTime(SimulatedTime.getSystemTime()
|
||||
.getTime()), appName, thresholdMgr);
|
||||
|
@ -615,8 +618,12 @@ public class ObMultiHrsReports {
|
|||
* Updates table cache
|
||||
*/
|
||||
public void updateTableCache() {
|
||||
// clear and rebuild table data on config changes
|
||||
multiHrsTabData.clear();
|
||||
|
||||
for (Date time : multiHrsReports.keySet()) {
|
||||
getZoneTableData(time);
|
||||
TableData tblData = getZoneTableData(time);
|
||||
multiHrsTabData.put(time, tblData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@ package com.raytheon.uf.viz.monitor.data;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.raytheon.uf.common.geospatial.ISpatialQuery;
|
||||
import com.raytheon.uf.common.geospatial.SpatialQueryFactory;
|
||||
|
@ -30,6 +32,8 @@ import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
|||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.ObsHistType;
|
||||
|
@ -52,6 +56,7 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
|
|||
* Feb 28, 2013 14410 zhao Modified getCellTypeForBlizWarn
|
||||
* May 23, 2014 3086 skorolev Corrected ObsHistType. Cleaned code.
|
||||
* Sep 18, 2015 3873 skorolev Added coordinates in the hover text for a newly added zones.Corrected code for Fog and SNOW table data.
|
||||
* Oct 22, 2015 3873 dhladky Cached off the zone/station hover texts.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -61,15 +66,38 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
|
|||
|
||||
public final class TableUtil {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TableUtil.class);
|
||||
|
||||
/** Conversion coefficient of nautical miles to statute miles. */
|
||||
public static final float milesPerNauticalMile = 1.15078f;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
private TableUtil() {
|
||||
}
|
||||
/** Singleton instance of this class */
|
||||
private static TableUtil tableUtil = new TableUtil();
|
||||
/** Hover text lookup map **/
|
||||
public Map<String, String> zoneHoverTextMap = null;
|
||||
/** station text lookup map **/
|
||||
public Map<String, String> stationHoverTextMap = null;
|
||||
|
||||
|
||||
/**
|
||||
* Actual initialization if necessary
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static synchronized TableUtil getInstance() {
|
||||
if (tableUtil == null) {
|
||||
tableUtil = new TableUtil();
|
||||
}
|
||||
|
||||
return tableUtil;
|
||||
}
|
||||
|
||||
private TableUtil() {
|
||||
zoneHoverTextMap = new ConcurrentHashMap<String, String>();
|
||||
stationHoverTextMap = new ConcurrentHashMap<String, String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the nominal time for a caller-specified time (to be consistent
|
||||
* with D2D, here "Nominal time" is defined as the hour of an one-hour
|
||||
|
@ -976,42 +1004,50 @@ public final class TableUtil {
|
|||
private static String getZoneHoverText(AreaIdXML zoneXML) {
|
||||
|
||||
String zone = zoneXML.getAreaId();
|
||||
ISpatialQuery sq = null;
|
||||
String sql = null;
|
||||
String hoverText = zone.substring(0, 2) + ", ";
|
||||
String hoverText = tableUtil.zoneHoverTextMap.get(zone);
|
||||
|
||||
if (hoverText == null) {
|
||||
|
||||
ISpatialQuery sq = null;
|
||||
String sql = null;
|
||||
hoverText = zone.substring(0, 2) + ", ";
|
||||
|
||||
try {
|
||||
if (MonitorAreaUtils.isMarineZone(zone)) {
|
||||
sql = "select name from mapdata.marinezones where id = '"
|
||||
+ zone + "'";
|
||||
} else if (zone.charAt(2) == 'Z') { // forecast zone
|
||||
String state_zone = zone.substring(0, 2) + zone.substring(3);
|
||||
sql = "select name from mapdata.zone where state_zone = '"
|
||||
+ state_zone + "'";
|
||||
} else { // County
|
||||
String state = zone.substring(0, 2);
|
||||
String fipsLike = "%" + zone.substring(3);
|
||||
sql = "select countyname from mapdata.county where state = '"
|
||||
+ state + "' and fips like '" + fipsLike + "'";
|
||||
}
|
||||
try {
|
||||
if (MonitorAreaUtils.isMarineZone(zone)) {
|
||||
sql = "select name from mapdata.marinezones where id = '"
|
||||
+ zone + "'";
|
||||
} else if (zone.charAt(2) == 'Z') { // forecast zone
|
||||
String state_zone = zone.substring(0, 2)
|
||||
+ zone.substring(3);
|
||||
sql = "select name from mapdata.zone where state_zone = '"
|
||||
+ state_zone + "'";
|
||||
} else { // County
|
||||
String state = zone.substring(0, 2);
|
||||
String fipsLike = "%" + zone.substring(3);
|
||||
sql = "select countyname from mapdata.county where state = '"
|
||||
+ state + "' and fips like '" + fipsLike + "'";
|
||||
}
|
||||
|
||||
sq = SpatialQueryFactory.create();
|
||||
Object[] results = sq.dbRequest(sql, "maps");
|
||||
if (results.length > 0) {
|
||||
if (results[0] instanceof Object[]) {
|
||||
Object[] res = (Object[]) results[0];
|
||||
hoverText += (String) res[0];
|
||||
sq = SpatialQueryFactory.create();
|
||||
Object[] results = sq.dbRequest(sql, "maps");
|
||||
if (results.length > 0) {
|
||||
if (results[0] instanceof Object[]) {
|
||||
Object[] res = (Object[]) results[0];
|
||||
hoverText += (String) res[0];
|
||||
} else {
|
||||
hoverText += (String) results[0].toString();
|
||||
}
|
||||
} else {
|
||||
hoverText += (String) results[0].toString();
|
||||
}
|
||||
} else {
|
||||
if (zoneXML.getCLat() != null) {
|
||||
hoverText += "(" + zoneXML.getCLat() + ", "
|
||||
+ zoneXML.getCLon() + ")";
|
||||
if (zoneXML.getCLat() != null) {
|
||||
hoverText += "(" + zoneXML.getCLat() + ", "
|
||||
+ zoneXML.getCLon() + ")";
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Unable to query Zone Hover Text: sql: "+sql, e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
tableUtil.zoneHoverTextMap.put(zone, hoverText);
|
||||
}
|
||||
|
||||
return hoverText;
|
||||
|
@ -1025,41 +1061,50 @@ public final class TableUtil {
|
|||
*/
|
||||
private static String getStationHoverText(String stnId) {
|
||||
|
||||
String sql = "select catalogtype, name from common_obs_spatial where ( catalogtype=1 or catalogtype=33 or catalogtype = 32 or catalogtype=1000) and stationid = '"
|
||||
+ stnId + "'";
|
||||
|
||||
String hoverText = null;
|
||||
ISpatialQuery sq = null;
|
||||
Integer stnType = null;
|
||||
String stnName = null;
|
||||
try {
|
||||
sq = SpatialQueryFactory.create();
|
||||
Object[] results = sq.dbRequest(sql, "metadata");
|
||||
if (results.length > 0) {
|
||||
if (results[0] instanceof Object[]) {
|
||||
Object[] res = (Object[]) results[0];
|
||||
stnType = (Integer) res[0];
|
||||
stnName = (String) res[1];
|
||||
|
||||
String hoverText = tableUtil.stationHoverTextMap.get(stnId);
|
||||
|
||||
if (hoverText == null) {
|
||||
|
||||
String sql = "select catalogtype, name from common_obs_spatial where ( catalogtype=1 or catalogtype=33 or catalogtype = 32 or catalogtype=1000) and stationid = '"
|
||||
+ stnId + "'";
|
||||
|
||||
ISpatialQuery sq = null;
|
||||
Integer stnType = null;
|
||||
String stnName = null;
|
||||
try {
|
||||
sq = SpatialQueryFactory.create();
|
||||
Object[] results = sq.dbRequest(sql, "metadata");
|
||||
if (results.length > 0) {
|
||||
if (results[0] instanceof Object[]) {
|
||||
Object[] res = (Object[]) results[0];
|
||||
stnType = (Integer) res[0];
|
||||
stnName = (String) res[1];
|
||||
} else {
|
||||
stnType = (Integer) results[0];
|
||||
stnName = (String) results[1];
|
||||
}
|
||||
if (stnType.intValue() == 1) {
|
||||
hoverText = stnId + "#METAR -- " + stnName;
|
||||
} else if (stnType.intValue() == 33
|
||||
|| stnType.intValue() == 32) {
|
||||
hoverText = stnId + "#MARITIME -- " + stnName;
|
||||
} else if (stnType.intValue() == 1000) {
|
||||
hoverText = stnId + "#MESONET -- " + stnName;
|
||||
}
|
||||
} else {
|
||||
stnType = (Integer) results[0];
|
||||
stnName = (String) results[1];
|
||||
}
|
||||
if (stnType.intValue() == 1) {
|
||||
hoverText = stnId + "#METAR -- " + stnName;
|
||||
} else if (stnType.intValue() == 33 || stnType.intValue() == 32) {
|
||||
hoverText = stnId + "#MARITIME -- " + stnName;
|
||||
} else if (stnType.intValue() == 1000) {
|
||||
hoverText = stnId + "#MESONET -- " + stnName;
|
||||
}
|
||||
} else {
|
||||
hoverText = stnId;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Unable to query Station Hover Text: sql: "+sql, e);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
tableUtil.stationHoverTextMap.put(stnId, hoverText);
|
||||
}
|
||||
|
||||
|
||||
return hoverText;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Nov 20, 2012 1297 skorolev Changes for non-blocking dialog.
|
||||
* Apr 23, 2014 3054 skorolev Added MESONET handling.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Aug 17, 2015 3841 skorolev Corrected handleAddNewStation method.
|
||||
* Dec 02, 2015 3873 dhladky Pulled 3841 to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,7 +68,7 @@ public class AddNewStationDlg extends CaveSWTDialog {
|
|||
.getHandler(AddNewStationDlg.class);
|
||||
|
||||
/** Application name. */
|
||||
private final AppName appName;
|
||||
private AppName appName;
|
||||
|
||||
/** METAR radio button. */
|
||||
private Button metarRdo;
|
||||
|
@ -86,10 +86,10 @@ public class AddNewStationDlg extends CaveSWTDialog {
|
|||
private Text stationTF;
|
||||
|
||||
/** Zone */
|
||||
private final String area;
|
||||
private String area;
|
||||
|
||||
/** Call back interface */
|
||||
private final MonitoringAreaConfigDlg macDlg;
|
||||
private MonitoringAreaConfigDlg macDlg;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -261,11 +261,8 @@ public class AddNewStationDlg extends CaveSWTDialog {
|
|||
+ "' is already in your Monitoring Area or among your Additional Stations.");
|
||||
return;
|
||||
}
|
||||
|
||||
macDlg.addNewStationAction(stn);
|
||||
// add station to area configuration
|
||||
macDlg.getInstance().addNewStation(area, stn, type, true);
|
||||
// update stations in the area configuration
|
||||
macDlg.getInstance().addNewStation(area, stn, type, false);
|
||||
macDlg.getInstance().getStations().add(stn);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Feb 10, 2015 3886 skorolev Added fixed width for dialog.
|
||||
* Aug 17, 2015 3841 skorolev Corrected handleAddNewAction method.
|
||||
* Nov 12, 2015 3841 dhladky Augmented Slav's fix for moving platforms.
|
||||
* Dec 02, 2015 3873 dhladky Pulled 3841 to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -80,6 +82,24 @@ public class AddNewZoneDlg extends CaveSWTDialog {
|
|||
|
||||
/** Monitoring Area Configuration Dialog. */
|
||||
private final MonitoringAreaConfigDlg macDlg;
|
||||
|
||||
/** County constant char */
|
||||
private static final char C = 'C';
|
||||
|
||||
/** Zone constant char */
|
||||
private static final char Z = 'Z';
|
||||
|
||||
/** Upper Latitude Boundary **/
|
||||
public static double upLatBound = 90.0;
|
||||
|
||||
/** Lower Latitude Boundary **/
|
||||
public static double lowLatBound = -90.0;
|
||||
|
||||
/** Upper Longitude Boundary **/
|
||||
public static double upLonBound = 180.0;
|
||||
|
||||
/** Lower Longitude Boundary **/
|
||||
public static double lowLonBound = -180.0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -280,40 +300,41 @@ public class AddNewZoneDlg extends CaveSWTDialog {
|
|||
*/
|
||||
private void handleAddNewAction(String areaId, String latString,
|
||||
String lonString) throws NumberFormatException {
|
||||
|
||||
ZoneType type = ZoneType.REGULAR;
|
||||
char charAt = idTF.getText().charAt(2);
|
||||
if (!appName.equals(AppName.SNOW)) {
|
||||
if (marineZoneRdo.getSelection()) {
|
||||
type = ZoneType.MARITIME;
|
||||
}
|
||||
// correct zone type
|
||||
if (marineZoneRdo.getSelection() && charAt != Z) {
|
||||
String z = idTF.getText().substring(2).replace(charAt, Z);
|
||||
idTF.setText(idTF.getText().substring(0, 2) + z);
|
||||
}
|
||||
if (countyRdo.getSelection() && charAt != C) {
|
||||
String c = idTF.getText().substring(2).replace(charAt, C);
|
||||
idTF.setText(idTF.getText().substring(0, 2) + c);
|
||||
}
|
||||
} else if (appName.equals(AppName.SNOW) && charAt != C) {
|
||||
String c = idTF.getText().substring(2).replace(charAt, C);
|
||||
idTF.setText(idTF.getText().substring(0, 2) + c);
|
||||
}
|
||||
double lat = Double.parseDouble(latString.trim());
|
||||
double lon = Double.parseDouble(lonString.trim());
|
||||
if (lat > upLatBound || lat < lowLatBound || lon > upLonBound || lon < lowLonBound) {
|
||||
macDlg.latLonErrorMsg(latString, lonString);
|
||||
return;
|
||||
}
|
||||
areaId = idTF.getText();
|
||||
if (macDlg.isExistingZone(areaId)) {
|
||||
macDlg.displayInputErrorMsg("The Area ID, "
|
||||
+ areaId
|
||||
+ ", is already in your Monitoring Area or among your Additional Zones.");
|
||||
return;
|
||||
} else {
|
||||
macDlg.configMgr.addNewArea(areaId, lat, lon, type);
|
||||
macDlg.addZoneToMA(areaId);
|
||||
}
|
||||
double lat = Double.parseDouble(latString.trim());
|
||||
double lon = Double.parseDouble(lonString.trim());
|
||||
ZoneType type = ZoneType.REGULAR;
|
||||
// correct third character for METARs
|
||||
char chr = idTF.getText().charAt(2);
|
||||
if (chr != 'C') {
|
||||
String c = idTF.getText().substring(2).replace(chr, 'C');
|
||||
idTF.setText(idTF.getText().substring(0, 2) + c);
|
||||
areaId = idTF.getText();
|
||||
}
|
||||
if (!appName.equals(AppName.SNOW)) {
|
||||
// correct zone type
|
||||
if (marineZoneRdo.getSelection() || idTF.getText().charAt(2) == 'Z') {
|
||||
type = ZoneType.MARITIME;
|
||||
}
|
||||
// correct third character for MARITIMEs
|
||||
char chrm = idTF.getText().charAt(2);
|
||||
if (marineZoneRdo.getSelection() && chrm != 'Z') {
|
||||
String z = idTF.getText().substring(2).replace(chr, 'Z');
|
||||
idTF.setText(idTF.getText().substring(0, 2) + z);
|
||||
areaId = idTF.getText();
|
||||
}
|
||||
}
|
||||
if (lat > 90.0 || lat < -90.0 || lon > 180.0 || lon < -180.0) {
|
||||
macDlg.latLonErrorMsg(latString, lonString);
|
||||
return;
|
||||
}
|
||||
macDlg.configMgr.addNewArea(areaId, lat, lon, type);
|
||||
macDlg.addZoneToMA(areaId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -54,6 +54,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Apr 23, 2014 3054 skorolev Fixed issue with deleting a new station.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Aug 17, 2015 3841 skorolev Corrected deleteSelected method.
|
||||
* Nov 12, 2015 3841 dhladky Augmented Slav's work.
|
||||
* Dec 02, 2015 3873 dhladky Pulled 3841 to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -206,7 +208,7 @@ public class DeleteStationDlg extends CaveSWTDialog {
|
|||
cfgMgr.removeStation(selection.split("#")[0], areaXmlList);
|
||||
newAddedStns.remove(selection);
|
||||
populate();
|
||||
macDlg.maStationsRemoved = true;
|
||||
macDlg.maStationsChanged = true;
|
||||
} else {
|
||||
MessageBox messageBox = new MessageBox(shell,
|
||||
SWT.ICON_INFORMATION | SWT.NONE);
|
||||
|
|
|
@ -60,6 +60,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Nov 10, 2014 3741 skorolev Fixed configXML issue.
|
||||
* Aug 17, 2015 3841 skorolev Made editable a content of ID field.
|
||||
* Nov 12, 2015 3841 dhladky Augmented Slav's update fixes.
|
||||
* Dec 02, 2015 3873 dhladky Pulled 3841 to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -391,7 +393,7 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
cfgMgr.removeAdjArea(zoneXML);
|
||||
}
|
||||
macDlg.populateLeftLists("");
|
||||
macDlg.maZonesRemoved = true;
|
||||
macDlg.maZonesChanged = true;
|
||||
return true;
|
||||
} else {
|
||||
bottomLbl.setText("No zones have been deleted.");
|
||||
|
@ -425,7 +427,7 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
}
|
||||
double lat = Double.parseDouble(latStr);
|
||||
double lon = Double.parseDouble(lonStr);
|
||||
if (lat > 90.0 || lat < -90.0 || lon > 180.0 || lon < -180.0) {
|
||||
if (lat > AddNewZoneDlg.upLatBound || lat < AddNewZoneDlg.lowLatBound || lon > AddNewZoneDlg.upLonBound || lon < AddNewZoneDlg.lowLonBound) {
|
||||
macDlg.latLonErrorMsg(latStr, lonStr);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Mar 08, 2015 3888 dhladky Restored threshold pop-up when adding new stations/zones.
|
||||
* Sep 18, 2015 3873 skorolev Added formIsValid method.
|
||||
* Oct 19, 2015 3841 skorolev Corrected formIsValid messages.
|
||||
* Nov 12, 2015 3841 dhladky Augmented Slav's fix for moving platforms.
|
||||
* Dec 02, 2015 3873 dhladky Pulled 3841 to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -197,13 +199,13 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
private java.util.List<String> maZones = null;
|
||||
|
||||
/** monitor area zones status. */
|
||||
protected boolean maZonesRemoved = false;
|
||||
protected boolean maZonesChanged = false;
|
||||
|
||||
/** monitor area stations **/
|
||||
private java.util.List<String> maStations = null;
|
||||
|
||||
/** monitor area stations status. */
|
||||
protected boolean maStationsRemoved = false;
|
||||
protected boolean maStationsChanged = false;
|
||||
|
||||
/** monitor area additional zones **/
|
||||
private java.util.List<String> additionalZones = null;
|
||||
|
@ -254,6 +256,13 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
private final static String MODIFY_THRESHOLD_MSG = "New zones have been added, and their monitoring thresholds "
|
||||
+ "have been set to default values; would you like to modify "
|
||||
+ "their threshold values now?";
|
||||
|
||||
|
||||
/** County constant char */
|
||||
private static final char C = 'C';
|
||||
|
||||
/** Zone constant char */
|
||||
private static final char Z = 'Z';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -519,7 +528,6 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
removeZoneStn();
|
||||
maZonesRemoved = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -615,7 +623,6 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
removeAssociated();
|
||||
maStationsRemoved = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1081,6 +1088,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
configMgr.setShipDistance(shipDistance.getSelection());
|
||||
configMgr.setUseAlgorithms(fogChk.getSelection());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1163,6 +1172,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
.getAddedStations().contains(stnId));
|
||||
handleMonitorAreaListSelection();
|
||||
}
|
||||
|
||||
maZonesChanged = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1219,6 +1230,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
configMgr.removeStationFromArea(stnZone,
|
||||
entry.substring(0, entry.indexOf('#')));
|
||||
}
|
||||
|
||||
maZonesChanged = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1301,6 +1314,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
configMgr.addNewStation(entry, stnId, stnType, configMgr
|
||||
.getAddedStations().contains(stnId));
|
||||
}
|
||||
|
||||
maStationsChanged = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1339,11 +1354,15 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
.toArray(new String[additionalStns.size()]));
|
||||
}
|
||||
}
|
||||
|
||||
} else { // Station mode
|
||||
String stn = monitorAreaList.getItem(monitorAreaList
|
||||
.getSelectionIndex());
|
||||
configMgr.removeStationFromArea(entry, stn);
|
||||
|
||||
}
|
||||
|
||||
maStationsChanged = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1479,7 +1498,7 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
public boolean formIsValid(String area, String latString, String lonString) {
|
||||
boolean retVal = true;
|
||||
if (area.equals("") || area.length() != 6
|
||||
|| (area.charAt(2) != 'C' && area.charAt(2) != 'Z')) {
|
||||
|| (area.charAt(2) != C && area.charAt(2) != Z)) {
|
||||
StringBuilder invalidMsg = new StringBuilder(INVALID_AREA_MSG_C);
|
||||
if (appName.equals(AppName.SNOW)) {
|
||||
invalidMsg.append(".");
|
||||
|
@ -1557,8 +1576,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
protected void resetStatus() {
|
||||
this.timeWindowChanged = false;
|
||||
this.maZonesRemoved = false;
|
||||
this.maStationsRemoved = false;
|
||||
this.maZonesChanged = false;
|
||||
this.maStationsChanged = false;
|
||||
this.shipDistanceChanged = false;
|
||||
this.fogChkChanged = false;
|
||||
}
|
||||
|
@ -1572,8 +1591,8 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
if (!configMgr.getAddedZones().isEmpty()
|
||||
|| !configMgr.getAddedStations().isEmpty()
|
||||
|| this.timeWindowChanged || this.shipDistanceChanged
|
||||
|| this.fogChkChanged || this.maZonesRemoved
|
||||
|| this.maStationsRemoved) {
|
||||
|| this.fogChkChanged || this.maZonesChanged
|
||||
|| this.maStationsChanged) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1643,4 +1662,4 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
* @return manager
|
||||
*/
|
||||
protected abstract FSSObsMonitorConfigurationManager getInstance();
|
||||
}
|
||||
}
|
|
@ -100,6 +100,8 @@ import com.vividsolutions.jts.io.ParseException;
|
|||
* Sep 15, 2014 3220 skorolev Added refreshZoneTableData method.
|
||||
* Nov 03, 2014 3741 skorolev Updated zoom procedures.
|
||||
* Sep 25, 2015 3873 skorolev Added center definition for moving platforms.
|
||||
* Nov 09, 2015 3841 dhladky Update all tables when zones/stations are updated.
|
||||
* Dec 02, 2015 3873 dhladky Pulled 3841 to 16.1.1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -231,7 +233,7 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
protected abstract void shellDisposeAction();
|
||||
|
||||
/** List of opened plots. **/
|
||||
private Map<String, CaveSWTDialog> openedDlgs = new HashMap<String, CaveSWTDialog>();
|
||||
private final Map<String, CaveSWTDialog> openedDlgs = new HashMap<String, CaveSWTDialog>();
|
||||
|
||||
/** row index in the station table. **/
|
||||
public int rowIndex;
|
||||
|
@ -490,10 +492,7 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
public void updateTableDlg(ObHourReports obHrData) {
|
||||
nominalTime = obHrData.getNominalTime();
|
||||
updateZoneTable(nominalTime);
|
||||
if (!selectedZone.equals("")
|
||||
&& obHrData.getHourReports().containsKey(selectedZone)) {
|
||||
updateStationTable(nominalTime);
|
||||
}
|
||||
updateStationTable(nominalTime);
|
||||
updateNominalTimeLabel(nominalTime);
|
||||
}
|
||||
|
||||
|
@ -795,8 +794,8 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
private void zoomToZone(String zone) throws Exception {
|
||||
Coordinate zoneCenter = MonitorAreaUtils.getZoneCenter(zone);
|
||||
if (zoneCenter == null) { // Test a newly added zone.
|
||||
AreaIdXML zoneXML = configMgr.getAreaXml(zone);
|
||||
if (zoneXML != null // Coordinates do not the null values.
|
||||
AreaIdXML zoneXML = getMonitorAreaConfigInstance().getAreaXml(zone);
|
||||
if (zoneXML != null
|
||||
&& (zoneXML.getCLon() != null || zoneXML.getCLat() != null)) {
|
||||
zoneCenter = new Coordinate(zoneXML.getCLon(),
|
||||
zoneXML.getCLat());
|
||||
|
@ -1013,6 +1012,7 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
public void refreshZoneTableData(ObMultiHrsReports obData) {
|
||||
obData.getObHourReports().updateZones();
|
||||
obData.updateTableCache();
|
||||
this.updateTableDlg(obData.getObHourReports());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,9 +18,7 @@
|
|||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.common.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.common.base.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
|
|
@ -17,11 +17,6 @@
|
|||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.common.core.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dataplugin.modelsounding"
|
||||
download-size="0"
|
||||
|
|
|
@ -66,15 +66,17 @@ import com.raytheon.viz.ui.personalities.awips.CAVE;
|
|||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 4, 2011 njensen Initial creation
|
||||
* Apr 23, 2013 1939 randerso Return null from initializeSerialization
|
||||
* Nov 14, 2013 2361 njensen Remove initializeSerialization()
|
||||
* Nov 06, 2014 3356 njensen Always initialize ILocalizationAdapter
|
||||
* in case cache preference is not enabled
|
||||
* Feb 23, 2015 4164 dlovely Call AlertViz initialize.
|
||||
* Jun 26, 2015 4474 bsteffen Register the PathManager as an OSGi service.
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- --------- --------------------------------------------
|
||||
* Aug 04, 2011 10477 njensen Initial creation
|
||||
* Apr 23, 2013 1939 randerso Return null from initializeSerialization
|
||||
* Nov 14, 2013 2361 njensen Remove initializeSerialization()
|
||||
* Nov 06, 2014 3356 njensen Always initialize ILocalizationAdapter in
|
||||
* case cache preference is not enabled
|
||||
* Feb 23, 2015 4164 dlovely Call AlertViz initialize.
|
||||
* Jun 26, 2015 4474 bsteffen Register the PathManager as an OSGi service.
|
||||
* Dec 04, 2015 5169 bsteffen Allow ProductAlertObserver to send messages
|
||||
* to the AutoUpdater
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -215,11 +217,7 @@ public class ThinClientComponent extends CAVE implements IThinClientComponent {
|
|||
@Override
|
||||
protected void initializeObservers() {
|
||||
ThinClientNotificationManagerJob.getInstance();
|
||||
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
|
||||
if (store.getBoolean(ThinClientPreferenceConstants.P_DISABLE_JMS) == false) {
|
||||
// JMS Enabled, register product alerts
|
||||
registerProductAlerts();
|
||||
}
|
||||
registerProductAlerts();
|
||||
initializeAlertViz();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ import com.raytheon.uf.viz.core.alerts.AlertMessage;
|
|||
import com.raytheon.uf.viz.thinclient.Activator;
|
||||
import com.raytheon.uf.viz.thinclient.preferences.ThinClientPreferenceConstants;
|
||||
import com.raytheon.uf.viz.thinclient.refresh.TimedRefresher.RefreshTimerTask;
|
||||
import com.raytheon.viz.alerts.jobs.AutoUpdater;
|
||||
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
||||
|
||||
/**
|
||||
|
@ -40,10 +39,12 @@ import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
|||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 10, 2011 mschenke Initial creation
|
||||
* Feb 21, 2014 DR 16744 D. Friedman Update all alert observers
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ---------- -------------------------------------------
|
||||
* Nov 10, 2011 7393 mschenke Initial creation
|
||||
* Feb 21, 2014 16744 dfriedman Update all alert observers
|
||||
* Dec 04, 2015 5169 bsteffen Allow ProductAlertObserver to send messages
|
||||
* to the AutoUpdater
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -71,8 +72,6 @@ public class DataRefreshTask implements RefreshTimerTask {
|
|||
s.add(am.dataURI);
|
||||
}
|
||||
ProductAlertObserver.processDataURIAlerts(s);
|
||||
|
||||
new AutoUpdater().alertArrived(alerts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.Set;
|
|||
import java.util.TimeZone;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
|
||||
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
|
||||
|
@ -51,18 +52,20 @@ import com.raytheon.viz.grid.inv.RadarUpdater;
|
|||
import com.raytheon.viz.grid.util.RadarAdapter;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Replacement for {@link DataUpdateTree} which will perform updates by querying
|
||||
* the server for updates for any tree items.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 13, 2011 bsteffen Initial creation
|
||||
* Feb 21, 2014 DR 16744 D. Friedman Add radar/grid updates
|
||||
* Apr 1, 2014 DR 17220 D. Friedman Handle uninitialized grid inventory
|
||||
* Dec 15, 2014 3923 bsteffen Retrieve pdo for grid instead of dataURI.
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ---------- ------------------------------------------
|
||||
* Dec 13, 2011 bsteffen Initial creation
|
||||
* Feb 21, 2014 16744 dfriedman Add radar/grid updates
|
||||
* Apr 01, 2014 17220 dfriedman Handle uninitialized grid inventory
|
||||
* Dec 15, 2014 3923 bsteffen Retrieve pdo for grid instead of dataURI.
|
||||
* Dec 04, 2015 5169 bsteffen Do not send duplicate grid updates.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -107,6 +110,14 @@ public class ThinClientDataUpdateTree extends DataUpdateTree {
|
|||
continue;
|
||||
}
|
||||
Map<String, RequestConstraint> metadata = pair.metadata;
|
||||
RequestConstraint pluginConstraint = metadata
|
||||
.get(PluginDataObject.PLUGIN_NAME_ID);
|
||||
if (pluginConstraint != null
|
||||
&& (pluginConstraint.evaluate(GridConstants.GRID) || pluginConstraint
|
||||
.evaluate("radar"))) {
|
||||
/* Grid and radar do their updates differently. */
|
||||
continue;
|
||||
}
|
||||
metadata = new HashMap<String, RequestConstraint>(metadata);
|
||||
metadata.put("insertTime", new RequestConstraint(time,
|
||||
ConstraintType.GREATER_THAN));
|
||||
|
@ -176,7 +187,8 @@ public class ThinClientDataUpdateTree extends DataUpdateTree {
|
|||
private void getGridUpdates(String time, Set<AlertMessage> messages) {
|
||||
Map<String, RequestConstraint> newQuery = new HashMap<String, RequestConstraint>();
|
||||
DbQueryRequest dbRequest = new DbQueryRequest();
|
||||
newQuery.put("pluginName", new RequestConstraint("grid"));
|
||||
newQuery.put(PluginDataObject.PLUGIN_NAME_ID, new RequestConstraint(
|
||||
GridConstants.GRID));
|
||||
newQuery.put("insertTime", new RequestConstraint(time,
|
||||
ConstraintType.GREATER_THAN));
|
||||
dbRequest.setConstraints(newQuery);
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.common.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.nwsauth.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</productCreator>
|
||||
<productCreator
|
||||
creatorClass="com.raytheon.viz.volumebrowser.loader.TimeSeriesProductCreator"
|
||||
plugins="goessounding,poessounding,profiler,bufrmosLAMP,modelsounding,radar"
|
||||
plugins="goessounding,poessounding,profiler,bufrmosLAMP,modelsounding,radar,ldadmesonet"
|
||||
resourceType="time_series">
|
||||
</productCreator>
|
||||
<productCreator
|
||||
|
|
|
@ -75,6 +75,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* Sep 09, 2014 3356 njensen Remove CommunicationException
|
||||
* Aug 03, 2015 3861 bsteffen Move resource creation to ProductCreators
|
||||
* Oct 22, 2015 4970 bsteffen Add ldadmesonet to supported plugins.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -320,7 +321,7 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog {
|
|||
@Override
|
||||
protected String[] getPlugins() {
|
||||
return new String[] { "goessounding", "poessounding", "profiler",
|
||||
"bufrua", "obs", "bufrmosLAMP" };
|
||||
"bufrua", "obs", "bufrmosLAMP", "ldadmesonet" };
|
||||
// njensen removed bufrmosAVN, bufrmosETA, bufrmosGFS, bufrmosHPC,
|
||||
// bufrmosMRF, bufrmosNGM
|
||||
// TODO ideally this list should not be in code, and should contain all
|
||||
|
|
|
@ -36,8 +36,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.style.level.Level.LevelType;
|
||||
import com.raytheon.uf.common.topo.TopoException;
|
||||
import com.raytheon.uf.common.topo.TopoQuery;
|
||||
import com.raytheon.uf.common.topo.CachedTopoQuery;
|
||||
import com.raytheon.uf.common.wxmath.Hgt2Pres;
|
||||
import com.raytheon.uf.viz.core.DrawableString;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
|
@ -74,13 +73,14 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 3, 2010 bsteffen Initial creation
|
||||
* Feb 15, 2013 1638 mschenke Got rid of viz/edex topo classes
|
||||
* and moved into common
|
||||
* Aug 13, 2013 2262 dgilling Use new wxmath hgt2pres method.
|
||||
* Jun 14, 2014 3242 njensen Null safety checks
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- --------- --------------------------
|
||||
* Jul 03, 2010 bsteffen Initial creation
|
||||
* Feb 15, 2013 1638 mschenke Got rid of viz/edex topo classes
|
||||
* and moved into common
|
||||
* Aug 13, 2013 2262 dgilling Use new wxmath hgt2pres method.
|
||||
* Jun 14, 2014 3242 njensen Null safety checks
|
||||
* Oct 27, 2015 5051 bsteffen Use cached topo
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -422,15 +422,9 @@ public class CrossSectionGraph extends AbstractGraph {
|
|||
case PRESSURE:
|
||||
Coordinate[] lineData;
|
||||
lineData = GeoUtil.splitLine(numPoints, line.getCoordinates());
|
||||
|
||||
heights = CachedTopoQuery.getInstance().getHeight(lineData);
|
||||
|
||||
try {
|
||||
heights = TopoQuery.getInstance().getHeight(lineData);
|
||||
} catch (TopoException e) {
|
||||
statusHandler
|
||||
.error("Error occured requesting Topo data, topo will be unavailable.",
|
||||
e);
|
||||
return new double[numPoints];
|
||||
}
|
||||
if (csDesc.getHeightScale().getHeightType() == LevelType.PRESSURE) {
|
||||
for (int i = 0; i < heights.length; i++) {
|
||||
heights[i] = Hgt2Pres.hgt2pres((float) heights[i]);
|
||||
|
|
|
@ -52,6 +52,7 @@ import com.raytheon.uf.common.style.StyleManager;
|
|||
import com.raytheon.uf.common.style.StyleManager.StyleType;
|
||||
import com.raytheon.uf.common.style.StyleRule;
|
||||
import com.raytheon.uf.common.style.image.ColorMapParameterFactory;
|
||||
import com.raytheon.uf.common.style.image.ImagePreferences;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
|
@ -177,12 +178,13 @@ public class CrossSectionImageResource extends AbstractCrossSectionResource {
|
|||
float[] floatData = sliceMap.get(time).get(0);
|
||||
StyleRule styleRule = loadStyleRule();
|
||||
try {
|
||||
if (styleRule == null) {
|
||||
if (styleRule == null
|
||||
|| !(styleRule.getPreferences() instanceof ImagePreferences)) {
|
||||
colorMapParams = ColorMapParameterFactory.build(floatData,
|
||||
resourceData.getParameter(), getUnit(), null);
|
||||
} else {
|
||||
colorMapParams = ColorMapParameterFactory.build(styleRule,
|
||||
getUnit());
|
||||
floatData, null, getUnit());
|
||||
}
|
||||
} catch (StyleException e) {
|
||||
throw new VizException(
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
|
@ -59,6 +59,7 @@
|
|||
<notifyRaise>disabled</notifyRaise>
|
||||
<notifyPlay>disabled</notifyPlay>
|
||||
<playFile>None</playFile>
|
||||
<alertIntervalMinutes>10</alertIntervalMinutes>
|
||||
<blink>true</blink>
|
||||
<disallowSend>error</disallowSend>
|
||||
<loadOrder>latest</loadOrder>
|
||||
|
|
|
@ -89,6 +89,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 10/15/2012 1229 rferrel Changes for non-blocking HelpUsageDlg.
|
||||
* 16 Aug 2013 #2256 lvenable Fixed image and cursor memory leaks.
|
||||
* 19Mar2014 #2925 lvenable Added dispose checks for runAsync.
|
||||
* 12/22/2015 18342 zhao Modified code for 'jnt' in objReceived()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -886,7 +887,7 @@ public class CigVisDistributionDlg extends CaveSWTDialog implements
|
|||
int flightCat = (Integer) list.get(3);
|
||||
float cig = (Float) list.get(4);
|
||||
float vis = (Float) list.get(5);
|
||||
float jnt = Math.min(cig, vis);
|
||||
float jnt = (Float) list.get(6);
|
||||
|
||||
data.set(month, hour, windDir, flightCat, vis, cig, jnt);
|
||||
} else {
|
||||
|
|
|
@ -42,6 +42,7 @@ import com.raytheon.viz.aviation.xml.WxPlotCfg;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 25 JUN 2008 1119 lvenable Initial creation
|
||||
* 18 Nov 2010 6701 rferrel Use PlotViewerCfg class name.
|
||||
* 03 Nov 2016 5060 rferrel No longer scale {@link #top}.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -91,8 +92,14 @@ public class WeatherCigCanvasComp extends WeatherCanvasComp {
|
|||
|
||||
private WeatherPlotDataManager dataMgr;
|
||||
|
||||
/**
|
||||
* Max value displayed on the plot.
|
||||
*/
|
||||
private double top;
|
||||
|
||||
/**
|
||||
* Minimum value displayed on the plot.
|
||||
*/
|
||||
private double bottom;
|
||||
|
||||
/**
|
||||
|
@ -107,8 +114,6 @@ public class WeatherCigCanvasComp extends WeatherCanvasComp {
|
|||
WxPlotCfg wxPlotCfg) {
|
||||
super(parent, "CEILING", currentTime, wxPlotCfg);
|
||||
dataMgr = WeatherPlotDataManager.getInstance();
|
||||
|
||||
// this.parent = parent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,14 +123,16 @@ public class WeatherCigCanvasComp extends WeatherCanvasComp {
|
|||
* Graphics context.
|
||||
*/
|
||||
@Override
|
||||
public void drawCanvasData(GC gc) {// need to check for changes in labels
|
||||
// for graph and reset them if
|
||||
// necessary
|
||||
public void drawCanvasData(GC gc) {
|
||||
/*
|
||||
* need to check for changes in labels for graph and reset them if
|
||||
* necessary
|
||||
*/
|
||||
WxPlotCfg config = dataMgr.getWxPlotCfg();
|
||||
top = config.getCeilingTop() / 100;
|
||||
bottom = config.getCeilingBottom() / 100;
|
||||
String ceilingTop = String.format("%03.0f", top);
|
||||
String ceilingBottom = String.format("%03.0f", bottom);
|
||||
top = config.getCeilingTop();
|
||||
bottom = config.getCeilingBottom();
|
||||
String ceilingTop = String.format("%03.0f", top / 100);
|
||||
String ceilingBottom = String.format("%03.0f", bottom / 100);
|
||||
|
||||
int fontHeight = gc.getFontMetrics().getHeight();
|
||||
int halfFontHeight = fontHeight / 2;
|
||||
|
|
22
cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java
Normal file → Executable file
22
cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java
Normal file → Executable file
|
@ -96,7 +96,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
|
|||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.python.PyUtil;
|
||||
import com.raytheon.uf.common.python.PythonScript;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -247,6 +247,9 @@ import com.raytheon.viz.ui.simulatedtime.SimulatedTimeOperations;
|
|||
* Sep 28, 2015 4898 rferrel Disable sending of TAF when CAVE not in real time.
|
||||
* Oct 05, 2015 4855 skorolev Fixed an unhandled event loop exception in createErrorStyleRange.
|
||||
* Oct 16, 2015 4645 skorolev Added updateWordWrap.
|
||||
* 10/23/2015 18061 zhao Fixed a bug in checkBaiscSyntaxError()
|
||||
* Nov 12, 2015 4834 njensen Changed LocalizationOpFailedException to LocalizationException
|
||||
* Dec 09, 2015 4645 skorolev Initiated wrapChk using ResourceTag. Removed popup menu persistance.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1943,6 +1946,11 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
wrapChk = new Button(controlsComp, SWT.CHECK);
|
||||
wrapChk.setText("Wrap");
|
||||
configMgr.setDefaultFontAndColors(wrapChk);
|
||||
if (configMgr.getDataAsString(ResourceTag.Wrap).equals("word")) {
|
||||
wrapChk.setSelection(true);
|
||||
} else {
|
||||
wrapChk.setSelection(false);
|
||||
}
|
||||
wrapChk.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -2035,7 +2043,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
tafStartIndex += taf.length() + 2;
|
||||
}
|
||||
|
||||
if (doLogMessage) {
|
||||
if (doLogMessage && errorFound) {
|
||||
msgStatComp.setMessageText(msg, qcColors[3].getRGB());
|
||||
}
|
||||
|
||||
|
@ -2430,7 +2438,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
e.printStackTrace();
|
||||
setMessageStatusError("An IOException occured while saving file "
|
||||
+ filepath);
|
||||
} catch (LocalizationOpFailedException e) {
|
||||
} catch (LocalizationException e) {
|
||||
e.printStackTrace();
|
||||
setMessageStatusError("A LocalizationOpFailedException occured while saving file "
|
||||
+ filepath);
|
||||
|
@ -2751,6 +2759,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
return;
|
||||
}
|
||||
editorTafTabComp.getTextEditorControl().cut();
|
||||
// Remove popup menu.
|
||||
editorTafTabComp.getTextEditorControl().redraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2792,6 +2802,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
}
|
||||
} else {
|
||||
editorTafTabComp.getTextEditorControl().copy();
|
||||
// Remove popup menu.
|
||||
editorTafTabComp.getTextEditorControl().redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2878,6 +2890,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
if (tabFolder.getSelectionIndex() != VIEWER_TAB_SELECTED) {
|
||||
// Assume editorTafTabComp is for the active tab.
|
||||
editorTafTabComp.undo();
|
||||
// Remove popup menu.
|
||||
editorTafTabComp.getTextEditorControl().redraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2890,6 +2904,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
|
|||
if (tabFolder.getSelectionIndex() != VIEWER_TAB_SELECTED) {
|
||||
// Assume editorTafTabComp is for the active tab.
|
||||
editorTafTabComp.redo();
|
||||
// Remove popup menu.
|
||||
editorTafTabComp.getTextEditorControl().redraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ import com.raytheon.uf.viz.core.requests.ThriftClient;
|
|||
* Sep 10, 2009 njensen Initial creation
|
||||
* Apr 10, 2013 1735 rferrel Convert to ThinClient and DbQueryRequests.
|
||||
* Sep 16, 2015 4880 njensen Optimized requests for data
|
||||
* Dec 01, 2015 5156 rferrel {@linkplain #getCcfpData(long)} do not shrink dtList
|
||||
* when it contains 3 or fewer elements.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -136,10 +138,12 @@ public class MonitorDataUtil {
|
|||
return new CcfpRecord[0];
|
||||
}
|
||||
|
||||
// filter so only the three most recent periods are included
|
||||
// filter so no more then the three most recent periods are included
|
||||
Collections.sort(dtList,
|
||||
Collections.reverseOrder(new DataTimeComparator()));
|
||||
dtList = dtList.subList(0, 3);
|
||||
if (dtList.size() > 3) {
|
||||
dtList = dtList.subList(0, 3);
|
||||
}
|
||||
String[] dts = new String[dtList.size()];
|
||||
for (int index = 0; index < dts.length; ++index) {
|
||||
dts[index] = dtList.get(index).toString();
|
||||
|
|
|
@ -24,6 +24,9 @@ import java.io.FileInputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.raytheon.viz.aviation.resource.ResourceConfigMgr;
|
||||
import com.raytheon.viz.aviation.resource.ResourceConfigMgr.ResourceTag;
|
||||
|
||||
import sun.audio.AudioData;
|
||||
import sun.audio.AudioDataStream;
|
||||
import sun.audio.AudioPlayer;
|
||||
|
@ -35,9 +38,10 @@ import sun.audio.AudioStream;
|
|||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ --------- ----------- --------------------------
|
||||
* Dec 2, 2009 avarani Initial creation
|
||||
* Oct 20,2015 17445 yteng Set alert interval
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -46,6 +50,9 @@ import sun.audio.AudioStream;
|
|||
*/
|
||||
|
||||
public class NotifyAudioManager {
|
||||
|
||||
private static long lastAlertTime = 0;
|
||||
|
||||
private static NotifyAudioManager nam;
|
||||
|
||||
private String filename;
|
||||
|
@ -69,15 +76,27 @@ public class NotifyAudioManager {
|
|||
}
|
||||
|
||||
public void playFile(String filename) throws IOException {
|
||||
if (!filename.equals(this.filename)) {
|
||||
File soundFile = new File(filename);
|
||||
InputStream in = new FileInputStream(soundFile);
|
||||
AudioStream as = new AudioStream(in);
|
||||
AudioData data = as.getData();
|
||||
ads = new AudioDataStream(data);
|
||||
}
|
||||
|
||||
AudioPlayer.player.stop(ads);
|
||||
AudioPlayer.player.start(ads);
|
||||
ResourceConfigMgr configMgr = ResourceConfigMgr.getInstance();
|
||||
int alertIntervalMinutes = configMgr.getResourceAsInt(ResourceTag.AlertIntervalMinutes);
|
||||
|
||||
long currentTime = System.currentTimeMillis();
|
||||
if (currentTime >= (lastAlertTime + alertIntervalMinutes*60*1000)) {
|
||||
lastAlertTime = currentTime;
|
||||
|
||||
if (!filename.equals(this.filename)) {
|
||||
File soundFile = new File(filename);
|
||||
InputStream in = new FileInputStream(soundFile);
|
||||
AudioStream as = new AudioStream(in);
|
||||
AudioData data = as.getData();
|
||||
ads = new AudioDataStream(data);
|
||||
}
|
||||
AudioPlayer.player.stop(ads);
|
||||
AudioPlayer.player.start(ads);
|
||||
}
|
||||
}
|
||||
|
||||
public static void resetAlertTime() {
|
||||
lastAlertTime = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.util.regex.Pattern;
|
|||
import javax.xml.bind.JAXB;
|
||||
|
||||
import org.apache.commons.collections.ListUtils;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
|
@ -51,8 +52,10 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.tafqueue.ServerResponse;
|
||||
import com.raytheon.uf.common.tafqueue.TafQueueRecord;
|
||||
import com.raytheon.uf.common.tafqueue.TafQueueRecord.TafQueueState;
|
||||
import com.raytheon.uf.common.tafqueue.TafQueueRequest;
|
||||
import com.raytheon.uf.common.tafqueue.TafQueueRequest.Type;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
|
@ -84,6 +87,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 06May2014 3091 rferrel Use OUP authorization to bring up send dialog.
|
||||
* 20May2015 4510 rferrel Added {@link #getForecasterId()}.
|
||||
* Sep 25, 2015 4918 rferrel Allow selection of forecaster to send a TAF.
|
||||
* Nov 06, 2015 5108 rferrel Display warning when forecast xmittime will result in a
|
||||
* header time the same as any existing pending forecast.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -456,15 +461,66 @@ public class SendDialog extends CaveSWTDialog {
|
|||
request.setType(Type.CREATE);
|
||||
request.setUser(UserController.getUserObject());
|
||||
|
||||
Calendar xmitTime = Calendar.getInstance();
|
||||
xmitTime.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
Calendar xmitTime = TimeUtil.newGmtCalendar();
|
||||
xmitTime.set(Calendar.HOUR_OF_DAY, hourSpnr.getSelection());
|
||||
xmitTime.set(Calendar.MINUTE, minuteSpnr.getSelection());
|
||||
xmitTime.set(Calendar.SECOND, secondSpnr.getSelection());
|
||||
xmitTime.set(Calendar.MILLISECOND, 0);
|
||||
String xmitTimestamp = String.format(TIMESTAMP_FORMAT,
|
||||
xmitTime.get(Calendar.DAY_OF_MONTH),
|
||||
xmitTime.get(Calendar.HOUR_OF_DAY),
|
||||
xmitTime.get(Calendar.MINUTE));
|
||||
|
||||
/*
|
||||
* Check for pending entries with same xmitTimestamp. The header
|
||||
* timestamp is always adjusted to the xmitTimestamp.
|
||||
*/
|
||||
TafQueueRequest pendingRequest = new TafQueueRequest();
|
||||
pendingRequest.setType(Type.GET_TAFS);
|
||||
pendingRequest.setUser(UserController.getUserObject());
|
||||
pendingRequest.setXmitTime(xmitTime.getTime());
|
||||
pendingRequest.setState(TafQueueState.PENDING);
|
||||
ServerResponse<List<String>> pendingResponse = null;
|
||||
try {
|
||||
pendingResponse = (ServerResponse<List<String>>) ThriftClient
|
||||
.sendRequest(pendingRequest);
|
||||
} catch (VizException e1) {
|
||||
String msg = "Unable to get pending TAFs. ";
|
||||
statusHandler.handle(Priority.PROBLEM, msg, e1);
|
||||
msgStatComp.setMessageText(msg,
|
||||
shell.getDisplay().getSystemColor(SWT.COLOR_RED).getRGB());
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> pendingList = pendingResponse.getPayload();
|
||||
|
||||
if (!pendingList.isEmpty()) {
|
||||
StringBuilder message = new StringBuilder("The pending queue ");
|
||||
if (pendingList.size() == 1) {
|
||||
message.append("has a product with the same header time");
|
||||
} else {
|
||||
message.append("has products with the same header time");
|
||||
}
|
||||
|
||||
msgStatComp.setMessageText(message.toString() + ".", shell
|
||||
.getDisplay().getSystemColor(SWT.COLOR_RED).getRGB());
|
||||
message.append(":\n");
|
||||
for (String filename : pendingList) {
|
||||
message.append(filename.split(",", 2)[1]).append("\n");
|
||||
}
|
||||
message.append("\nSelect OK to transmit this product with the same header time.");
|
||||
|
||||
MessageDialog dlg = new MessageDialog(shell,
|
||||
"Duplicate Transmission Time", null, message.toString(),
|
||||
MessageDialog.WARNING, new String[] { "OK", "Cancel" }, 1);
|
||||
if (0 != dlg.open()) {
|
||||
return;
|
||||
} else {
|
||||
statusHandler
|
||||
.info("WARNING multiple products with same header time in the pending queue.");
|
||||
}
|
||||
}
|
||||
|
||||
// BBB
|
||||
String in = tabComp.getTextEditorControl().getText();
|
||||
String bbb = tabComp.getBBB();
|
||||
|
|
|
@ -70,6 +70,7 @@ import com.raytheon.viz.aviation.monitor.GfsMonitorObserver;
|
|||
import com.raytheon.viz.aviation.monitor.IGridDataRetrieveListener;
|
||||
import com.raytheon.viz.aviation.monitor.LtgMonitorObserver;
|
||||
import com.raytheon.viz.aviation.monitor.MetarMonitorObserver;
|
||||
import com.raytheon.viz.aviation.monitor.NotifyAudioManager;
|
||||
import com.raytheon.viz.aviation.monitor.PythonMonitorJob;
|
||||
import com.raytheon.viz.aviation.monitor.RltgMonitorObserver;
|
||||
import com.raytheon.viz.aviation.monitor.ScheduledMonitorTask;
|
||||
|
@ -95,11 +96,11 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
|
||||
/**
|
||||
* TafMonitorDlg (Terminal Aerodome Forecast Monitor Dialog) class.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 1/24/2008 817 grichard Initial creation.
|
||||
|
@ -147,9 +148,10 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* 03/07/2013 1735 rferrel Performance speed up for retrieving grid data.
|
||||
* 08/09/2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR
|
||||
* Sep 15, 2015 4880 njensen Removed reference to ForecastModel
|
||||
*
|
||||
* 10/20/2015 17445 yteng Reset alert time for audio alert.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author grichard
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -331,6 +333,7 @@ public class TafMonitorDlg extends CaveSWTDialog implements
|
|||
initializeData();
|
||||
initializeComponents();
|
||||
setupMonitoring();
|
||||
NotifyAudioManager.resetAlertTime();
|
||||
|
||||
shell.addShellListener(new ShellAdapter() {
|
||||
@Override
|
||||
|
|
|
@ -52,6 +52,7 @@ import com.raytheon.viz.aviation.activator.Activator;
|
|||
* methods and method to reset data values.
|
||||
* Dec 9, 2010 7380 rferrel Changed spinner values for text fields.
|
||||
* Dec 14, 2010 5782 rferrel Fixed numTafs combo string array.
|
||||
* Oct 20, 2015 17445 yteng Add audio alert interval field.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -90,7 +91,8 @@ public class ResourceConfigMgr implements IResourceAction {
|
|||
"alertLevel3"), AlertLevel4("alertLevel4"), AlertLevel5(
|
||||
"alertLevel5"), AlertLevel6("alertLevel6"), NotifyDeiconify(
|
||||
"notifyDeiconify"), NotifyRaise("notifyRaise"), NotifyPlay(
|
||||
"notifyPlay"), PlayFile("playFile"), Blink("blink"), DisallowSend(
|
||||
"notifyPlay"), PlayFile("playFile"), AlertIntervalMinutes(
|
||||
"alertIntervalMinutes"), Blink("blink"), DisallowSend(
|
||||
"disallowSend"), LoadOrder("loadOrder"), AutoSave("autoSave"), UpdateTimes(
|
||||
"updateTimes"), AutoPrint("autoPrint"), Insert("insert"), Wrap(
|
||||
"wrap"), AmdButtons("amdbuttons"), NumTafs("numTafs"), NumHours(
|
||||
|
@ -228,6 +230,8 @@ public class ResourceConfigMgr implements IResourceAction {
|
|||
ResourceType.COMBO, "Alert level to play file"));
|
||||
resourceTypeMap.put(ResourceTag.PlayFile, new ResourceInfo(
|
||||
ResourceType.FILE, "Sound to play on TAF alert"));
|
||||
resourceTypeMap.put(ResourceTag.AlertIntervalMinutes, new ResourceInfo(
|
||||
ResourceType.SPINNER, "TAF alert interval in minutes"));
|
||||
resourceTypeMap.put(ResourceTag.Blink, new ResourceInfo(
|
||||
ResourceType.CHECK, "Blink on new notification"));
|
||||
resourceTypeMap.put(ResourceTag.DisallowSend, new ResourceInfo(
|
||||
|
@ -297,6 +301,9 @@ public class ResourceConfigMgr implements IResourceAction {
|
|||
final int htMin = 50;
|
||||
final int htMax = 1200;
|
||||
final int inc = 50;
|
||||
final int aiMin = 1;
|
||||
final int aiMax = 60;
|
||||
final int aiInc = 1;
|
||||
|
||||
if (resourceTag == ResourceTag.TextWidth) {
|
||||
return new SpinnerData(wdMin, wdMax, inc);
|
||||
|
@ -312,6 +319,8 @@ public class ResourceConfigMgr implements IResourceAction {
|
|||
return new SpinnerData(wdMin, wdMax, inc);
|
||||
} else if (resourceTag == ResourceTag.TextViewerHeight) {
|
||||
return new SpinnerData(htMin, htMax, inc);
|
||||
} else if (resourceTag == ResourceTag.AlertIntervalMinutes) {
|
||||
return new SpinnerData(aiMin, aiMax, aiInc);
|
||||
}
|
||||
|
||||
return new SpinnerData(0, 100, 10);
|
||||
|
|
|
@ -59,6 +59,7 @@ import com.raytheon.viz.aviation.resource.ResourceConfigMgr.ResourceTag;
|
|||
* 30 Aug 2013 #2164 bkowal Add default case statement for MSFT Windows
|
||||
* Java. Replaced platform-dependent code with
|
||||
* code that is not platform-dependent.
|
||||
* Oct 20, 2015 17445 yteng Add audio alert interval.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -526,6 +527,9 @@ public class ResourceDataManager {
|
|||
resourceMap.put(ResourceTag.NotifyPlay, notifyPlay);
|
||||
String playFile = resourceCB.getResourceAsString(ResourceTag.PlayFile);
|
||||
resourceMap.put(ResourceTag.PlayFile, playFile);
|
||||
int alertIntervalMinutes = resourceCB
|
||||
.getResourceAsInt(ResourceTag.TextEditorInsWidth);
|
||||
resourceMap.put(ResourceTag.AlertIntervalMinutes, alertIntervalMinutes);
|
||||
boolean blink = resourceCB.getResourceAsBoolean(ResourceTag.Blink);
|
||||
resourceMap.put(ResourceTag.Blink, Boolean.valueOf(blink));
|
||||
String disalowSend = resourceCB
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Jul 07, 2015 16907 zhao Modified to work with new ids- files
|
||||
# Dec 22, 2015 18341 zhao Modified __writeHDFData to avoid 'bad' input
|
||||
|
||||
import sys
|
||||
sys.argv = [__name__]
|
||||
|
@ -465,6 +466,8 @@ required NCDC data.
|
|||
shape = f_col.descr._v_colObjects[col].shape[0] - 1
|
||||
#datum = datum + [self.__get_msng(f_col.type)]*(f_col.shape[0]-len(datum))
|
||||
datum = datum + [self.__get_msng(f_col.type)] * (f_col.descr._v_colObjects[col].shape[0] - len(datum))
|
||||
if len(numpy.array(datum)) != len(row[col]):
|
||||
continue
|
||||
row[col] = numpy.array(datum).astype(f_col.type)
|
||||
except Exception, e:
|
||||
self.__updateMonitor(str(e) + '\n')
|
||||
|
|
|
@ -1076,19 +1076,11 @@ class Decoder(tpg.VerboseParser):
|
|||
add_msg(self._group['obv'], 'error', 13)
|
||||
|
||||
def check_vsby_wx(self, g):
|
||||
# NWSI 10-813, 1.2.6
|
||||
if 'vsby' in g and g['vsby']['str'] == 'P6SM':
|
||||
if 'obv' in g and 'nsw' not in g:
|
||||
for wx in g['obv']['str'].split():
|
||||
if wx not in _UnltdVsbyWx:
|
||||
raise Error(_Errors[18])
|
||||
else:
|
||||
if 'vsby' in g:
|
||||
try:
|
||||
vsby = g['vsby']['value']
|
||||
except KeyError:
|
||||
return
|
||||
if not ('pcp' in g or 'obv' in g or 'nsw' in g):
|
||||
add_msg(g['vsby'], 'error', 12)
|
||||
# visibility consistent with precipitation
|
||||
snow = 0
|
||||
if 'pcp' in g:
|
||||
|
@ -1103,29 +1095,40 @@ class Decoder(tpg.VerboseParser):
|
|||
elif ptype in ('SN', 'DZ'):
|
||||
snow = invalid_sn_vsby(i, vsby)
|
||||
except TypeError: # TS
|
||||
pass
|
||||
if 'obv' in g:
|
||||
for tok in g['obv']['str'].split():
|
||||
wx = tok[-2:]
|
||||
if wx == 'FG' and \
|
||||
invalid_fg_vsby(tok, vsby):
|
||||
raise Error(_Errors[14])
|
||||
if wx == 'BR' and invalid_br_vsby(vsby):
|
||||
raise Error(_Errors[15])
|
||||
if wx in ('DS', 'SS'):
|
||||
if tok[0] in '+-':
|
||||
i = tok[0]
|
||||
pass
|
||||
if g['vsby']['str'] == 'P6SM':
|
||||
if 'obv' in g and 'nsw' not in g:
|
||||
for wx in g['obv']['str'].split():
|
||||
if wx not in _UnltdVsbyWx:
|
||||
raise Error(_Errors[18])
|
||||
if snow == -1:
|
||||
raise Error(_Errors[54])
|
||||
# NWSI 10-813, 1.2.6
|
||||
else:
|
||||
if not ('pcp' in g or 'obv' in g or 'nsw' in g):
|
||||
add_msg(g['vsby'], 'error', 12)
|
||||
if 'obv' in g:
|
||||
for tok in g['obv']['str'].split():
|
||||
wx = tok[-2:]
|
||||
if wx == 'FG' and \
|
||||
invalid_fg_vsby(tok, vsby):
|
||||
raise Error(_Errors[14])
|
||||
if wx == 'BR' and invalid_br_vsby(vsby):
|
||||
raise Error(_Errors[15])
|
||||
if wx in ('DS', 'SS'):
|
||||
if tok[0] in '+-':
|
||||
i = tok[0]
|
||||
else:
|
||||
i = ''
|
||||
if invalid_ds_vsby(i, vsby):
|
||||
raise Error(_Errors[55])
|
||||
if snow == -1:
|
||||
raise Error(_Errors[54])
|
||||
else:
|
||||
if snow:
|
||||
raise Error(_Errors[54])
|
||||
if snow == -1:
|
||||
raise Error(_Errors[54])
|
||||
else:
|
||||
if snow:
|
||||
raise Error(_Errors[54])
|
||||
|
||||
#######################################################################
|
||||
########################################################################
|
||||
# Methods called by the parser
|
||||
def prefix(self, s):
|
||||
pass
|
||||
|
|
|
@ -31,6 +31,11 @@
|
|||
# Change Document History:
|
||||
# %PIRC%
|
||||
#
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ---------- ---------- ----------- --------------------------
|
||||
# 10/28/2015 15464 zhao Modified mkTempo & mkProb30 to handle case of "TS"+"SKC"
|
||||
#
|
||||
import sys,os,copy,cPickle,math,ConfigParser,time,logging
|
||||
import AvnLib, AvnParser, Avn
|
||||
|
||||
|
@ -325,10 +330,11 @@ class LampProjection(Projection):
|
|||
visStr = self.vis['str']
|
||||
if 'TS' in tmpStr:
|
||||
#make sure cig is below threshold
|
||||
cig = int(skyStr[3:])
|
||||
if cig > self.grpTaf['cbhight']:
|
||||
cig = self.grpTaf['cbhight']
|
||||
skyStr = "%s%03d%s" %('BKN',cig,'CB')
|
||||
if skyStr != 'SKC':
|
||||
cig = int(skyStr[3:])
|
||||
if cig > self.grpTaf['cbhight']:
|
||||
cig = self.grpTaf['cbhight']
|
||||
skyStr = "%s%03d%s" %('BKN',cig,'CB')
|
||||
return {'wxStr':fixPcp(tmpStr),'visStr':visStr,\
|
||||
'skyStr':skyStr}
|
||||
|
||||
|
@ -360,10 +366,11 @@ class LampProjection(Projection):
|
|||
visStr = self.vis['str']
|
||||
if 'TS' in tmpStr:
|
||||
#make sure cig is below threshold
|
||||
cig = int(skyStr[3:])
|
||||
if cig > self.grpTaf['cbhight']:
|
||||
cig = self.grpTaf['cbhight']
|
||||
skyStr = "%s%03d%s" %('BKN',cig,'CB')
|
||||
if skyStr != 'SKC':
|
||||
cig = int(skyStr[3:])
|
||||
if cig > self.grpTaf['cbhight']:
|
||||
cig = self.grpTaf['cbhight']
|
||||
skyStr = "%s%03d%s" %('BKN',cig,'CB')
|
||||
return {'wxStr':fixPcp(tmpStr),'visStr':visStr,\
|
||||
'skyStr':skyStr}
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
# Generates ceiling/visibility distribution by month, hour and wind direction
|
||||
# George Trojan, SAIC/MDL, December 2005
|
||||
# last update: 03/14/06
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- -----------------------------------
|
||||
# Dec 22, 2015 18342 zhao Modified _process() to also pass 'jnt_count'
|
||||
|
||||
|
||||
import logging, os, time, cPickle
|
||||
import Avn, ClimLib
|
||||
|
@ -174,7 +178,7 @@ def get_data(table, queue):
|
|||
for windDir in range(num_wind_dir):
|
||||
for flightCat in range(num_cat+1):
|
||||
sendObj = [month, hour, windDir, flightCat, float(cig_count[month][hour][windDir][flightCat]),
|
||||
float(vis_count[month][hour][windDir][flightCat])]#, float(jnt_count[month][hour][windDir][flightCat])]
|
||||
float(vis_count[month][hour][windDir][flightCat]), float(jnt_count[month][hour][windDir][flightCat])]
|
||||
#print "sendObj", sendObj
|
||||
queue.put(sendObj)
|
||||
queue.put("done")
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue