]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Add in the formula to convert the returned speed to mph. Temporary.
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Sat, 7 Nov 2009 23:59:00 +0000 (23:59 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 1 Dec 2009 03:01:48 +0000 (20:01 -0700)
tos/platforms/tmirws/sensors/AeroVaneReadP.nc

index 56001dde33f9c5d7a7bda956c1d2091baba2933d..319614ace68334b4094af5ab7367cc3234c94751 100644 (file)
@@ -141,7 +141,8 @@ implementation {
       norace aerovector_t vector;
 
       /* Get speed average */
-      atomic vector.speed = call Count.get();
+      atomic vector.speed = (call Count.get() * 2.25) / (period * 4 / 1024) +
+       0.5;
 
       /* Complete direction average */
       vector.dir = m_sum / PHYS_PER_READ;