-
Notifications
You must be signed in to change notification settings - Fork 0
/
AirWhere - Paragliding Detection System - See Other Pilots in Realtime.html
370 lines (303 loc) · 14.8 KB
/
AirWhere - Paragliding Detection System - See Other Pilots in Realtime.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!-- saved from url=(0041)http://www.airwhere.co.uk/kobo-sounds.php -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AirWhere - Paragliding Detection System - See Other Pilots in Realtime</title>
<link rel="stylesheet" type="text/css" href="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/airware.css">
<style type="text/css">
html { height: 100%;width 100% }
html { height: 100% ;width 100%}
body { height: 100%; margin: 0px; dding: 0px }
#map { height: 100%;width 100% }
</style>
<link rel="stylesheet" type="text/css" href="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/UberGallery.css">
<link rel="stylesheet" type="text/css" href="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/colorbox.css">
<script type="text/javascript" src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/jquery.min.js.download"></script>
<script type="text/javascript" src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/jquery.colorbox.js.download"></script>
<script type="text/javascript">
$(document).ready(function(){
$("a[rel='colorbox']").colorbox({maxWidth: "90%", maxHeight: "90%", opacity: ".5"});
});
</script>
</head>
<body>
<div width="100%" height="100%">
<br><br><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center" valign="middle">
<tbody><tr>
<td align="right" height="25" bgcolor="#ffffff" colspan="5">
</td>
</tr><tr>
<td height="144" width="198"><a href="http://www.airwhere.co.uk/"><img border="0" src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/airware-paragliding-white.gif" alt="paragliding detection system"></a></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tbody><tr>
<td colspan="2" bgcolor="#ffffff"></td>
</tr>
<tr>
<td colspan="2" height="40">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tbody><tr>
<td class="header_w" width="400"></td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/about-airware-paragliding.php">About</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/build-your-own-airware.php">Build</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/airware-paragliding-news.php">Blog</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/register-username.php">Register</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/airware-downloads.php">Downloads</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/airware-videos.php">Videos</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/airware-images.php">Images</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/contact-airware.php">Contact</a> </td>
<td class="header_w"><a class="header_w" href="http://www.airwhere.co.uk/airware-links.php">Links</a></td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td height="58" width="41"><img src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/paragliding-arrow-white.gif" alt="paragliding detection system"></td>
<td style="background:url(paragliding-airware/paragliding-line-white.gif);background-repeat: repeat-x"></td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td colspan="2" valign="top" height="100%">
<br><br><br><table height="100%" border="0" width="100%">
<tbody><tr>
<td valign="top"><a href="http://www.airwhere.co.uk/contact-airware.php"><img border="0" src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/paragliding-arrow-left.gif" alt="paragliding system"></a></td>
<td width="100%">
<br><br><br><table border="0">
<tbody><tr>
<td width="150"></td>
<td><h2>Kobo Sounds</h2>
<br><table cellspacing="16">
<tbody><tr><td>
As we all know the kobo is an amazing bit of kit to fly with but unfortunately we have no sounds, sounds are extremely useful for warnings, flying into airspace is extremely easy to do if your concentrating on thermalling and forget to keep checking where you are!<br><br>
A simple solution is to add a small development board and a piezo buzzer, the following page shows how to do this, its not very difficult to do, give it a go, cost is under £3.<br><br>
You will need one of these :-
<a href="http://www.ebay.co.uk/itm/ESP8266-ESP-12-ESP12-WeMos-D1-Mini-WIFI-Dev-Kit-Development-Board-NodeMCU-Lua-UK-/201709267836?hash=item2ef6cf2b7c:g:AMsAAOSw5cNYHNdb">Wemos D1 Mini</a>, <a href="http://www.ebay.co.uk/itm/3-X-DC-3-24V-Black-Piezo-Electronic-Tone-Buzzer-Alarm-Continuous-Sound-K6-/291708701283?hash=item43eb318a63:g:TvEAAOSwFnFWAmX2">Piezo Buzzer</a> (theres 3 here but always good for spares!) and some small gauge wire.<br><br>
Navigate to the <a href="http://www.airwhere.co.uk/downloads.php">downloads</a> page and download the Flasher and the binary for the sounds. Notice there are two, one for 9600 baud and one for 57600, an auto detect would be useful but havent got the time to write at the moment, so choose the correct one, if in doubt choose the 9600 one, check in your Device page in XCSoar or LK8000, it will tell you there.<br><br>
Plug your Wemos D1 board into a micro usb lead into the PC and then run the flasher and upload the sounds binary, more info is on the Airware build pages if your having problems. (<a href="http://www.air-ware.co.uk/build-your-own-airware-step-1.php">Build</a>)<br><br>
Wire up the D1 mini as the following diagram.<br><br>
<img src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/kobo-sounds.jpg">
<br><br>
<b>LK8000</b><br><br>
Download the SOUND_TABLE.TXT file from the downloads page and copy it to _Configuration directory in LK8000 on the kobo, everything is case sensitive, take care. Load LK8000 and then config config, LK8000 setup, Device Setup. This page should now have a new field "Ext. Sound", change to On.<br><br>
Hopefully now you will have sounds!<br><br>
The current format for the sounds is as follows:- <br><br>
<b>GFPALARM</b><br><br>
The number after the Alarm text is then added to 200+number times 13, this gives the frequency, the default duration is 200ms.<br><br>
<b>BSD</b><br><br>
This is a chain of sounds, first one is frequency, next is duration, repeat<br><br>
For example<br><br>
BSD 392 200 784 200 392 200 900 200
<br><br>
is frequency 392 for 200 ms and then 784 for 200ms etc etc.<br><br>
<b>XCSoar</b><br><br>
The guys at blueflyvario have put something together for this, please follow this <a href="http://blueflyvario.blogspot.co.uk/2015/08/more-bluefly-and-xcsoar-integration.html">page</a><br><br>
<iframe width="560" height="315" src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/L61Iv-T7iZ0.html" frameborder="0" allowfullscreen=""></iframe>
<b>Code</b><br><br>
If you wish to change anything the code is as follows :- (it isnt perfectly written, but works fine)<br><br>
<table border="1">
<tbody><tr><td>
<pre>
#include "ESP8266WiFi.h"
extern "C" {
#include <user_interface.h>
#include "Esp.h"
}
/* ==== Defines ==== */
#define SERIAL_BAUD 9600
#define GFPALARM_LENGTH 200
#define GFPALARM_BASE_FREQUENCY 200
#define GFPALARM_SCALE 13
/* ==== END Defines ==== */
int speakerPin = 13;
bool validSoundLine=false;
int incomingByte = 0;
char incomingChar;
String out;
int tuneIs[20][2]={0};
int noTones=0;
int currentTone=0;
bool isItNumeric ( String testString )
{
for ( int i=0;i<testString.length();i++)
{
if (testString.charAt(i)=='0' ||
testString.charAt(i)=='1' ||
testString.charAt(i)=='2' ||
testString.charAt(i)=='3' ||
testString.charAt(i)=='4' ||
testString.charAt(i)=='5' ||
testString.charAt(i)=='6' ||
testString.charAt(i)=='7' ||
testString.charAt(i)=='8' ||
testString.charAt(i)=='9')
{
}
else
{
return false;
}
}
return true;
}
void setup()
{
Serial.begin(SERIAL_BAUD);
WiFi.mode(WIFI_OFF);
WiFi.forceSleepBegin();
wifi_set_sleep_type(MODEM_SLEEP_T);
}
void loop()
{
if (currentTone>=noTones)
{
validSoundLine=false;
if ( millis() > tuneIs[currentTone][1])
{
// Serial.println("tone off");
tuneIs[currentTone][1]=0;
noTones=0;
currentTone=0;
noTone(speakerPin);
validSoundLine=false;
}
}
if ( noTones>0 && validSoundLine)
{
if ( millis()>tuneIs[currentTone][1])
{
currentTone++;
tone(speakerPin, tuneIs[currentTone][0]);
}
}
if (Serial.available() > 0 )
{
incomingChar = Serial.read();
if ( incomingChar == '\n' )
{
String line=out.substring(0,out.indexOf("*"));
if ( line.substring(0,9)=="$GFPALARM" )
{
if (isItNumeric(line.substring(10)))
{
int toneNumber=line.substring(10).toInt();
validSoundLine=true;
toneNumber=(toneNumber*GFPALARM_SCALE)+GFPALARM_BASE_FREQUENCY;
tuneIs[0][0]=toneNumber;
tuneIs[0][1]=GFPALARM_LENGTH+millis();
// start playing the first.
tone(speakerPin, tuneIs[0][0]);
currentTone=0;
noTones=0;
}
else
{
validSoundLine=false;
}
}
if (line.substring(0,4)=="$BSD")
{
String bsdLine=line.substring(5);
Serial.println(bsdLine);
int currentChar=0;
int tuneLength=0;
int maxTones=10;
int toneReading=0;
int spaceIndex=0;
validSoundLine=true;
while( spaceIndex>=0 && currentTone<maxTones && validSoundLine)
{
spaceIndex=bsdLine.indexOf(" ",currentChar);
String currS=bsdLine.substring(currentChar,spaceIndex);
if (isItNumeric(currS))
{
// time to play tone
if ( toneReading == 1 )
{
tuneIs[currentTone][toneReading]=tuneLength+currS.toInt()+millis();
tuneLength=tuneLength+currS.toInt();
}
else
{
tuneIs[currentTone][toneReading]=currS.toInt();
}
currentChar=spaceIndex+1;
if (toneReading==0)
{
toneReading=1;
noTones++;
}
else
{
toneReading=0;
currentTone++;
}
}
else
{
validSoundLine=false;
}
}
if (validSoundLine)
{
// start playing first tone and then check at top of loop for the next tone to change to.
tone(speakerPin, tuneIs[0][0]);
currentTone=0;
// playing the first.
noTones--;
}
}
out="";
}
else
{
out=out+String(incomingChar);
}
}
yield();
// delay in to stop the board looping too fast and crashing.
delay(5);
}
</pre>
<br>
</td></tr></tbody></table>
<br>
<br>
<p></p><br>
</td></tr>
</tbody></table>
<br>
</td>
<td width="50"></td>
</tr>
</tbody></table>
<br>
</td>
<td valign="top"><a href="http://www.airwhere.co.uk/"><img border="0" src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/paragliding-arrow-right.gif" alt="paragliding system"></a></td>
</tr>
</tbody></table>
<br>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#ffffff" height="100%"></td>
</tr>
<tr>
<td colspan="2" height="100">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tbody><tr>
<td class="footer_w" width="50"></td>
<td class="footer_w" width="250"><a class="footer_w" href="http://www.airwhere.co.uk/shop">Purchase</a><br><br><span class="whitefooter">The AirWhere software is free and will always be free along with all updates for anyone wanting to make a unit, however for those with less time or wish purchase a kit or parts visit this <a class="footer_w" href="http://www.airwhere.co.uk/purchase-airware-parts.php">page</a>.</span></td>
<td class="footer_w" width="50"></td>
<td class="footer_w" width="250"><a class="footer_w" href="http://www.airwhere.co.uk/live-tracking-paragliding.php">Live Tracking<br></a><br><br><span class="whitefooter">View your position on the web, uploaded directly from AirWhere <br>( AirWhere features livetrack24 compatibility )</span></td>
<td class="footer_w" width="50"></td>
<td class="footer_w" width="250"><a class="footer_w" href="http://www.airwhere.co.uk/donate-to-airware.php">Donate</a><br><br><span class="whitefooter">AirWhere costs us money in hosting, design and testing, feel free to contribute ;)</span></td>
<td class="footer_w" width="50"></td>
<td bgcolor="#ffffff" height="157" width="374" align="right"><img src="./AirWhere - Paragliding Detection System - See Other Pilots in Realtime_files/paragliding-lk-white.jpg" alt="paragliding detection system"></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div>
<br>
<div id="cboxOverlay" style="display: none;"></div><div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;"><div id="cboxWrapper"><div><div id="cboxTopLeft" style="float: left;"></div><div id="cboxTopCenter" style="float: left;"></div><div id="cboxTopRight" style="float: left;"></div></div><div style="clear: left;"><div id="cboxMiddleLeft" style="float: left;"></div><div id="cboxContent" style="float: left;"><div id="cboxTitle" style="float: left;"></div><div id="cboxCurrent" style="float: left;"></div><button type="button" id="cboxPrevious"></button><button type="button" id="cboxNext"></button><button id="cboxSlideshow"></button><div id="cboxLoadingOverlay" style="float: left;"></div><div id="cboxLoadingGraphic" style="float: left;"></div></div><div id="cboxMiddleRight" style="float: left;"></div></div><div style="clear: left;"><div id="cboxBottomLeft" style="float: left;"></div><div id="cboxBottomCenter" style="float: left;"></div><div id="cboxBottomRight" style="float: left;"></div></div></div><div style="position: absolute; width: 9999px; visibility: hidden; display: none; max-width: none;"></div></div></body></html>