2D HUD
Feb 18, 2015 21:38:27 GMT
Post by MarkH on Feb 18, 2015 21:38:27 GMT
Following my 'live' HUD experiments, I discovered a whole sub-genre of 2D HUD panels. At least one of these, by Dietmar Loleit, seems worthy of publicity. The panel is called 'HUDCA' (the 'CA' stands for 'Commercial Aircraft') and it's available from all the usual outlets. I got it from AVSIM. This is a fantastic addition to any aircraft and I have been experimenting with putting it in the Aerosoft Twin Otter Extended. It is not quite 'plug-and-play' so you will need to do a little work to set it up for your aircraft, but it does come with a 30-page manual to help you with that process.
Once I had installed it, of course I was interested to see if it could be controlled by hardware. You can and the end result is I added a bunch of functions to the Almost Aviation library to control this gauge. (It's a good candidate for assignment to some of the controls on the Autopilot+ panel, especially if you don't have a TrackIR.)
Anyway, if you're interested in trying it out, here are some notes on how to set it up. I will add some pics of how it looks as a comment to this message.
First, this setup works for me in the Twin Otter:
(1) Follow the HUDCA installation instructions to the letter.
(2) MOVE the 'gauge40' line from the Window00 definition to the end of the VCockpit01 definition. This gauge has to run to read your HUD config file from gauges/HUDCA$. You should also create a config file called something like 'TwinOtterConfig.ini' in that folder with the appropriate V speeds and so on. This is how the HUD knows to switch modes in AUTO mode.
(3) Optionally, comment out the 'HUDCA-Frame' line in the Window10 definition (or whichever window number it is for you).
To set the appropriate size and shape for your screen you need to calculate the 'window_size' and 'window_pos' values for the Window10 and Window11 definitions. Although the original size of the gauge is noted in the panel.cfg as 768 x 640, that doesn't seem right to me as the gauge is squashed (circles aren't circular). I have calculated my sizes assuming 768 x 480, which gives the correct proportions. You need to express these dimensions as a proportion of your screen width and height. For me, running at 4066 x 1024:
Width = 768 / 4066 = 0.189
Height = 480 / 1024 = 0.469
Then the position, also expressed as a proportion of screen dimensions:
x = ((4066 - 768) / 2) / 4066 = 0.406
y = 0.125
This centres the gauge horizontally and puts it 1/8 of the way down from the top of the screen. (Note that it doesn't quite centre as the frame makes it asymmetrical. Hence it really needs to be nudged over a bit in the x position.)
So in the Window10 and Window11 definitions:
window_size = 0.189, 0.469
window_pos = 0.406, 0.125
Okay, now you can control the HUD entirely from buttons and switches using LINDA functions. I have added functions to my Almost Aviation library, which you can download from here. Just put this library in your LINDA/libs folder and you will see the functions. If you want to copy the functions into another LINDA file note that you will need to take a few other things with them (notably the rotary SHIFT functions). You will find the following functions, which ought to be more or less self-explanatory:
I have made the HUD default to 'Bright' mode when you switch it on. I have found it best to leave it in bright mode all the time and then call the transparency functions. These functions are SHIFT aware, which means if you call one while the SHIFT flag is on it works faster (twice as fast). The best way is to map this to a rotary control with a centre-push switch.
BTW, you can see the effect of the transparency functions using the Twin Otter configuration page of the checklist (SHIFT+2), where you can change this with the mouse wheel. The downside is you can't (it appears) set the transparency individually for each panel so this (and the library functions) affects all panels, including the GPS.
Whee! Off to build a hardware panel for it now
Once I had installed it, of course I was interested to see if it could be controlled by hardware. You can and the end result is I added a bunch of functions to the Almost Aviation library to control this gauge. (It's a good candidate for assignment to some of the controls on the Autopilot+ panel, especially if you don't have a TrackIR.)
Anyway, if you're interested in trying it out, here are some notes on how to set it up. I will add some pics of how it looks as a comment to this message.
First, this setup works for me in the Twin Otter:
(1) Follow the HUDCA installation instructions to the letter.
(2) MOVE the 'gauge40' line from the Window00 definition to the end of the VCockpit01 definition. This gauge has to run to read your HUD config file from gauges/HUDCA$. You should also create a config file called something like 'TwinOtterConfig.ini' in that folder with the appropriate V speeds and so on. This is how the HUD knows to switch modes in AUTO mode.
(3) Optionally, comment out the 'HUDCA-Frame' line in the Window10 definition (or whichever window number it is for you).
To set the appropriate size and shape for your screen you need to calculate the 'window_size' and 'window_pos' values for the Window10 and Window11 definitions. Although the original size of the gauge is noted in the panel.cfg as 768 x 640, that doesn't seem right to me as the gauge is squashed (circles aren't circular). I have calculated my sizes assuming 768 x 480, which gives the correct proportions. You need to express these dimensions as a proportion of your screen width and height. For me, running at 4066 x 1024:
Width = 768 / 4066 = 0.189
Height = 480 / 1024 = 0.469
Then the position, also expressed as a proportion of screen dimensions:
x = ((4066 - 768) / 2) / 4066 = 0.406
y = 0.125
This centres the gauge horizontally and puts it 1/8 of the way down from the top of the screen. (Note that it doesn't quite centre as the frame makes it asymmetrical. Hence it really needs to be nudged over a bit in the x position.)
So in the Window10 and Window11 definitions:
window_size = 0.189, 0.469
window_pos = 0.406, 0.125
Okay, now you can control the HUD entirely from buttons and switches using LINDA functions. I have added functions to my Almost Aviation library, which you can download from here. Just put this library in your LINDA/libs folder and you will see the functions. If you want to copy the functions into another LINDA file note that you will need to take a few other things with them (notably the rotary SHIFT functions). You will find the following functions, which ought to be more or less self-explanatory:
AAL_HUD_ON()
AAL_HUD_OFF()
AAL_HUD_Bright()
AAL_HUD_Dim()
AAL_HUD_Glass_Lighter()
AAL_HUD_Glass_Darker()
AAL_HUD_Auto_Toggle()
AAL_HUD_More_Transparent()
AAL_HUD_Less_Transparent()
AAL_Rotary_Shift_ON()
AAL_Rotary_Shift_OFF()
I have made the HUD default to 'Bright' mode when you switch it on. I have found it best to leave it in bright mode all the time and then call the transparency functions. These functions are SHIFT aware, which means if you call one while the SHIFT flag is on it works faster (twice as fast). The best way is to map this to a rotary control with a centre-push switch.
BTW, you can see the effect of the transparency functions using the Twin Otter configuration page of the checklist (SHIFT+2), where you can change this with the mouse wheel. The downside is you can't (it appears) set the transparency individually for each panel so this (and the library functions) affects all panels, including the GPS.
Whee! Off to build a hardware panel for it now