Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Another question Pete.

What is the reason for FSUIPC Offset 2EA0 outputting P3D elevator trim in radians?

(I think) I know what radians are but can't see the relevance of displaying trim value in these units.

On my FSC 737 TQ the 2EA0 output appears to be -72 for full forward trim (0 on the TQ scale) and +234 for full aft trim (17 on the TQ scale). The output reads 0 when the trim is at 4 on the TQ scale. 234 radians would go around a circle just over 37 times, I can't see what the radians value represents!

I'm trying to write a SIOC script which takes a trim value and moves the motorised yokes forward or aft accordingly, but until I know what the value output actually means, I'm struggling!

Cheers!

Charlie K

 

Posted
3 hours ago, crwk78 said:

What is the reason for FSUIPC Offset 2EA0 outputting P3D elevator trim in radians?

(I think) I know what radians are but can't see the relevance of displaying trim value in these units.

These are the units FS provides. FSUIPC doesn't invent how FS does things.

In FSX and P3D it is quite possible for FSUIPC to specify the units required to SimConnect when making the request to be kept up to date with the values.  Even if it couldn't, it would be quite possible for FSUIPC to convert it on arrival. After all, the offsets values are housed in FSUIPC memory and placed there upon receipt.

However, it wasn't always like that. FSUIPC has provided an interface to the values is provides since FS98. In those days, an interface what just what it was. It provided a window directly onto the values inside the simulator. It couldn't change the way these units were shown.

FSUIPC was born out of the idea to make an interface for applications working with FS which stayed consistent across all the versions of FS there were -- FS98, FS2000, CFS1, FS2002, CFS2, FS2004, FSX, FSX-SE and P3D. Other people have also extended the idea to X-Plane, though with less coverage.

Across all of those versions, the values which existed in FS98 have been kept in the same units and in the same places. Many others have been added, yes, but the way it has developed has been deliberately designed to maintain compatibility. Hence the "U" in its name, for "Universal".

There are much odder values to choose from to demonstrate the apparent oddness of original units. Just take the user aircraft's latitude and longitude, for example. But there were reasons, and good reasons, FS used such units -- mainly internal computational efficiency. As now, FS needs every bit of performance it can muster to meet the needs of simulating the world, and having units which were ready to use in the way those computations were performed was important, and really it still is.

The latitude/longitude one, though, has other reasons. The format adopted was designed to squeeze the very maximum precision possible into 64-bit fixed point values. Even floating point doesn't give so much precision (valuable bits are taken for the exponent), and besides which in computers those days floating point was not as fast, relelatively speaking, as today.

3 hours ago, crwk78 said:

On my FSC 737 TQ the 2EA0 output appears to be -72 for full forward trim (0 on the TQ scale) and +234 for full aft trim (17 on the TQ scale).

I'm sorry, but you are misreading it then. As documented, tt's a double floating point value (64-bit "double" in C/C++. known als as a FLT64 in FS terms).

Here, on P3D3, on a 737 for example, it reads from about +0.22 full up to -.22 full down.

The actual limits are probably given in the Aircraft.CFG file.

Here's an extract from my log when I monitored the value to my log (using the Logging monitor facility), and reaching the extreme at the "up" end:

   360222 *** EVENT: Cntrl= 65615 (0x0001004f), Param= 0 (0x00000000) ELEV_TRIM_UP
   360238 Monitor IPC:2EA0 (FLT64) = 0.22060962
   360238 SimRead: 2EA0="ELEVATOR TRIM POSITION"
            FLT64: 0.220609617452 

And here at the other extreme:

   382499 *** EVENT: Cntrl= 65607 (0x00010047), Param= 0 (0x00000000) ELEV_TRIM_DN
   382515 Monitor IPC:2EA0 (FLT64) = -0.22060962
   382515 SimRead: 2EA0="ELEVATOR TRIM POSITION"
            FLT64: -0.220609617452


Pete

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.