Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

question about offset output values.

Featured Replies

Hi all,

I am attempting to read the Radio Altitude offset (0x31E4) and used the tracer to look at the output values. However, for any given altitude, the output values vary by tens of thousands as they scroll up the console. This variation suggests that it will be very difficult for me to read a value and instigate an action at a given altitude. The offset status list shows this offset as a 4 bit value.

Is there a solution to this? Is there a better offset I can use?

I'm very puzzled.

Thanks in advance.

With all offsets you need to refer to the FSUIPC5 Offsets Status document in /modules/FSUIPC Documents folder.

The entry for Radio Altitude reads:

31E4     4      Radio altitude in metres * 65536

The first element is the offset in hexadecimal 0x31E4. The second is the size in bytes (8 bits) not bits. The important element is the scaling - metres * 65536 - which means that the radio altitude has been multiplied by 65536 before it is stored.

To access the Rad Alt you need to use unsigned double (UD) for 4 bytes (UB=single byte, UW=2 bytes or one word totalling 16bits, UD=4 bytes or 32bits). In LUA the code would be ht = ipc.readUD(0x31E4). This needs to be divided by 65536 to give metres and multiplied by 3.28 to give the radio altitude in feet. Or divide ht by 19980 to go straight to feet.  

In LINDA Tracer to monitor an Offset in the LINDA Console, you need these setting and then click Start.

RadAltOffset.jpg 

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

  • Author

Thank you for this though I do have one final question; how do I represent the maths in the .Lua file?

Would it be: if (ht/19980) <= 65 then..?

Thanks in advance.

That is about right. There are plenty of examples in the supplied code like common.lua and a google search for LUA programming is a good source. It is better to avoid putting calculations inside a if/then statement. This makes it easier to debug. 

Edited by ScotFlieger

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.