USPLN support added to binlightning plugin

Former-commit-id: cc4a291081
This commit is contained in:
AWIPS User 2015-06-22 19:05:53 -06:00
parent e3d9d5602f
commit d4634d3d23
11 changed files with 512 additions and 3 deletions

View file

@ -46,6 +46,14 @@
</separator>
<separator name="EndOfSynoptic" visible="true">
</separator>
<command
commandId="com.raytheon.viz.ui.actions.titleAction"
label="------ Lightning ------">
</command>
<separator
name="USPLNPLACEHOLDER"
visible="false">
</separator>
<command commandId="com.raytheon.viz.ui.actions.titleAction"
label="------ Local data ------">
</command>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<bundle>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
</loadProperties>
<properties isSystemResource="false"
isBlinking="false" isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning" constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<bundle>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true"/>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="false" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="900" virtualOffset="0" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="false">
<binOffset posOffset="0" negOffset="900" virtualOffset="0" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<bundle>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
</loadProperties>
<properties isSystemResource="false"
isBlinking="false" isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="300" virtualOffset="0"/>
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning" constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<bundle>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
</loadProperties>
<properties isSystemResource="false"
isBlinking="false" isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="3600" virtualOffset="0"/>
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning" constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<bundle>
<displayList>
<displays xsi:type="d2DMapRenderableDisplay"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<descriptor xsi:type="mapDescriptor">
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorableCapability"
colorAsString="#ffffff" />
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="60" virtualOffset="-300" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorableCapability"
colorAsString="#ffff9c" />
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="60" virtualOffset="-600" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorableCapability"
colorAsString="#ffff00" />
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="60" virtualOffset="-1200" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorableCapability"
colorAsString="#ffa600" />
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="60" virtualOffset="-2400" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorableCapability"
colorAsString="#ff7900" />
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="60" virtualOffset="-4800" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
<resource>
<loadProperties loadWithoutData="true">
<capabilities>
<capability xsi:type="colorableCapability"
colorAsString="#ff0000" />
</capabilities>
<resourceType>PLAN_VIEW</resourceType>
</loadProperties>
<properties isSystemResource="false" isBlinking="false"
isMapLayer="false" isHoverOn="false"
isVisible="true" />
<resourceData xsi:type="lightningResourceData"
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
<binOffset posOffset="0" negOffset="60" virtualOffset="-9600" />
<metadataMap>
<mapping key="pluginName">
<constraint constraintValue="binlightning"
constraintType="EQUALS" />
</mapping>
<mapping key="source">
<constraint constraintValue="${source}" constraintType="EQUALS" />
</mapping>
</metadataMap>
</resourceData>
</resource>
</descriptor>
</displays>
</displayList>
</bundle>

View file

@ -19,6 +19,8 @@
further_licensing_information.
-->
<menuContributionFile>
<include installTo="menu:obs?after=USPLNPLACEHOLDER"
fileName="menus/lightning/usplnMenuItems.xml"/>
<include installTo="menu:obs?after=LIGHTNINGPLACEHOLDER"
fileName="menus/lightning/lightningMenuItems.xml"
subMenu="Lightning"/>

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="bundleItem" file="bundles/USPLNPlot60Min.xml"
menuText="USPLN 1hr plot" id="1HrUSPLNFlashPlot">
<substitute key="source" value="USPLN"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/USPLNPlot15Min.xml"
menuText="USPLN 15min plot" id="15MinUSPLNFlashPlot">
<substitute key="source" value="USPLN"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/USPLNPlot15MinPN.xml"
menuText="USPLN 15min Pos/Neg plot" id="15MinPNLightningFlashPlot">
<substitute key="source" value="USPLN"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/USPLNPlot5Min.xml"
menuText="USPLN 5min plot" id="5MinUSPLNFlashPlot">
<substitute key="source" value="USPLN"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/USPLNSeq60min.xml"
menuText="USPLN 1hr Lgtng Seq Plot" id="60HrUSPLNFlashSeq">
<substitute key="source" value="USPLN"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/LightningSeq.xml"
menuText="USPLN 1min Lgtng Seq Plot" id="1MinUSPLNFlashSeq">
<substitute key="source" value="USPLN"/>
</contribute>
</menuTemplate>

View file

@ -45,6 +45,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
* Feb 12, 2014 2655 njensen Set source
* Jun 05, 2014 3226 bclement LightningStikePoint refactor
* Jun 10, 2014 3226 bclement fixed source
* Jun 22, 2015 mjames@ucar Muted setSource
*
* </pre>
*
@ -103,7 +104,7 @@ public class TextLightningDecoder extends AbstractDecoder implements
report.setTraceId(traceId);
report.setSource(SOURCE);
//report.setSource(SOURCE);
return new PluginDataObject[] { report };
}

