Author Topic: Instrumental output from the game  (Read 1020 times)

Offline nrshida

  • Plutonium Member
  • *******
  • Posts: 8590
Instrumental output from the game
« on: June 01, 2020, 05:43:32 AM »
Sometime ago, maybe four years even, there was some discussion of AH outputting certain orientation / state data to an external system. After the incorporation of VR is there any intention to still implement this?

Especially IAS might be interesting. 

"If man were meant to fly, he'd have been given an MS Sidewinder"

Offline JimmyD3

  • Gold Member
  • *****
  • Posts: 3978
Re: Instrumental output from the game
« Reply #1 on: June 01, 2020, 06:39:51 PM »
I think Hitech just set up the Yaw links in the last update, as I recall. If that is what your after, or are you looking for instrument data? speed, altitude, aoa etc.
Kenai77
CO Sic Puppies MWK
USAF 1971-76

Offline nrshida

  • Plutonium Member
  • *******
  • Posts: 8590
Re: Instrumental output from the game
« Reply #2 on: June 02, 2020, 01:54:18 AM »
I think Hitech just set up the Yaw links in the last update, as I recall. If that is what your after, or are you looking for instrument data? speed, altitude, aoa etc.

Yaw links? Sounds interesting. Yes the parameters you mentioned would be ideal. Parametrically if possible, I know there is already a cluster of data but I don't know in what form it is output.

"If man were meant to fly, he'd have been given an MS Sidewinder"

Offline hitech

  • Administrator
  • Administrator
  • *****
  • Posts: 12398
      • http://www.hitechcreations.com
Re: Instrumental output from the game
« Reply #3 on: June 04, 2020, 10:01:33 AM »
From flightdata.txt file in the aces high folder.

Aces High has the ability to send its flight data to a udp port.
The data is sent as comma separated ASCII data with a line feed for packet.
The output format is as follows.

Version,clock,SimType,x,y,z,xvel,yvel,zvel,xacc,yacc,pacc,roll,pitch,yaw,rollvel,pitchvel,yawvel,rollacc,pitchacc,yawacc\n

Description of data.
Version a hex number currently 30309 this will change if the format of the output string changes

clock   the current game clock

SimType a number that represent what type of sim the game is running values as follows

   Not In Flight      0
   PLANE         1
   NOT USED      2
   CHUTE         3
   GUNNER         4
   ATTACHED      5
   VEHICLE         6
   BOAT         7
   OBJECT_GUNNER      8
   ANPHIB            9

x y z position in feet of the vehicle or plane. Note y is up z is forward and x is right.
      Currently x and z are always 0.

xvel yvel zvel velocity in fps of the vehicle or plane.
xacc yacc zacc the acceleration of the plane in fpss.

roll pitch yaw the attitude of the plane  in degrees
                  note the positive directions of angles

               Roll Right + around z axis
               Pitch UP + around the x axis
               Yaw Left + around the y axis
rollvel pitchvel yawvel the angular velocity in degrees per sec.
rollacc pitchacc yawacc the angular velocity in degrees per sec per sec.

   

Offline KillerPops

  • Zinc Member
  • *
  • Posts: 44
Re: Instrumental output from the game
« Reply #4 on: January 27, 2024, 04:11:04 PM »
Sorry for opening this old thread.

I have tried this a few years ago, but I cannot for the life of me remember to which port, or how to set up (and set) the port. Anyone?

Offline FLS

  • AH Training Corps
  • Plutonium Member
  • *******
  • Posts: 11617
      • Trainer's Website
Re: Instrumental output from the game
« Reply #5 on: January 28, 2024, 07:59:47 AM »
Look at Clipboard options/controls/force feedback. 

Offline nrshida

  • Plutonium Member
  • *******
  • Posts: 8590
Re: Instrumental output from the game
« Reply #6 on: January 28, 2024, 12:10:32 PM »
Can you then process the data in a separate program? I can write C but I haven't used UDP before. Presumably the data feeds open-ended once AH is running?
"If man were meant to fly, he'd have been given an MS Sidewinder"

Offline KillerPops

  • Zinc Member
  • *
  • Posts: 44
Re: Instrumental output from the game
« Reply #7 on: January 28, 2024, 01:23:59 PM »
Look at Clipboard options/controls/force feedback.

There it was, thanks  :cool: Have to write it up this time  :D

Can you then process the data in a separate program? I can write C but I haven't used UDP before. Presumably the data feeds open-ended once AH is running?

Yes, UDP simply spews out data, no checking or anything. The only thing needed is to read from that port, and of course decipher the data stream. In this case it's very simple, and all explained in that file above. The data is in ASCII form also, so no need to worry about how a particular OS/compiler stores/interpret various datatypes.

I have no clue how this is done in C. I have only used LabVIEW and Lua for this, both are super simple. I would assume it's equally simple in C. Just a matter of socket.UPD.connect(), socket.UDP.read() in a loop, and then socket.UDP.disconnect or some similar worded functions is all there is to it.

Offline nrshida

  • Plutonium Member
  • *******
  • Posts: 8590
Re: Instrumental output from the game
« Reply #8 on: January 29, 2024, 02:28:56 AM »
Thanks. I'd actually forgotten about this myself. I'll look into it.

Wonder if other flight sims do similar?
"If man were meant to fly, he'd have been given an MS Sidewinder"

Offline KillerPops

  • Zinc Member
  • *
  • Posts: 44
Re: Instrumental output from the game
« Reply #9 on: January 29, 2024, 02:58:39 AM »
They sure do. X-Plane has done this for ages, only every little piece of information can be read. You can also send stuff back to X-Plane. Then there is DCS. This is the same as X-Plane, tons of info (just about every little thing), and you can send things back. DCS is a bit more manual, you have to set up the script yourself in Lua. Luckily Lua scripting is fairly easy going. MSFS probably too, don't know for sure, haven't touched MSF since 20-30 years.

All this makes it fairly simple to set up your own cockpit for instance, which more and more do, at least partially, for DCS for instance as well as X-Plane. Not possible in AH, because of the very limited stuff you can read, and no way to send stuff back other than by joystick commands and keyboard.