Line 1... |
Line 1... |
1 |
#!/usr/bin/python |
1 |
#!/usr/bin/python |
2 |
|
2 |
|
3 |
# Python library for RPS01A MLAB module with AS5048B I2C Magnetic position sensor. |
3 |
# MLAB meteostation wind speed gauge with magnetic rotation sensor. |
- |
|
4 |
# This simple algorithm calculate difference between five time equidistant points during the rotation. The result is angular speed per time step. |
- |
|
5 |
# Size of time-step could be varied depending on expected wind speed range to measure. |
- |
|
6 |
# Algorithm should be expanded by Kalman filtering to minimize dependence on fast reading. |
- |
|
7 |
# The measuring principle could introduce time-stamped reading to increase precision of measurement. It could be possible because the readings are not exactly time equidistant in real Linux word. |
4 |
|
8 |
|
5 |
#uncomment for debbug purposes |
9 |
#uncomment for debbug purposes |
6 |
#import logging |
10 |
#import logging |
7 |
#logging.basicConfig(level=logging.DEBUG) |
11 |
#logging.basicConfig(level=logging.DEBUG) |
8 |
|
12 |
|