pulses) {
+ this.pulses = pulses;
+ }
}
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgMsgType.java b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgMsgType.java
index 8173dfe783..47015a0229 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgMsgType.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgMsgType.java
@@ -23,32 +23,51 @@ package com.raytheon.uf.common.dataplugin.binlightning.impl;
* Enums for the lightning message type, Flash or RT Flash.
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070810 379 jkorman Initial Coding from prototype.
+ * Jun 3, 2014 3226 bclement added id, added TOTAL_LIGHTNING
*
*
- *
+ *
* @author jkorman
* @version 1.0
*/
public enum LtgMsgType
{
- STRIKE_MSG_FL("FL"),
- STRIKE_MSG_RT("RT");
+ STRIKE_MSG_FL((byte) 0, "FL"), STRIKE_MSG_RT((byte) 1, "RT"), TOTAL_LIGHTNING(
+ (byte) 2, "TL");
- private final String strikeType;
+ private final String msgType;
+
+ private final byte id;
/**
* Construct the type.
- * @param type Lightning strike type.
+ *
+ * @param type
+ * Lightning message type.
*/
- private LtgMsgType(String type)
+ private LtgMsgType(byte id, String type)
{
- strikeType = type;
+ this.msgType = type;
+ this.id = id;
+ }
+
+ /**
+ * @param id
+ * @return null if no type found for id
+ */
+ public static LtgMsgType getById(byte id) {
+ for (LtgMsgType type : LtgMsgType.values()) {
+ if (type.id == id) {
+ return type;
+ }
+ }
+ return null;
}
/**
@@ -57,6 +76,13 @@ public enum LtgMsgType
*/
public String getType()
{
- return strikeType;
+ return msgType;
+ }
+
+ /**
+ * @return unique id for type
+ */
+ public byte getId() {
+ return this.id;
}
}
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgPulseType.java b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgPulseType.java
new file mode 100644
index 0000000000..2591bd5983
--- /dev/null
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgPulseType.java
@@ -0,0 +1,71 @@
+/**
+ * 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.common.dataplugin.binlightning.impl;
+
+/**
+ * Stroke type enum for lightning pulses. Mainly categorizes between return and
+ * non-return strokes.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Jun 3, 2014 3226 bclement Initial creation
+ *
+ *
+ *
+ * @author bclement
+ * @version 1.0
+ */
+public enum LtgPulseType {
+
+ RETURN_STROKE((byte) 0), NON_RETURN_STROKE((byte) 1), KEEP_ALIVE((byte) 9);
+
+ private final byte id;
+
+ /**
+ * @param id
+ */
+ private LtgPulseType(byte id) {
+ this.id = id;
+ }
+
+ /**
+ * @param id
+ * @return null if no type is found for id
+ */
+ public static LtgPulseType getById(byte id) {
+ for (LtgPulseType type : LtgPulseType.values()) {
+ if (type.id == id) {
+ return type;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @return unique id for this type
+ */
+ public byte getId() {
+ return this.id;
+ }
+}
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgStrikeType.java b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgStrikeType.java
index aa2c50765b..b217ca1953 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgStrikeType.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/impl/LtgStrikeType.java
@@ -23,34 +23,52 @@ package com.raytheon.uf.common.dataplugin.binlightning.impl;
* Enums for the lightning strike type, cloud-to-cloud or cloud-to-ground.
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070810 379 jkorman Initial Coding from prototype.
* 20130425 DCS 112 Wufeng Zhou Added STRIKE_TF (for Total Flash) in definition for Total Flash
+ * Jun 3, 2014 3226 bclement added id, changed to more descriptive names, added KEEP_ALIVE
*
*
- *
+ *
* @author jkorman
* @version 1.0
*/
public enum LtgStrikeType
{
- STRIKE_CC("CC"),
- STRIKE_CG("CG"),
- STRIKE_TF("TF");
+ CLOUD_TO_CLOUD((byte)0, "CC"), CLOUD_TO_GROUND((byte)1, "CG"), TOTAL_FLASH((byte)2, "TF"), KEEP_ALIVE((byte)9,
+ "");
private final String strikeType;
+
+ private final byte id;
/**
* Construct the type.
+ * @param id unique id for type
* @param type Lightning strike type.
*/
- private LtgStrikeType(String type)
+ private LtgStrikeType(byte id, String type)
{
- strikeType = type;
+ this.id = id;
+ this.strikeType = type;
+ }
+
+ /**
+ * @param id
+ * unique id for type
+ * @return null if no type is found for id
+ */
+ public static LtgStrikeType getById(byte id) {
+ for (LtgStrikeType type : LtgStrikeType.values()) {
+ if (type.id == id) {
+ return type;
+ }
+ }
+ return null;
}
/**
@@ -61,4 +79,11 @@ public enum LtgStrikeType
{
return strikeType;
}
+
+ /**
+ * @return id
+ */
+ public int getId() {
+ return this.id;
+ }
}
diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java
index 649cc1f4f5..9c98131123 100644
--- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java
+++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java
@@ -76,6 +76,8 @@ import com.vividsolutions.jts.io.WKTWriter;
* 12/20/2013 DR 16894 gzhang Fixed getZRvalue2() bias issue.
* 05/12/2014 3133 njensen Extracted getLightningRecord
* 05/13/2014 3133 njensen Moved convertStrankValue here from ScanConfig
+ * Jun 05, 2014 3226 bclement BinLightning refactor
+ * compare lightning strike type by id instead of ordinal
*
*
* @author dhladky
@@ -1292,7 +1294,7 @@ public class ScanUtils {
(double) rec.getLatitudes()[i],
(double) rec.getLongitudes()[i],
rec.getIntensities()[i], rec.getStrikeTypes()[i],
- rec.getMsgTypes()[i], rec.getStrikeCounts()[i]);
+ rec.getMsgTypes()[i], rec.getPulseCounts()[i]);
strikeList.add(strike);
}
@@ -1311,7 +1313,7 @@ public class ScanUtils {
if (ls.getIntensity() > 0) {
totalPosStrikes++;
}
- if (ls.getStrikeType() == LtgStrikeType.STRIKE_CG.ordinal()) {
+ if (ls.getStrikeType() == LtgStrikeType.CLOUD_TO_GROUND.getId()) {
totalCGStrikes++;
}
totalStrikes++;
diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/BasePoint.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/BasePoint.java
index 8d3a361a84..0f283a451c 100644
--- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/BasePoint.java
+++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/BasePoint.java
@@ -19,12 +19,14 @@
**/
package com.raytheon.uf.edex.decodertools.core;
+import com.vividsolutions.jts.geom.Coordinate;
+
+
/**
- * BasePoint provides a simple 4D (latitude, longitude, elevation, and time)
- * base class for observation data. Sub-classes of BasePoint are responsible for
- * adding additional checking or using specific units as required. An example
- * would be adding a accessors for a Calendar to expose the date information.
- * Most attributes of this class do not have units.
+ * BasePoint provides a simple 3D (latitude, longitude, elevation) base class
+ * for observation data. Sub-classes of BasePoint are responsible for adding
+ * additional checking or using specific units as required. Most attributes of
+ * this class do not have units.
*
*
*
@@ -35,11 +37,14 @@ package com.raytheon.uf.edex.decodertools.core;
* 27 July 2007 411 jkorman Initial Development
* 20070911 379 jkorman Added comments.
* 20070912 379 jkorman Code review cleanup.
+ * Jun 05, 2014 3226 bclement deprecated class, removed time
*
*
+ * @deprecated use {@link Coordinate} instead
* @author jkorman
* @version 1
*/
+@Deprecated
public class BasePoint {
private double latitude;
@@ -47,20 +52,6 @@ public class BasePoint {
private double elevation;
- private int year;
-
- private int month;
-
- private int day;
-
- private int hour;
-
- private int minute;
-
- private int second;
-
- private int millis;
-
/**
* Create an empty basepoint instance.
*/
@@ -74,16 +65,9 @@ public class BasePoint {
* A basepoint to copy.
*/
public BasePoint(BasePoint point) {
- latitude = point.latitude;
- longitude = point.longitude;
- elevation = point.elevation;
- year = point.year;
- month = point.month;
- day = point.day;
- hour = point.hour;
- minute = point.minute;
- second = point.second;
- millis = point.millis;
+ this.latitude = point.latitude;
+ this.longitude = point.longitude;
+ this.elevation = point.elevation;
}
/**
@@ -154,136 +138,4 @@ public class BasePoint {
this.elevation = elevation;
}
- /**
- * Get the year part of the date.
- *
- * @return The year.
- */
- public int getYear() {
- return year;
- }
-
- /**
- * Set the year part of the date.
- *
- * @param year
- * Year.
- */
- public void setYear(int year) {
- this.year = year;
- }
-
- /**
- * Get the month part of the date.
- *
- * @return The month of the year.
- */
- public int getMonth() {
- return month;
- }
-
- /**
- * Set the day of the month part of the date.
- *
- * @param day
- * Day of month [1..12].
- */
- public void setMonth(int month) {
- this.month = month;
- }
-
- /**
- * Get the day part of the month.
- *
- * @return The day of the month.
- */
- public int getDay() {
- return day;
- }
-
- /**
- * Set the day of the month part of the date.
- *
- * @param day
- * Day of month [1..12].
- */
- public void setDay(int day) {
- this.day = day;
- }
-
- /**
- * Get the hours part of the day.
- *
- * @return The hours part of the day.
- */
- public int getHour() {
- return hour;
- }
-
- /**
- * Set the hour part of the time.
- *
- * @param hour
- * Hour of the day [0..23].
- */
- public void setHour(int hour) {
- this.hour = hour;
- }
-
- /**
- * Get the minutes part of the hour.
- *
- * @return The minutes part of the hour.
- */
- public int getMinute() {
- return minute;
- }
-
- /**
- * Set the minute of the hour.
- *
- * @param minute
- * The minute of the hour [0..59]
- */
- public void setMinute(int minute) {
- this.minute = minute;
- }
-
- /**
- * Get the seconds part of the minute.
- *
- * @return The seconds part of the minute.
- */
- public int getSecond() {
- return second;
- }
-
- /**
- * Set the second of the minute.
- *
- * @param second
- * The second of the minute [0..59]
- */
- public void setSecond(int second) {
- this.second = second;
- }
-
- /**
- * Get the milliseconds part of the time.
- *
- * @return The milliseconds part of the time.
- */
- public int getMillis() {
- return millis;
- }
-
- /**
- * Set the milliseconds part of the time.
- *
- * @param millis
- * Milliseconds [0..999].
- */
- public void setMillis(int millis) {
- this.millis = millis;
- }
}
diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java
index a95c4619d9..0d891b3b2d 100644
--- a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java
+++ b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java
@@ -56,6 +56,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Jan 10, 2013 1448 bgonzale Added app context check in runOnSchedule().
* Jan 18, 2013 1469 bkowal Removed the hdf5 data directory.
* Mar 28, 2014 2952 mpduff Changed to use UFStatus for logging.
+ * Jun 05, 2014 3226 bclement BinLightning refactor
*
*
*
@@ -138,7 +139,7 @@ public class MpeLightningSrv {
float[] latitudes = ltngRec.getLatitudes();
float[] longitudes = ltngRec.getLongitudes();
long[] obstimes = ltngRec.getObsTimes();
- byte[] strikes = ltngRec.getStrikeCounts();
+ byte[] strikes = ltngRec.getPulseCounts();
// convert latitude and longitude to grid coordinate
HRAP hrap = HRAP.getInstance();
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/ScanProduct.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/ScanProduct.java
index 9a2fde5bb6..883c59aead 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/ScanProduct.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/ScanProduct.java
@@ -58,6 +58,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
* ------------ ---------- ----------- --------------------------
* 05/07/2009 2037 dhladky Initial Creation.
* Apr 30, 2014 2060 njensen Updates for removal of grid dataURI column
+ * Jun 05, 2014 3226 bclement compare lightning strike type by id instead of ordinal
*
*
*
@@ -292,7 +293,7 @@ public abstract class ScanProduct implements Serializable {
rec.getIntensities()[i],
rec.getStrikeTypes()[i],
rec.getMsgTypes()[i],
- rec.getStrikeCounts()[i]);
+ rec.getPulseCounts()[i]);
strikeList.add(strike);
}
@@ -310,8 +311,8 @@ public abstract class ScanProduct implements Serializable {
if (ls.getIntensity() > 0) {
totalPosStrikes++;
}
- if (ls.getStrikeType() == LtgStrikeType.STRIKE_CG
- .ordinal()) {
+ if (ls.getStrikeType() == LtgStrikeType.CLOUD_TO_GROUND
+ .getId()) {
totalCGStrikes++;
}
totalStrikes++;
diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.lightning/src/gov/noaa/nws/ncep/viz/rsc/lightning/rsc/LightningResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.lightning/src/gov/noaa/nws/ncep/viz/rsc/lightning/rsc/LightningResource.java
index 750734a74d..dd7fb62d8e 100644
--- a/ncep/gov.noaa.nws.ncep.viz.rsc.lightning/src/gov/noaa/nws/ncep/viz/rsc/lightning/rsc/LightningResource.java
+++ b/ncep/gov.noaa.nws.ncep.viz.rsc.lightning/src/gov/noaa/nws/ncep/viz/rsc/lightning/rsc/LightningResource.java
@@ -3,8 +3,8 @@ package gov.noaa.nws.ncep.viz.rsc.lightning.rsc;
import gov.noaa.nws.ncep.viz.common.ui.NmapCommon;
import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource;
import gov.noaa.nws.ncep.viz.resources.INatlCntrsResource;
-import gov.noaa.nws.ncep.viz.resources.colorBar.ColorBarResourceData;
import gov.noaa.nws.ncep.viz.resources.colorBar.ColorBarResource;
+import gov.noaa.nws.ncep.viz.resources.colorBar.ColorBarResourceData;
import gov.noaa.nws.ncep.viz.ui.display.ColorBar;
import gov.noaa.nws.ncep.viz.ui.display.NCMapDescriptor;
@@ -18,6 +18,7 @@ import java.util.List;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
+import com.raytheon.uf.common.dataplugin.binlightning.LightningConstants;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
@@ -42,15 +43,14 @@ import com.raytheon.uf.viz.core.drawables.IWireframeShape;
import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.uf.viz.core.drawables.ResourcePair;
import com.raytheon.uf.viz.core.exception.VizException;
-import com.raytheon.uf.viz.core.map.MapDescriptor;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
import com.raytheon.uf.viz.core.rsc.ResourceType;
/**
- * LigntningResource - Display Lightning data.
- * *
+ * LigntningResource - Display Lightning data. *
+ *
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
@@ -65,10 +65,11 @@ import com.raytheon.uf.viz.core.rsc.ResourceType;
* 05/23/12 785 Q. Zhou Added getName for legend.
* 12/19/2012 #960 Greg Hull override propertiesChanged() to update colorBar.
* 05/07/2013 #993 Greg Hull change key for strikeMap from URI to the HDF5 group
- *
+ * Jun 05, 2014 3226 bclement reference datarecords by LightningConstants
+ *
*
*
- * @author ghull
+ * @author ghull
* @version 1.0
*/
public class LightningResource extends AbstractNatlCntrsResource
@@ -366,20 +367,17 @@ public class LightningResource extends AbstractNatlCntrsResource latestStrike ) {
-// latestStrike = strikeInfo.obsTime;
-// }
-// } else if( hdf5Rec.getName().equals("strikeCount") ) {
-// strikeInfo.lon = ((FloatDataRecord) hdf5Rec).getFloatData()[s];
- } else if( hdf5Rec.getName().equals("msgType") ) {
+ } else if (name
+ .equals(LightningConstants.MSG_TYPE_DATASET)) {
// ignore
}
}
diff --git a/ost/gov.noaa.nws.ost.edex.plugin.binlightning/src/gov/noaa/nws/ost/edex/plugin/binlightning/BinLightningDecoderUtil.java b/ost/gov.noaa.nws.ost.edex.plugin.binlightning/src/gov/noaa/nws/ost/edex/plugin/binlightning/BinLightningDecoderUtil.java
index 200b80e5bb..ceb2651f70 100644
--- a/ost/gov.noaa.nws.ost.edex.plugin.binlightning/src/gov/noaa/nws/ost/edex/plugin/binlightning/BinLightningDecoderUtil.java
+++ b/ost/gov.noaa.nws.ost.edex.plugin.binlightning/src/gov/noaa/nws/ost/edex/plugin/binlightning/BinLightningDecoderUtil.java
@@ -16,7 +16,6 @@ import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgMsgType;
import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
-import com.raytheon.uf.edex.decodertools.core.BasePoint;
/**
* BinLigntningDecoderUtil
@@ -38,6 +37,7 @@ import com.raytheon.uf.edex.decodertools.core.BasePoint;
* moved from com.raytheon.edex.plugin.binlightning to gov.noaa.nws.ost.edex.plugin.binlightning
* moved decodeBinLightningData() and decodeBitShiftedBinLightningData()
* to BinLightningDecoder to solve circular dependency
+ * Jun 05, 2014 3226 bclement LightningStrikePoint refactor
*
*
* @author Wufeng Zhou
@@ -132,20 +132,16 @@ public class BinLightningDecoderUtil {
// int reserved = buffer.getShort() & 0xffff;
// Create the strike record from the report info and base time information.
- BasePoint base = new BasePoint(lat, lon);
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(epochTime);
- base.setYear(cal.get(Calendar.YEAR));
- base.setMonth(cal.get(Calendar.MONTH) + 1);
- base.setDay(cal.get(Calendar.DAY_OF_MONTH));
- base.setHour(cal.get(Calendar.HOUR_OF_DAY));
- base.setMinute(cal.get(Calendar.MINUTE));
- base.setSecond(cal.get(Calendar.SECOND));
- base.setMillis(cal.get(Calendar.MILLISECOND));
- // new spec does not seem to have lightning message type indicator such as FL (Flash Lightning) or RT (Real Time flash lightning)
- // The source of lightning data in the vendor specific data bytes (byte 16-17) may related to this (???),
- // and it is used here for now. 04/182/013 Wufeng Zhou
+ /*
+ * new spec does not seem to have lightning message type indicator
+ * such as FL (Flash Lightning) or RT (Real Time flash lightning)
+ * The source of lightning data in the vendor specific data bytes
+ * (byte 16-17) may related to this (???),
+ * and it is used here for now. 04/182/013 Wufeng Zhou
+ */
/** 05/02/2013, found DSI-9603 Spec (http://www1.ncdc.noaa.gov/pub/data/documentlibrary/tddoc/td9603.pdf) on NLDN lightning data format,
* on Message Type and Stroke Type:
* POS: 37-38 Message Type
@@ -165,19 +161,24 @@ public class BinLightningDecoderUtil {
msgType = LtgMsgType.STRIKE_MSG_RT;
}
- LightningStrikePoint lsp = new LightningStrikePoint(base, lat, lon, msgType);
- LtgStrikeType ltgStrikeType = LtgStrikeType.STRIKE_CG; // default ??
+ LightningStrikePoint lsp = new LightningStrikePoint(lat, lon, cal,
+ msgType);
+ LtgStrikeType ltgStrikeType = LtgStrikeType.CLOUD_TO_GROUND; // default ??
if (strokeType == 0x0000) {
- ltgStrikeType = LtgStrikeType.STRIKE_CG;
+ ltgStrikeType = LtgStrikeType.CLOUD_TO_GROUND;
} else if (strokeType == 0x00ff) {
- ltgStrikeType = LtgStrikeType.STRIKE_CC;
+ ltgStrikeType = LtgStrikeType.CLOUD_TO_CLOUD;
} else if (strokeType == 0xffff) {
- ltgStrikeType = LtgStrikeType.STRIKE_TF;
+ ltgStrikeType = LtgStrikeType.TOTAL_FLASH;
}
lsp.setType(ltgStrikeType);
- // as of OB13.3 for World Wide Lightning Location Network (WWLLN) data (decoded by textlightning though, not this bin lightning decoder),
- // added lightning source field in LightningStrikePoint, as well as column in binlightning database table defaults to NLDN
+ /*
+ * as of OB13.3 for World Wide Lightning Location Network (WWLLN)
+ * data (decoded by textlightning though, not this bin lightning
+ * decoder), added lightning source field in LightningStrikePoint,
+ * as well as column in binlightning database table defaults to NLDN
+ */
if (vendor == ((short)0x0001)) { // CONUS source
lsp.setLightSource("NLDN");
} else if (vendor == ((short)0x0002)) { // long range source, i.e., GLD360.
@@ -185,7 +186,7 @@ public class BinLightningDecoderUtil {
lsp.setLightSource("GLD");
}
- lsp.setStrikeCount(strokeMultiplicity);
+ lsp.setPulseCount(strokeMultiplicity);
lsp.setStrikeStrength(strokeKiloAmps);
// stroke duration does not seem to be used