From 54692bf62a2dd4dcff68ce7a9e807bd89bfdfd02 Mon Sep 17 00:00:00 2001 From: nifi Date: Thu, 7 Oct 2010 20:59:48 +0000 Subject: [PATCH] ETX 1.0 is 8, not 16, in the new collect code --- .../se/sics/contiki/collect/SensorDataAggregator.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java b/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java index c2f089d2d..aa8bb45df 100644 --- a/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java +++ b/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: SensorDataAggregator.java,v 1.10 2010/09/30 22:24:45 nifi Exp $ + * $Id: SensorDataAggregator.java,v 1.11 2010/10/07 20:59:48 nifi Exp $ * * ----------------------------------------------------------------- * @@ -34,8 +34,8 @@ * * Authors : Joakim Eriksson, Niclas Finne * Created : 20 aug 2008 - * Updated : $Date: 2010/09/30 22:24:45 $ - * $Revision: 1.10 $ + * Updated : $Date: 2010/10/07 20:59:48 $ + * $Revision: 1.11 $ */ package se.sics.contiki.collect; @@ -242,7 +242,7 @@ public class SensorDataAggregator implements SensorInfo { } public double getAverageRtmetric() { - return dataCount > 0 ? ((values[BEST_NEIGHBOR_RTMETRIC] + values[BEST_NEIGHBOR_ETX]) / dataCount) : 0.0; + return dataCount > 0 ? ((values[BEST_NEIGHBOR_RTMETRIC] + (values[BEST_NEIGHBOR_ETX] / 8.0)) / dataCount) : 0.0; } public double getAverageRadioIntensity() { @@ -270,7 +270,7 @@ public class SensorDataAggregator implements SensorInfo { } public double getAverageBestNeighborETX() { - return getAverageValue(BEST_NEIGHBOR_ETX) / 16.0; + return getAverageValue(BEST_NEIGHBOR_ETX) / 8.0; } public int getPacketCount() {