Jump to content
The simFlight Network Forums

Dabull

Members
  • Posts

    23
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Usa

Dabull's Achievements

Apprentice

Apprentice (3/14)

  • Collaborator Rare
  • Reacting Well Rare
  • First Post Rare
  • Conversation Starter Rare
  • Week One Done Rare

Recent Badges

0

Reputation

  1. No probem. Got it now. Thanks for the great tool.
  2. I get a notice the v0.3.2 is available but when I got to the website on v0.3.1 is available. Should I be checking somewhere else?
  3. It happens while in use . I haven't been able to pnpoint a specific interval as it could be a couple times in a minute and then not at all for ten minutes. I won't worry about it anymore since I have a handler on reestablishing the connection if it closes. Thanks.
  4. Is it normal for the Web Socket to intermittently disconnect. It took me awhile to figure out this behavior and write logic to deal with it, which I can handle now without crashing the program. But is it normal to have these unexpected disconnects?
  5. I got it now. It works now. Thanks for your patience in helping me.
  6. I think I tried that before. Sitting at MGCT airport (latitude: 14.6946573257446 Longitude: -91.8814315795899). When I read 6010/6018 as lat/lon type versus float I get this: { name: "latitude", address: 0x6010, type: "float", size: 8 }, { name: "writelatitude", address: 0x6010, type: "lat", size: 8 }, { name: "longitude", address: 0x6018, type: "float", size: 8 }, { name: "writelongitude", address: 0x6018, type: "lon", size: 8 }, Lat/Lon Float: 14.696005552849051,-91.87789736218718 Lat/Lon Write : 9688.75418157663,-89.522262409018 Float is correct. The lat/lon type isn;t returning correct values.
  7. I just realized that I can't write to 6010 and 6018 for latitude/longitude. I have to use 0560 & 0568. However, the computation for that field is complicated and I have no clue what some of the terms are. Any one know what the computation is to turn degrees lat/lon to write to those offsets? Thanks.
  8. Ok never mind. They referred to 0574 but that one is not listed explicitly in the FSUIPC document. x0574 is for the whole meters and x0570 is for the fractional part of the altitude. Hence my crashing at low altitude.
  9. It worked for heading. But for altitude I could not write as x6020 you cannot write to. So I found x0570 that you can write to. But it behaves oddly when I pass the altitude in meters. It flips the plane over and shuts the engine off. Is the computation for writing to this offset different?
  10. Can someone please verify if this is the correct reverse computation to write back heading (0x0580) and altitude (0x6020) to the sim? I think altitude is pretty much easy. I am not convinced of the heading though. I extracted it as follows: heading = Math.round(response.data.heading * 360 / (65536*65536)) altitude = Math.round(response.data.altitude * 3.28084) And I plan to write back as follows: var newheading = (plannedrecord.heading / 360) * (65536/65536) var newaltitude = plannedrecord.altitude / 3.28084
  11. I added more weight and I can see the aircraft reacting to the load. So it is a UI issue of not refreshing based on weight loaded from backend.
  12. Interestingly when I read back the payload after sending specific amounts I can see the stations have been loaded correctly at least data wise in MSFS: payloadStations: [ { index: 0, name: 'TT:MENU.PAYLOAD.', weight: 170, position: [Object] }, { index: 1, name: 'TT:MENU.PAYLOAD.', weight: 170, position: [Object] } ], But when you look in the UI it doesn't show up. This is the same result whether I use 'payload.autoload' or 'payload.write', using different aircraft. So it may be an MSFS issue.
  13. I am not sure why the passenger load is not working. The fuel part loads fine. Here is my code. I have been testing on stock DA40NG in MSFS. Cargo variable is 0. So I am trying to load 510 which is equivalent to 3 passengers at 170lbs/pax. But the stations all remain zero. Also does the payload include the pilot station? var fuelload = Math.round(plannedrecord.maxFuel * .75) var passengers if (plannedrecord.passengers === 0){ passengers = 0 } else { passengers = plannedrecord.passengers * 170 } var payload = (510 + plannedrecord.cargo) console.log (payload) var request = { command: 'payload.autoload', volumeUnit: 'gal', weightUnit: 'Lbs', length: 'm', method: 'set', totalFuelWeight: fuelload, totalPayloadWeight: payload } // send to the server as a JSON string if (wsstatus !== 'null' || wsstatus !== 'error'){ ws.send(JSON.stringify(request)); }
  14. Thank you that makes sense now. Took me awhile to understand it. I am able to convert the values to meaningful ones.
  15. Honestly most of the values don't make sense: I sent this: offsets: [ { name: 'aircraftName', address: 0x3D00, type: 'string', size: 256 }, { name: 'altitude', address: 0x0570, type: 'uint', size: 8 }, { name: 'heading', address: 0x0580, type: 'uint', size: 4 }, {name: 'groundSpeed', address: 0x6030, type: 'uint', size: 8}, {name: 'latitude', address: 0x6010, type: 'int', size: 8}, {name: 'longitude', address: 0x6018, type: 'int', size: 8}, {name: 'verticalSpeed', address: 0x030C, type: 'int', size: 4}, {name: 'onGround', address: 0x0366, type: 'int', size: 2} ] and I get this: { aircraftName: 'Cessna CJ4 Citation WT', altitude: 61267640065450, heading: 1445037629, groundSpeed: 4641275633426061000, latitude: -4606115315203747000, longitude: -4588245414674943500, verticalSpeed: 8, onGround: 0 } I have no clue what a floating point double is. How do I convert these values to something meaningful.
×
×
  • 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.