Jump to content
The simFlight Network Forums

TerraBuilder Team

new Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Canada

TerraBuilder Team's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Hi John, Most of the variables available through SimConnect's Request event mechanism are also available through WASM/C++ Gauges' Token Variables. However they are not the same as SimVars, but are specific to Gauge API. I am not sure what mechanism they employ, but they do seem to obtain aircraft parameters directly, without the need for a request. Thanks for your answers, I really appreciate it as it clarifies most of the things I needed to know! Cheers, Mitch
  2. Thanks John, Ok, got it. I thought FSUIPC was similar to SimConnect, but not its client (since it exists from way back, I believe FS98, long before SimConnect existed) SimVars I am after are: hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_USER_AIRCRAFT, "PLANE LATITUDE", "degrees"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_USER_AIRCRAFT, "PLANE LONGITUDE", "degrees"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_USER_AIRCRAFT, "PLANE ALTITUDE", "meters"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_USER_AIRCRAFT, "PLANE PITCH DEGREES", "degrees"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_USER_AIRCRAFT, "PLANE BANK DEGREES", "degrees"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_USER_AIRCRAFT, "PLANE HEADING DEGREES TRUE", "degrees"); Ideally, if the SimObject position could be reliably set before the frame update, this would be the only thing needed. However, I also obtained and applied velocities, in the hope the object motion would be smoothed. It did help to a certain extent. Also, as I mentioned, I switched to using the Token variables, and it seems those are not obtained via SimConnect but by some other mechanism: MODULE_VAR LAT_var = { PLANE_LATITUDE }; LLAGPS.Latitude = GPS_LAT_var.var_value.n * (360.0f / 40007000.0f); I got better results using the Token vars, but I still can't get rid of the vertical oscillation. Thanks, Mitch
  3. Hi everyone, my first time here! I have a specific question on FSUIPC capability: Is FSUIPC capable of retrieving accurate and up to date values of LAT, LON, ALT, PITCH, BANK and HEADING of a current USER aircraft? I need this info on sim's every visual frame (as in, not a sim frame - I am not developing any PID or INS-related capabilities). I need this data in order to attach other SimObject to the user aircraft and closely follow it, as in, cargo pallets, external fuel tanks, adventure cargo (kayaks and gear attached to airplanes' floats), other aircraft (such as X-15 under B-52 or Orbiter on SCA 747), and sure, weapons. Background: I do this right now using SimConnect, however the data obtained through SimConnect's Request/Set mechanism comes with a certain time lag. As a result, the object attached to user aircraft exhibits a bit of a positional lag, as if it is attached with a rubber band that twitches. I am guessing that, by the time I get the data, it is a few cycles "old" and the user plane has moved up ahead a little. I have managed to improve this by using token variable mechanism in SimConnect, and managed to minimize the lag in Lat and Lon plane, but the altitude data is still showing quite a bit of a lag. So basically, I would need LAT LON ALT, PITCH BANK HEADING values of sim's user object VISUAL model, right after the frame update, so that I can set this to my SimObject and send it to the sim before the next update happens (or, that is my general understanding of SimConnect client/server communication, please feel free to correct me if I am wrong) I'm a fairly advanced SimConnect programmer. A while ago, I developed a spaceflight physics model (Video Here) for P3D where you can launch into orbit using a rocket made of almost 20 separate components (SimObjects). This was possible because I used SimConnect functionality to freeze position and attitude of all of the objects, and I was in control of position/attitude of every single part of the rocket (including user-controlled capsule). For this application, I have all the object offsetting and alignment math working, but it all relies on an accurate position/attitude data of the user aircraft, which is still under simulator's flight model control. I'm attaching a screenshot of the current state of things (a SimConnect/WASM module) - a Space Shuttle Orbiter attached to the default MSFS2020 B747. It works well, except for the vertical object oscillations when the altitude is changing. Any insight very much appreciated, Mitch TerraBuilder Team
×
×
  • 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.