xplane udp
1.0.0
عميل XPlane UDP لـ 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 )
} ) يوجد أدناه بنية كائن البيانات الذي تم إرجاعه في الحدث updated ، أو يمكن الوصول إليه مباشرة من client.data.<group>.<value> .
timereal - [ق]total - [ق]mission - [ق]timer - [ق]zulu - [hh.ss]local - [hh.ss]hobbsairspeedindicated - KIAS [كيلو كيلو بايت]equivalent - KEAS [كيلو طن]true - KTAS [KTS]truegnd - KTGS [KTS]mph - معيار المحاسبة الدولي [ميلا في الساعة]mphair - [ميل في الساعة]mphgnd - [ميل في الساعة]gloadmach - رقم ماخ [النسبة]vvi - VVI [fpm]normalaxialsideangularmomentm - [فتلب]l - [فتلب]n - [فتلب]angularvelocityq - [راد/ث]p - [راد/ث]r - [راد/ث]attitudepitch - [درجة]roll - [درجة]truehdg - [درجة]maghdg - [درجة]aoaalpha - [درجة]beta - [درجة]hpath - [درجة]vpath - [درجة]slip - [درجة]compassmag - [شركات]mavar - [درجة]globalpositionlat - [درجة]lon الطول - [درجة]altmsl - [قدم]altagl - [قدم]runway - [رقم المدرج]altind - [قدم]latnormlonnormsimpositionx - [م]y - [م]z - [م]vx - [م/ث]vy - [م / ث]vz - [م/ث]distft - [قدم]distnm - [نانومتر]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 - غسيل دعائي أو غسيل نفاث[1..8] - [عقدة]n1 - توربين N1 %[1..8] - [%]n2 - توربين N2 %[1..8] - [%]fuelflow[1..8] - [رطل/ساعة]itt[1..8] - [درجة]egt[1..8] - [درجة]cht[1..8] - [درجة]oilpressure[1..8] - [رطل لكل بوصة مربعة]oiltemp[1..8] - [درجة]fuelpressure[1..8] - [رطل لكل بوصة مربعة]aeroforcelift - [رطل]drag - [رطل]side - [رطل]engineforcenormal - [رطل]axial - [رطل]side - [رطل] npm inpm run typescript (أو typescript-watch للمشاهدة)npm inpm run typescriptnpm run test