5 |
ron |
1 |
#!/usr/bin/env python3
|
|
|
2 |
# -*- coding: utf-8 -*-
|
|
|
3 |
#
|
|
|
4 |
# sensors/wind.py
|
|
|
5 |
#
|
|
|
6 |
# Copyright 2020 Ron Wellsted <ron@wellsted.org.uk>
|
|
|
7 |
#
|
|
|
8 |
# This program is free software; you can redistribute it and/or modify
|
|
|
9 |
# it under the terms of the GNU General Public License as published by
|
|
|
10 |
# the Free Software Foundation; either version 2 of the License, or
|
|
|
11 |
# (at your option) any later version.
|
|
|
12 |
#
|
|
|
13 |
# This program is distributed in the hope that it will be useful,
|
|
|
14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
16 |
# GNU General Public License for more details.
|
|
|
17 |
#
|
|
|
18 |
# You should have received a copy of the GNU General Public License
|
|
|
19 |
# along with this program; if not, write to the Free Software
|
|
|
20 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
21 |
# MA 02110-1301, USA.
|
|
|
22 |
#
|
|
|
23 |
#
|
7 |
ron |
24 |
|
|
|
25 |
direction = {
|
9 |
ron |
26 |
0:None, 1:121.6, 2:182.4, 3:114.0, 4:243.2, 5:129.2,
|
|
|
27 |
6:174.8, 7:167.2, 8:304.0, 9:None, 10:190.0 11:197.6,
|
|
|
28 |
12:235.6, 13:None, 14:228.0, 15:205.2, 16:0.0, 17:7.6,
|
|
|
29 |
18:None, 19:None, 20:250.8, 21:None, 22:258.4, 23:159.6,
|
|
|
30 |
24:296.4, 25:15.2, 26:None, 27:None, 28:288.8, 29:281.2,
|
|
|
31 |
30:266.0, 31:273.6, 32:60.8, 33:53.2, 34:68.4, 35:106.4,
|
|
|
32 |
36:None, 37:136.8, 38:None, 39:144.4, 40:311.6, 41:None,
|
|
|
33 |
42:None, 43:98.8, 44:319.2, 45:None, 46:220.4, 47:212.8,
|
|
|
34 |
48:357.2, 49:45.6, 50:76.0, 51:83.6, 52:None, 53:38.0,
|
|
|
35 |
54:None, 55:152.0, 56:349.6, 57:22.8, 58:342.0, 59:91.2,
|
|
|
36 |
60:326.8, 61:30.4, 62:334.4, 63:None
|
7 |
ron |
37 |
}
|
|
|
38 |
|
6 |
ron |
39 |
def read_wind():
|
|
|
40 |
return (None, None)
|