]> oss.titaniummirror.com Git - tinyos-2.x.git/commit
Add AeroVane infrastructure to support physical/reading of the sensor.
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Sat, 7 Nov 2009 23:58:55 +0000 (23:58 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 1 Dec 2009 03:01:48 +0000 (20:01 -0700)
commit7373db28ff8b66edda83925025fbffea6ed88148
treebaf1d6dbc6f9ba7a5cdfa785123dfbfc49838fe6
parent8ad250df7cb573906e00c173e512d539261874de
Add AeroVane infrastructure to support physical/reading of the sensor.

AeroVaneReadC implements a timer every 28800 ticks of the 32KHz clock (or 900
binary ms).  At each timer event it reads the wind vane via WindVaneReadC.
On every 4th read it reads the anemometer via AnemometerReadC, calculates the
average vane position over the last 4 reads (it's been summing all along),
and uses Notify.notify() to send out the aerovector structure.  This means
that the user should get an AeroVane vector (reading) every 3.516 seconds, where
both the direction and the speed have been averaged over 4 reads during that
period.
tos/platforms/tmirws/sensors/AeroVane.h [new file with mode: 0644]
tos/platforms/tmirws/sensors/AeroVaneReadC.nc [new file with mode: 0644]
tos/platforms/tmirws/sensors/AeroVaneReadP.nc [new file with mode: 0644]
tos/platforms/tmirws/sensors/AnemometerReadC.nc [new file with mode: 0644]
tos/platforms/tmirws/sensors/AnemometerReadP.nc [new file with mode: 0644]