Jump to content
The simFlight Network Forums

Benl112

new Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Germany

Benl112's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • One Month Later Rare
  • One Year In Rare
  • Conversation Starter Rare
  • Week One Done

Recent Badges

0

Reputation

  1. Thank you @John Dowson for your reply! I switched to the flap handle recognition and wrote a custom logic to detect the detents, thank you! Now i have new problems with the sim version and fsuipc/xpuipc version decoding, but i will get to it 🙂 I know we are in a different topic, but there is no version number reserved for xplane in 0x3308, because only XPUIPC is compatibly with XP, correct?
  2. Hello Luke, Thanks for your quick reply. Yes, i am currently only trying it for XP. But the current problem is that the 0xBE0 does detect 75% for the Toliss A339 for flaps full and also 75% for Flaps 3. So it seems to be the incorrect offset to detect the trailing edge flaps. Pegasus does not have custom mappings for each addon at it is also a flexible way. I do not need to now the exact detent like F15 in a 757 or F3 in an A3XX. I just need to know that the flaps is in a detent, to mark it in the log as "Flaps set to Detent X".
  3. Hey guys, i am in the works of programming an ACARS for a virtual airline to track/log flights and events during the flights. As know from software like "Pegasus" i want to log flaps event like "Flaps set to position 4". For this i thought about the following logic: Getting the number of flap increments of the aicraft using: dataset.add('flapsAvail', 0x3BFA, fsuipc.Type.Int16) (Which returns for the Toliss A339 and the FlightFactor 757 a value of 2047 -> So 9 Flaps Positions) And use the flap raw position in percent: dataset.add('flapsPosition', 0xBE0, fsuipc.Type.Int32) But the problem is, that for the toliss A339 it returns 75% for Flaps 3 AND Flaps Full, as i suspect it only detects the leading (SLATS) and not the trailing edge flaps. I am at the moment at the end of my ideas on how Pegasus could have came up with a solution but does anybody has a different approach to the problem? The Script shall be able do handle P3D, XP11/12 and MSFS dynamically. Thanks for your input in advance!
  4. Hello guys, first of all, i am totally new to the fsuipc developing side, so please bear with me, when it comes to the way i can interact with fsuipc. I am currently experimenting within an electron-framework app, which ultimatly (in faaaaar time) shall become a tracker. In my research on interacting with fsuipc via javascript, i found the fsuipc-module on node-js. This module gives me the ability to poll data from fsuipc in certain intervalls. In functions great, i already built a simple polling stream which gets data like longtitude and latitude for P3D and MSFS at a certain intervall. But i soon realised, that for certain tracker-behaviors i need a event-driven-script. For example the touchdown. Things like engine start or takeoff, i could simply detect via my current polling rate. But for the landing, i need a event listener which listens to the altitude (like pegasus for the last 50ft) or the touchdown itself, as i do not want to poll in milliseconds for the last 100ft or the approach. I already looked at the sdk, but as i am still a little new to the whole programming world, i did not find a good approach to my problem. I know, that the event-driven-script may be complicated to explain, but i hope that somebody has the time to do so or to provide me with sources where i could learn more about it. 🙂 My current simple polling script looks like this: const fsuipc = require('fsuipc'); let fetchingInterval; const startFsuipcHandler = async (event, args) => { try { if (fetchingInterval) { //Stop fetching if its already started clearInterval(fetchingInterval); fetchingInterval = null; console.log('fetching stopped'); return; } //Start fetching every 5 seconds fetchingInterval = setInterval(async () => { const obj = new fsuipc.FSUIPC(); await obj.open(); obj.add('gpsGS', 0x6030, fsuipc.Type.Double); //speed in meter per second from GPS obj.add('gpsLAT', 0x6010, fsuipc.Type.Double); //LAT in DD Coord from GPS obj.add('gpsLON', 0x6018, fsuipc.Type.Double); //LON in dd Coord from GPS obj.add('gpsALT', 0x6020, fsuipc.Type.Double); //gpsALT in meter from GPS //obj.add('groundALT', 0x0020, fsuipc.Type.Int32); //ground ALT in meter (muss convertiert werden /256) obj.add('planeBank', 0x057C, fsuipc.Type.Int32); //bank (muss convertiert werden bank*360/65536^2, - = right bank) obj.add('planePitch', 0x578, fsuipc.Type.Int32); //pitch (muss convertiert werden pitch*360/65536^2, - = pitch up) obj.add('vs', 0x2C8, fsuipc.Type.Int32); //vertical speed (muss konvertiert werden vs *60*3,28084/256) obj.add('gForce', 0x1140, fsuipc.Type.Double); obj.add('aircraftType', 0x3D00, fsuipc.Type.String, 256); //obj.add('lights', 0x0D0C, fsuipc.Type.BitArray, 2); //obj.add('clockHour', 0x238, fsuipc.Type.Byte); obj.add('eng1fuelUsedSinceStart', 0x90C, fsuipc.Type.Single); //in lb obj.add('eng1N1', 0x898, fsuipc.Type.Int16);//konveriterung: value/16384 * 100 const result = await obj.process(); result.planeBank = ((result.planeBank * 360) / Math.pow(65536, 2)).toFixed(2); result.planePitch = ((result.planePitch * 360) / Math.pow(65536, 2)).toFixed(2); result.vs = Math.floor(result.vs * 60 * 3.28084 / 256); result.gForce = (result.gForce).toFixed(2); result.gpsALT = Math.round(result.gpsALT * 3.28084); result.gpsGS = (result.gpsGS * 1.94384).toFixed(1); result.gpsLAT = (result.gpsLAT).toFixed(9); result.gpsLON = (result.gpsLON).toFixed(9); result.eng1N1 = (result.eng1N1)/16384 *100; console.log(result); // Send the result to the renderer process event.sender.send('fsuipc-data', result); await obj.close(); }, 5000); console.log('Fetching started') } catch (err) { console.error(err); } }; module.exports = { startFsuipcHandler }; Thank you very much in advance and merry christmas 🙂
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.