xplane udp
1.0.0
Klien UDP XPlane untuk 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 )
} )
Di bawah ini adalah struktur objek data yang dikembalikan dalam peristiwa updated
, atau dapat diakses langsung dari 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
- Nomor Mach [rasio]vvi
- VVI [fpm]normal
axial
side
angularmoment
m
- [ftlb]l
- [ftlb]n
- [ftlb]angularvelocity
q
- [rad/dtk]p
- [rad/dtk]r
- [rad/s]attitude
pitch
- [derajat]roll
- [derajat]truehdg
- [derajat]maghdg
- [derajat]aoa
alpha
- [derajat]beta
- [derajat]hpath
- [derajat]vpath
- [derajat]slip
- [derajat]compass
mag
- [komp]mavar
- [derajat]globalposition
lat
- [derajat]lon
- [derajat]altmsl
- [kaki]altagl
- [kaki]runway
- [landasan pacu no.]altind
- [kaki]latnorm
lonnorm
simposition
x
- [m]y
- [m]z
- [m]vx
- [m/dtk]vy
- [m/dtk]vz
- [m/dtk]distft
- [kaki]distnm
- [nm]throttlecommand
[1..8]
throttleactual
[1..8]
enginepower
[1..8]
- [hp]enginethrust
[1..8]
enginetorque
[1..8]
enginerpm
[1..8]
proprpm
[1..8]
proppitch
[1..8]
enginewash
- propwash atau jetwash[1..8]
- [kts]n1
- turbin N1 %[1..8]
- [%]n2
- turbin N2 %[1..8]
- [%]fuelflow
[1..8]
- [lb/jam]itt
[1..8]
- [derajat]egt
[1..8]
- [derajat]cht
[1..8]
- [derajat]oilpressure
[1..8]
- [psi]oiltemp
[1..8]
- [derajat]fuelpressure
[1..8]
- [psi]aeroforce
lift
- [lb]drag
- [lb]side
- [lb]engineforce
normal
- [pon]axial
- [lb]side
- [lb] npm i
npm run typescript
(atau typescript-watch
untuk menonton)npm i
npm run typescript
npm run test