diff --git a/pom.xml b/pom.xml index cdf5be2..a26baf7 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ weather 2008 - 2.9.1 + 2.10.4 diff --git a/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala b/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala index fe3b3be..0a6ae9e 100644 --- a/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala +++ b/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala @@ -23,7 +23,7 @@ } def knots(s: Option[Any]): String = s match { - case Some(mph: Short) => + case Some(mph: Float) => val k = (mph / 1.15077945 + 0.5).toInt if (k == 1) { "1 knot" diff --git a/src/main/scala/uk/org/floop/msc/wview/LoopPacket.scala b/src/main/scala/uk/org/floop/msc/wview/LoopPacket.scala index c7c6eab..376c38c 100644 --- a/src/main/scala/uk/org/floop/msc/wview/LoopPacket.scala +++ b/src/main/scala/uk/org/floop/msc/wview/LoopPacket.scala @@ -20,16 +20,18 @@ (VALUE_TYPE.FLOAT, "outTemp"), // degrees F (VALUE_TYPE.USHORT, "inHumidity"), // percent (VALUE_TYPE.USHORT, "outHumidity"), // percent - (VALUE_TYPE.USHORT, "windSpeed"), // mph + (VALUE_TYPE.FLOAT, "windSpeed"), // mph (VALUE_TYPE.USHORT, "windDir"), // degrees - (VALUE_TYPE.USHORT, "windGust"), // mph + (VALUE_TYPE.USHORT, "padding1"), // ! 2 bytes of padding + (VALUE_TYPE.FLOAT, "windGust"), // mph (VALUE_TYPE.USHORT, "windGustDir"), // degrees + (VALUE_TYPE.USHORT, "padding2"), // ! 2 bytes of padding (VALUE_TYPE.FLOAT, "rainRate"), // in/hr (VALUE_TYPE.FLOAT, "sampleRain"), // inches (VALUE_TYPE.FLOAT, "sampleET"), // ET (VALUE_TYPE.USHORT, "radiation"), // watts/m^3 - (VALUE_TYPE.USHORT, "padding1"), // ! 2 bytes of padding - (VALUE_TYPE.FLOAT, "UV"), // UV index * 10 + (VALUE_TYPE.USHORT, "padding3"), // ! 2 bytes of padding + (VALUE_TYPE.FLOAT, "UV"), // UV index * 10 (VALUE_TYPE.FLOAT, "dewpoint"), // degrees F (VALUE_TYPE.FLOAT, "windchill"), // degrees F (VALUE_TYPE.FLOAT, "heatindex"), // degrees F @@ -44,7 +46,7 @@ (VALUE_TYPE.FLOAT, "monthET"), // inches (VALUE_TYPE.FLOAT, "yearET"), // inches (VALUE_TYPE.FLOAT, "intervalAvgWCHILL"), // degrees F - (VALUE_TYPE.USHORT, "intervalAvgWSPEED"), // mph + (VALUE_TYPE.FLOAT, "intervalAvgWSPEED"), // mph (VALUE_TYPE.USHORT, "yearRainMonth"), // 1-12 Rain Start Month // --- The following may or may not be supported for a given station --- @@ -56,22 +58,17 @@ (VALUE_TYPE.USHORT, "forecastRule"), // VP only (VALUE_TYPE.USHORT, "txBatteryStatus"), // VP only (VALUE_TYPE.USHORT, "consBatteryVoltage"), // VP only - (VALUE_TYPE.FLOAT, "extraTemp1"), // degrees F + 90 - (VALUE_TYPE.FLOAT, "extraTemp2"), // degrees F + 90 - (VALUE_TYPE.FLOAT, "extraTemp3"), // degrees F + 90 + (VALUE_TYPE.USHORT, "padding4"), // ! 2 bytes of padding (VALUE_TYPE.FLOAT, "soilTemp1"), // degrees F + 90 (VALUE_TYPE.FLOAT, "soilTemp2"), // degrees F + 90 (VALUE_TYPE.FLOAT, "soilTemp3"), // degrees F + 90 (VALUE_TYPE.FLOAT, "soilTemp4"), // degrees F + 90 (VALUE_TYPE.FLOAT, "leafTemp1"), // degrees F + 90 (VALUE_TYPE.FLOAT, "leafTemp2"), // degrees F + 90 - (VALUE_TYPE.UCHAR, "extraHumid1"), // percent - (VALUE_TYPE.UCHAR, "extraHumid2"), // percent (VALUE_TYPE.UCHAR, "soilMoist1"), (VALUE_TYPE.UCHAR, "soilMoist2"), (VALUE_TYPE.UCHAR, "leafWet1"), (VALUE_TYPE.UCHAR, "leafWet2"), - (VALUE_TYPE.USHORT, "padding2"), // !two bytes of padding // Vaisala WXT-510 (VALUE_TYPE.FLOAT, "wxt510Hail"), // inches @@ -98,7 +95,7 @@ (VALUE_TYPE.UCHAR, "wmr918extra1BatteryStatus"), (VALUE_TYPE.UCHAR, "wmr918extra2BatteryStatus"), (VALUE_TYPE.UCHAR, "wmr918extra3BatteryStatus"), - (VALUE_TYPE.USHORT, "padding3"), // ! 2 bytes of padding + (VALUE_TYPE.USHORT, "padding5"), // ! 2 bytes of padding // Generic extra sensor and status support: (VALUE_TYPE.FLOAT, "extraTemp0"), @@ -139,7 +136,7 @@ (VALUE_TYPE.UCHAR, "consoleBatteryStatus"), (VALUE_TYPE.UCHAR, "uvBatteryStatus"), (VALUE_TYPE.UCHAR, "solarBatteryStatus"), - (VALUE_TYPE.USHORT, "padding4"), // ! 2 bytes of padding + (VALUE_TYPE.USHORT, "padding6"), // ! 2 bytes of padding (VALUE_TYPE.UCHAR, "extraTempBatteryStatus0"), (VALUE_TYPE.UCHAR, "extraTempBatteryStatus1"), (VALUE_TYPE.UCHAR, "extraTempBatteryStatus2"),