View file

@ -51,6 +51,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* 999
* Feb 12, 2014 2655 njensen Use status handler for logging
* Jun 05, 2014 3226 bclement LightningStikePoint refactor
* Jun 22, 2015 mjames@ucar Support for USPLN
*
* </pre>
*
@ -83,6 +84,12 @@ public class TextLightningParser {
private static final String LIGHTNING_PTRN_C = "(\\d{4,4}-\\d{2,2}-\\d{2,2})T(\\d{2,2}:\\d{2,2}:\\d{2,2}),(-?\\d{1,2}.\\d{1,4}),(-?\\d{1,3}.\\d{1,4}),(0.0),(1)";
private static final Pattern LTG_PTRN_C = Pattern.compile(LIGHTNING_PTRN_C);
// USPLN
// 2015-06-22T22:26:56.988,20.0405176,-83.8311105,-117.00,1.50,0.25,28
private static final String LIGHTNING_PTRN_USPLN = "(\\d{4,4}-\\d{2,2}-\\d{2,2})T(\\d{2,2}:\\d{2,2}:\\d{2,2}.\\d{3,3}),(-?\\d{1,2}.\\d{2,}),(-?\\d{1,3}.\\d{2,}),(-?\\d{1,3}\\.\\d{2,2}),(\\d{1,1}\\.\\d{2,2}),(\\d{1,1}\\.\\d{2,2}),(-?\\d{1,2})";
private static final Pattern LTG_PTRN_USPLN = Pattern.compile(LIGHTNING_PTRN_USPLN);
/**
* default constructor.
@ -159,8 +166,10 @@ public class TextLightningParser {
LightningStrikePoint strike;
for (String line : lines) {
try {
// 03/23/2010 13:35:01 72.00 -157.00 -142 1
Matcher m = LTG_PTRN_A.matcher(line);
if (m.matches()) {
String[] date = m.group(1).split("/");
String[] time = m.group(2).split(":");
String month = date[0];
@ -191,6 +200,7 @@ public class TextLightningParser {
strike.setLightSource("UNKN");
reports.add(strike);
} else {
// 10:03:24:13:35:00.68 72.000 157.000 -14.2 1
m = LTG_PTRN_B.matcher(line);
if (m.matches()) {
String[] datetime = m.group(1).split(":");
@ -228,6 +238,7 @@ public class TextLightningParser {
strike.setLightSource("UNKN");
reports.add(strike);
} else {
// 2012-03-14T18:58:00,-5.5021,-45.9669,0.0,1
m = LTG_PTRN_C.matcher(line);
if (m.matches()) {
String[] datec = m.group(1).split("-");
@ -264,8 +275,47 @@ public class TextLightningParser {
strike.setLightSource(sls);
reports.add(strike);
} else {
logger.error("Cannot match lightning input "
+ line);
// 2015-06-22T23:04:46.884,30.6349741,-88.3066673,-27.10,0.25,0.25,8
m = LTG_PTRN_USPLN.matcher(line);
if (m.matches()) {
String[] datec = m.group(1).split("-");
String[] timec = m.group(2).split(":");
String year = datec[0];
String month = datec[1];
String day = datec[2];
String hour = timec[0];
String min = timec[1];
String sec = timec[2].substring(0, 2);
String msec = timec[2].substring(3, 6);
String sls = "USPLN";
String latitude = m.group(3);
String longitude = m.group(4);
String strength = m.group(5);
String count = "1";
strike = new LightningStrikePoint(
Double.parseDouble(latitude),
Double.parseDouble(longitude));
strike.setStrikeStrength(Double
.parseDouble(strength));
strike.setPulseCount(Integer.parseInt(count));
strike.setMonth(Integer.parseInt(month));
strike.setDay(Integer.parseInt(day));
strike.setYear(Integer.parseInt(year));
strike.setHour(Integer.parseInt(hour));
strike.setMinute(Integer.parseInt(min));
strike.setSecond(Integer.parseInt(sec));
strike.setMillis(Integer.parseInt(msec));
strike.setMsgType(LtgMsgType.STRIKE_MSG_FL);
strike.setType(LtgStrikeType.CLOUD_TO_GROUND);
strike.setLightSource(sls);
reports.add(strike);
} else if (!line.startsWith("LIGHTNING-USPLN1EX")) {
logger.error("Cannot match lightning input "
+ line);
}
}
}
}

View file

@ -21,4 +21,6 @@
<requestPatterns xmlns:ns2="group">
<regex>FAA_</regex>
<regex>WWLLN_</regex>
<regex>^USPLN1EX.*</regex>
<regex>.*uspln</regex>
</requestPatterns>