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.

Set Heading Bug (via keyboard mapping)

Featured Replies

Is there a way to map a key on my keyboard to set the heading bug in the direction I am currently flying?  I have tried "SET HEADING BUG" and "SELECT HEADING BUG".  Maybe my memory is failing me, but I thought I could do this in the old days of FSX.

You need to map a key to "PLUS" and "MINUS" also. I cannot remember off the top of my head if it's "SET HEADING BUG" or "SELECT HEADING BUG" first though. But the "PLUS" or "MINUS" changes the heading bug after it is set or selected.

Roomy is correct.

Here's how I mapped increase simrate and decrease simrate to two buttons. It would be the same type of scheme for heading bug. (I picked up a cheap $69 USB 12 button box at Etsy. It is tiny. You can velcro it anywhere convenient).

https://www.etsy.com/listing/1450757013/sim-racing-button-box-usb-pc-12-function

The controls screen in MSFS allows you to assign more than one command to any button. So I assigned SIMRATE to a button. And also the same command  SIMRATE to another button. (This command by default is R on the keyboard). To the first button I also assigned DECREASE SIM RATE. To the second INCREASE SIM RATE. Now each of these buttons executes two commands: R+Decrease or R+ Increase.

So now those buttons will always do only one thing: decrease or increase simrate. They will never surprise you and do anything else, like zoom the view, etc. 

==================

Heading bug could be done the same way.

Assign SELECT HEADING BUG to both of 2 different buttons. Those 2 buttons are also assigned either INCREASE HEADING BUG or DECREASE HEADING BUG. Now those two buttons will always only do one thing: advance or retard the heading bug.

====================

On the other hand, using the + or - key is a crapshoot. Almost anything is liable to happen whenever you press either of those keyboard keys. Depending on what was the last parameter that you 'selected'. 

====================

 

 

 

 

Edited by Fielder

5800X3D, RTX4070, 600 Watt, one or two 1440p 32" screens, 64 GB RAM, 4 TB  PCle 3 NVMe, Warthog throttle, VKB NXT EVO stick, Honeycomb Alpha yoke, CH quad, 3 Logitech panels, 2 StreamDecks, Desktop Aviator Trim Panel. Crystal Light VR.

 

  • Author
1 hour ago, RoomyKestrel235 said:

You need to map a key to "PLUS" and "MINUS" also. I cannot remember off the top of my head if it's "SET HEADING BUG" or "SELECT HEADING BUG" first though. But the "PLUS" or "MINUS" changes the heading bug after it is set or selected.

 

11 minutes ago, Fielder said:

Roomy is correct.

Here's how I mapped increase simrate and decrease simrate to two buttons. It would be the same type of scheme for heading bug. (I picked up a cheap $69 USB 12 button box at Etsy. It is tiny. You can velcro it anywhere convenient).

https://www.etsy.com/listing/1450757013/sim-racing-button-box-usb-pc-12-function

The controls screen in MSFS allows you to assign more than one command to any button. So I assigned SIMRATE to a button. And also the same command  SIMRATE to another button. (This command by default is R on the keyboard). To the first button I also assigned DECREASE SIM RATE. To the second INCREASE SIM RATE. Now each of these buttons executes two commands: R+Decrease or R+ Increase.

So now those buttons will always do only one thing: decrease or increase simrate. They will never surprise you and do anything else, like zoom the view, etc.

 

Thanks both of you ... lots of help to me.

36 minutes ago, PDX Flyer said:

 

Thanks both of you ... lots of help to me.

Not sure I've read an answer to your original question..

Do you maybe have to go the FSUIPC route for this?

In FSX/P3D you would have to execute: (A:PLANE HEADING DEGREES MAGNETIC, degrees) (>K:HEADING_BUG_SET)

Edited by Bert Pieke

Bert

5 hours ago, Bert Pieke said:

Do you maybe have to go the FSUIPC route for this?

In FSX/P3D you would have to execute: (A:PLANE HEADING DEGREES MAGNETIC, degrees) (>K:HEADING_BUG_SET)

And that same code also works in MSFS.

Using FSUIPC7 you could create a tiny Lua script, say called SyncHeadingBug.lua,  to execute the code. The script would simply consist of one line like this:

ipc.execCalcCode("(A:PLANE HEADING DEGREES MAGNETIC, degrees) (>K:HEADING_BUG_SET) ")

You would then assign the Lua script to a key or button that you want to execute the script.

I'm sure you could also do something similar with other apps like Spad.Next as well.

Al

Edited by ark

2 hours ago, ark said:

