Jump to content
Sign in to follow this  
PDX Flyer

Set Heading Bug (via keyboard mapping)

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Ryzen5 5800X3D, RTX4070, 600 Watt, TWO Dell S3222DGM 32" screens spanned with Nvidia surround 5185 x 1440p, 32 GB RAM, 4 TB  PCle 3 NVMe, Warthog throttle, CH Flightstick, Honeycomb Alpha yoke, CH quad, 3 Logitech panels, 2 StreamDecks, Desktop Aviator Trim Panel.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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
  • Like 1

Bert

Share this post


Link to post
Share on other sites
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
  • Like 2

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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
  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...