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.

[Help] How to get the actual heading degrees in Lua

Featured Replies

Hello my name is Ian and i am new with LINDA and Lua , yesterday I was working on a script for my brother,he show the original script,in XML.
This is the script: 

(L:CDI source selected, enum) 1 == 

if{
    (A:NAV1 radial, degrees) (A:Plane heading degrees gyro, degrees)
    (>K:VOR1_SET)

(L:CDI source selected, enum) 2 == 

if{
    (A:NAV2 radial, degrees) (A:Plane heading degrees gyro, degrees)
    (>K:VOR2_SET) 
}    
(P:Absolute time, seconds) (>L:time crs changed, seconds)

The script changes the Nav 1 or Nav 2 heading to the actual curse of the plane,i think that this value is on the degrees variable,so, my trouble is ,is there any function on LINDA to get that value?I find the function to set the VOR1 or VOR2  and the function to set the Heading degrees gyro but it doesn't work at all because I have to use a static float number.

Thanks for the help.

Hi Ian

I am familiar with many programming language but not the one you quote. XML is an eXtensible Markup Language for documenting not a scripting or programming language. To understand your question, I would need to know what you are trying to do, with what Flt Sim and how you want to display the information. 

You will find LUA functions handling VOR/NAV function in LINDA's common.lua (in /modules/linda/system under NAV). These use the FSUIPC offsets to access the stored values (see FSUIPC Document in /modules).

Edited by ScotFlieger
For english

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

Hi Scot

Before all else, thanks for your reply.
That script was inside of the .XML script, I'm not a regular user of XML but also that script use the reverse polish notation.
As soon as I can,I'll try what you tell me and then I'll post if it worked.
Thanks.

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.