xplane udp
1.0.0
Node.js용 XPlane UDP 클라이언트
// 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 )
} ) 다음은 updated 이벤트에서 반환되거나 client.data.<group>.<value> 에서 직접 액세스할 수 있는 데이터 개체의 구조입니다.
timereal - [들]total - [초]mission - [s]timer - [s]zulu - [hh.ss]local - [hh.ss]hobbsairspeedindicated - KIAS [kts]equivalent - KEAS [kts]true - KTAS [kts]truegnd - KTGS [kts]mph - IAS [mph]mphair - [mph]mphgnd - [mph]gloadmach - 마하 수 [비율]vvi - VVI [fpm]normalaxialsideangularmomentm - [ftlb]l - [ftlb]n - [ftlb]angularvelocityq - [라드/초]p - [라드/초]r - [라드/초]attitudepitch - [도]roll - [도]truehdg - [도]maghdg - [도]aoaalpha - [도]beta - [도]hpath - [도]vpath - [도]slip - [도]compassmag - [comp]mavar - [도]globalpositionlat - [도]lon - [도]altmsl - [피트]altagl - [피트]runway - [활주로 번호]altind - [피트]latnormlonnormsimpositionx - [m]y - [m]z - [m]vx - [m/s]vy - [m/s]vz - [m/초]distft - [피트]distnm - [nm]throttlecommand[1..8]throttleactual[1..8]enginepower[1..8] - [마력]enginethrust[1..8]enginetorque[1..8]enginerpm[1..8]proprpm[1..8]proppitch[1..8]enginewash - propwash 또는 jetwash[1..8] - [kts]n1 - 터빈 N1 %[1..8] - [%]n2 - 터빈 N2 %[1..8] - [%]fuelflow[1..8] - [파운드/시간]itt[1..8] - [도]egt[1..8] - [도]cht[1..8] - [도]oilpressure[1..8] - [psi]oiltemp[1..8] - [도]fuelpressure[1..8] - [psi]aeroforcelift - [lb]drag - [lb]side - [lb]engineforcenormal - [파운드]axial - [lb]side - [lb] npm inpm run typescript (또는 typescript-watch 통해 확인)npm inpm run typescriptnpm run test