You would then assign the Lua script to a key or button that you want to execute the script.

Just tried assigning this function to the H key (after unassigning it in MSFS Controls)... works like a charm!

From the FSUIPC7 ini file:

[Keys]
1=72,8,L1:R,0     -{H: Press=Lua SyncHeadingBug }-

[LuaFiles]
1=SyncHeadingBug

 

Edited by Bert Pieke

Bert

9 hours ago, Bert Pieke said:

Just tried assigning this function to the H key (after unassigning it in MSFS Controls)... works like a charm!

From the FSUIPC7 ini file:

[Keys]
1=72,8,L1:R,0     -{H: Press=Lua SyncHeadingBug }-

[LuaFiles]
1=SyncHeadingBug

 

 Planes that have the heading bug sync option also frequently have a course sync function.The course sync function (as I call it) centers the HSI CDI by pointing the course arrow directly at a tuned in VOR station (pushing the course adjust button is typically what does this) which then tells the pilot the course to fly to go directly to the station, and also shows what radial the plane is on.

So since we are talking about Lua scripts, here is a small SyncCourse.lua script for anyone interested.


 Nav_switch = ipc.readUD(0x132C)        -- check NAV/GPS switch to see if in Nav VLOC mode or GPS mode, 0 = Nav, 1 = GPS
 if Nav_switch == 0 then                        -- if in VLOC mode will center HSI CDI or set VOR1 OBS, else do nothing
      Nav_signal_type = ipc.readUB(0x0C4D)                   -- get byte indicating type of Nav1 signal
      sig_present = logic.And (Nav_signal_type, 08)          -- isolate bit3 to check if Nav signal is present (bit3 = 0)
      vor_signal = logic.And (Nav_signal_type, 128)          -- isolate bit7 to check if have VOR signal (bit7 = 0) and not a localizer
      if sig_present == 0 and vor_signal == 0 then           -- if have valid VOR signal then process, else do nothing
         Nav1_radial = ipc.readUW (0x0C50)*360/65536        -- get what NAV1 radial a/c is on
         Nav1_bearing = Nav1_radial + 180                    -- convert radial (From) to bearing (To)
         Nav1_bearing = math.floor(Nav1_bearing + 0.5)       -- round to NO decimal places
           if Nav1_bearing > 360 then                          -- if necessary normalize the bearing value to between 0 and 360 deg
              Nav1_bearing = Nav1_bearing -360
           end   
        ipc.control(65716, Nav1_bearing)           -- NAV1 bearing to VOR1_SET (set HSI course arrow or VOR1 OBS to point to VOR)
     end
    end

Edited by ark

Given their frequent usage, I have Heading Bug and Vertical Speed for the Autopilot assigned to my arrow keys.

UP ARROW: Increase Vertical Speed

DOWN ARROW: Decrease Vertical Speed

RIGHT ARROW: Increase Heading Bug

LEFT ARROW: Decrease Heading Bug

10 minutes ago, salasnet said:

Given their frequent usage, I have Heading Bug and Vertical Speed for the Autopilot assigned to my arrow keys.

UP ARROW: Increase Vertical Speed

DOWN ARROW: Decrease Vertical Speed

RIGHT ARROW: Increase Heading Bug

LEFT ARROW: Decrease Heading Bug

Nice, but does not address the question asked in the post.. 😉

Edited by Bert Pieke

Bert

  • 1 year later...

I'd like to increse/decrease HDG selctor assign to a specific key on my keyboarf, do I need FSUIPC 7 immage? can I control also the Fenix lights on overhead panel?

Edited by riccardo74

Riccardo

OS: Windows 10-64 bit, CPU: i7-7700K @4.20 GHz, GPU: Gigabyte GeForce GTX 1080 G1 8GB GDDR5, RAM: Corsair Vengeance DDR4 32GB 3000MHz, MB: MSI Z270

Just bought now and tested FSUIPC on Fenix, but it's work only with standard command.

For example I can't increase/decrease the spoiler, lights on overhead and heading bug.

Do I need a special lua script?

Riccardo

OS: Windows 10-64 bit, CPU: i7-7700K @4.20 GHz, GPU: Gigabyte GeForce GTX 1080 G1 8GB GDDR5, RAM: Corsair Vengeance DDR4 32GB 3000MHz, MB: MSI Z270

I had thought this was a bug from early on. Does heading sync now work? I know that on some aircraft, I am able to sync the bug by clicking on the virtual cockpit knob, but didn't know mapping this to a key or joystick button was possible?

Create an account or sign in to comment

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.