Jump to content
The simFlight Network Forums

Acceleration, rates and angles


 Share

Recommended Posts

Hello Peter, as I'm workin on some coding to emulate avionic IRS data, I'm having some doubts about velocities, rates and accelerations avail in fsuipc vs p3d sdk description

Following I copied the SDK description and what I think are the equivalents in FSUIPC. could you please confirm me that this is correct as the descriptions seems to mismatch?

Also, is any way to calculate and add or retrieve from fsuipc: track angle rate, flight path angle and flight path acceleration?

 

Thank you very much

 

VELOCITY WORLD Z  Speed relative to earth, in North/South direction                        3190        label 366
VELOCITY WORLD X  Speed relative to earth, in East/West direction                            3198        label 367
VELOCITY WORLD Y  Speed relative to earth, in vertical direction                                  31A0

ACCELERATION WORLD X  Acceleration relative to earth, in east/west direction         31C0        label 363
ACCELERATION WORLD Y  Acceleration relative to earch, in vertical direction             31C8        label 364
ACCELERATION WORLD Z  Acceleration relative to earth, in north/south direction      31D0        label 362

VELOCITY BODY Z  True longitudinal speed, relative to aircraft axis                               3090
VELOCITY BODY X  True lateral speed, relative to aircraft axis                                         3098
VELOCITY BODY Y  True vertical speed, relative to aircraft axis                                        30A0

ACCELERATION BODY X  Acceleration relative to aircraft axis, in east/west direction        3060        label 332
ACCELERATION BODY Y  Acceleration relative to aircraft axis, in vertical direction             3068        label 333
ACCELERATION BODY Z  Acceleration relative to aircraft axis, in north/south direction     3070        label 331

ROTATION VELOCITY BODY X  Rotation relative to aircraft axis                                                31A8        label 336
ROTATION VELOCITY BODY Y  Rotation relative to aircraft axis                                                 31B0        label 337
ROTATION VELOCITY BODY Z  Rotation relative to aircraft axis                                                  31B8        

RELATIVE WIND VELOCITY BODY X  Lateral speed relative to wind                                          3180
RELATIVE WIND VELOCITY BODY Y  Vertical speed relative to wind                                         3188
RELATIVE WIND VELOCITY BODY Z  Longitudinal speed relative to wind                                3178

PITCH RATE (fsuipc only, no description in sdk)                                                                       30A8        label 326
ROLL RATE   (fsuipc only, no description in sdk)                                                                       30B0        label 327

YAW RATE    (fsuipc only, no description in sdk)                                                                       30B8        label 330

Link to comment
Share on other sites

44 minutes ago, edo17982 said:

ROTATION VELOCITY BODY X  Rotation relative to aircraft axis                                                31A8        label 336
ROTATION VELOCITY BODY Y  Rotation relative to aircraft axis                                                 31B0        label 337
ROTATION VELOCITY BODY Z  Rotation relative to aircraft axis                                                  31B8        

ROTATION VELOCITY BODY X is 30A8, i.e. Pitch Rate
ROTATION VELOCITY BODY Y is 30B0, i.e. Roll Rate
ROTATION VELOCITY BODY Z is  30B8, i.e. Yaw Rate

31A8 is STRUCT WORLD ROTATION VELOCITY X
31B0 is STRUCT WORLD ROTATION VELOCITY Y
31BB is STRUCT WORLD ROTATION VELOCITY Z

The rest are correct.

52 minutes ago, edo17982 said:

Also, is any way to calculate and add or retrieve from fsuipc: track angle rate, flight path angle and flight path acceleration?

Not sure about this - I'll get back to you...

Link to comment
Share on other sites

For the flight path angle, there is a lua script called 'HUD Parameters for FSX' over on avsim that calculates this - you could take a look to see how this is done: https://library.avsim.net/esearch.php?CatID=fsxutil&Name=&FileName=&Author=&DLID=&Sort=Author&ScanMode=0
Extracting the relevant parts from that script: 

Quote

     vs_fs_units = ipc.readSD(0x02C8)                         --get vertical speed, signed, as 256 * metres/sec. For ft/min conversion is *60*3.28084/256 
     vs = vs_fs_units * 60 * 3.28084 / 256                   -- convert to ft/min
     vs = math.floor(vs + 0.5)                                -- round to NO decimal places (nearest integer)
     gnd_spd_meters_per_sec = ipc.readUD(0x02B4)/65536       --ground speed as meters/sec
     gnd_spd_kts = gnd_spd_meters_per_sec * 1.9438           --convert to knots
     gnd_spd_kts = math.floor(gnd_spd_kts + 0.5)             -- round to NO decimal places (nearest integer)
     fpa_degs = (180/3.1416)*math.atan(vs/(gnd_spd_kts*6076.12/60))       -- must convert NM/hr to ft/min and radians to degrees
     fpa_degs = math.floor(fpa_degs*10 + 0.5)/10                                     -- round to 1 decimal place

 

Link to comment
Share on other sites

Hmmmm ok. maybe you can help me to clear it further… here are the arinc labels about accelerations, rates and angles that I need to get value for from fsuipc and the assignements I did. If you tell me if in your opinion something is mismatching or you can help filling would be very helpful

  • Body Pitch Rate                                   label 326       offset  30A8
  • Body Roll Rate                                      label 327       offset  30B0
  • Body Yaw Rate                                     label  330      offset  30B8
  • Body Longitudinal Acceleration        label 331       offset  31B0
  • Body Lateral Acceleration                  label  332      offset  31A8
  • Body Normal Acceleration                 label 333       offset  31B8
  • Flight Path Angle                                 label 322       (180/3.1416)*math.atan(vs/(gs*6076.12/60))
  • Flight Path Acceleration                     label 323
  • Track Angle Rate                                  label 335
  • Pitch Attitude Rate                               label 336
  • Roll Attitude Rate                                 label 337
  • Along Track Acceleration                   label  362       offset 31D0
  • Cross Track Acceleration                   label 363        offset 31C0
  • Vertical Acceleration                          label 364        offset 31C8
  • N-S Velocity                                          label 366        offset 3190
  • E-W Velocity                                         label 367        offset 3198
Link to comment
Share on other sites

6 minutes ago, John Dowson said:

For the flight path angle, there is a lua script called 'HUD Parameters for FSX' over on avsim that calculates this - you could take a look to see how this is done: https://library.avsim.net/esearch.php?CatID=fsxutil&Name=&FileName=&Author=&DLID=&Sort=Author&ScanMode=0
Extracting the relevant parts from that script: 

 

Nice! I will try it later. one less to sort 😄

Link to comment
Share on other sites

6 hours ago, John Dowson said:

For the flight path angle, there is a lua script called 'HUD Parameters for FSX' over on avsim that calculates this - you could take a look to see how this is done: https://library.avsim.net/esearch.php?CatID=fsxutil&Name=&FileName=&Author=&DLID=&Sort=Author&ScanMode=0
Extracting the relevant parts from that script: 

 

Tried it now in my python script and works well. numbers seem to be good. Thanks for the find.

If you can give me a feedback on my last reply would be helpful!

 

Thanks again

Link to comment
Share on other sites

I'm sorry but I just don't have time at the moment. I would have to look them up and work out what the mapping is (from the FSUIPC and P3D documentation), just as you would. I've shown you what is wrong with your initial post, so hopefully you have enough information to do this yourself. Otherwise I can take another look when I have time, but I'm very busy on MSFS issues at the moment, and can't see myself having much time for this type of query for the next few weeks at least.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.