xplane udp
1.0.0
Client UDP XPlane pour Node.js
// Import XPlane class from the package
import { XPlaneClient } from "xplane-udp"
// Create a client on a specific port (this is a value you define in your xplane game settings)
const client = new XPlaneClient ( 49000 )
// Start the UDP listener
client . start ( )
// Subscribe to the updated event
// This will fire at the rate at which you send UDP updates (set in-game)
client . on ( "updated" , ( data ) => {
// Do something with the data
console . log ( data )
} )
// You can also access the data directly from the client instance
callMeMaybe ( ( ) => {
// Access data in the following format `<client>.data.<group>.<value>`
console . log ( client . data . time . real )
console . log ( client . data . airspeed . indicated )
} )
Vous trouverez ci-dessous la structure de l'objet de données renvoyé dans l'événement updated
, ou autrement accessible directement depuis client.data.<group>.<value>
.
time
real
- [s]total
- [s]mission
- [s]timer
- [s]zulu
- [hh.ss]local
- [hh.ss]hobbs
airspeed
indicated
- KIAS [kts]equivalent
- KEAS [kts]true
- KTAS [kts]truegnd
- KTGS [kts]mph
- IAS [mph]mphair
- [mph]mphgnd
- [mph]gload
mach
- Nombre de Mach [rapport]vvi
- VVI [fpm]normal
axial
side
angularmoment
m
- [ftlb]l
- [ftlb]n
- [ftlb]angularvelocity
q
- [rad/s]p
- [rad/s]r
- [rad/s]attitude
pitch
- [deg]roll
- [deg]truehdg
- [deg]maghdg
- [deg]aoa
alpha
- [degrés]beta
- [degrés]hpath
- [degrés]vpath
- [degrés]slip
- [deg]compass
mag
- [comp]mavar
- [degrés]globalposition
lat
- [degrés]lon
- [degré]altmsl
- [pi]altagl
- [pi]runway
- [numéro de piste]altind
- [pi]latnorm
lonnorm
simposition
x
- [m]y
- [m]z
- [m]vx
- [m/s]vy
- [m/s]vz
- [m/s]distft
- [ft]distnm
- [nm]throttlecommand
[1..8]
throttleactual
[1..8]
enginepower
[1..8]
- [ch]enginethrust
[1..8]
enginetorque
[1..8]
enginerpm
[1..8]
proprpm
[1..8]
proppitch
[1..8]
enginewash
- propwash ou jetwash[1..8]
- [nœuds]n1
- turbine N1 %[1..8]
- [%]n2
- turbine N2 %[1..8]
- [%]fuelflow
[1..8]
- [lb/h]itt
[1..8]
- [degrés]egt
[1..8]
- [degrés]cht
[1..8]
- [degrés]oilpressure
[1..8]
- [psi]oiltemp
[1..8]
- [degrés]fuelpressure
[1..8]
- [psi]aeroforce
lift
- [lb]drag
- [lb]side
- [lb]engineforce
normal
- [lb]axial
- [lb]side
- [lb] npm i
npm run typescript
(ou typescript-watch
pour regarder)npm i
npm run typescript
npm run test