UNPKG
xplane
Version:
latest (0.0.6)
0.0.6
0.0.5
0.0.4
0.0.2
0.0.1
XPlane data module for Node.js
github.com/balintb/xplanejs
balintb/xplanejs
xplane
/
examples
/
simple.js
19 lines
(15 loc)
•
282 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var
XPlane
=
require
(
'../lib/xplane'
);
var
xplane =
new
XPlane
({
port
: {
in
:
49000
,
out
:
49001
} }); xplane.
on
(
'sentence'
,
function
(
buffer
) {
// raw data
}); xplane.
on
(
'data.airspeed'
,
function
(
speed
) {
// IAS
console
.
log
(speed.
indicated
); }); xplane.
listen
();