HUD, HGS and HCP Project

Are you building a cockpit, planning to build one or just dreaming, this is your cockpit builder meeting point

Moderators: russ, Ralph

Message
Author
User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

HUD, HGS and HCP Project

#1 Post by Keith Baxter »

Hi,

Most know that I am on the march to dev a "HUD system" set of instruments for Zibo Cockpit builders.

The prototype of the HGS panel is in progress. Just waiting for the LED switches and the 2.8" display

If Corjan cannot get the transparent BG working on video streaming I will have to make a plan. what plan? I don;t know yet
IMG_5846.jpg
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

Re: HUD, HGS and HCP Project

#2 Post by Keith Baxter »

Hi,

So far the code for the HUD.

Code: Select all


--***********************************************************************--
--Set environment
xpl_dataref_write("sim/private/controls/panel/always_render","FLOAT",1)
xpl_dataref_write("sim/private/controls/perf/cockpit_kill_dist","FLOAT",30000)
xpl_dataref_write("laminar/B738/hud_disable","DOUBLE",0)

--Texture position to stream
xpl_dataref_subscribe("sim/graphics/view/view_type","INT",
                      "laminar/B738/hud_disable","DOUBLE",function(val,vis)
   if     val == 1024 and vis == 0.0 then
             hud_stream = video_stream_add("xpl/gauges[1]",0, 0, 1010,760, 500,10, 680,520)
   elseif val ~= 1024 and vis == 0.0 then
             hud_stream = video_stream_add("xpl/gauges[1]",0, 0, 1010,760, 0,10, 680,520)
   end
end)

The code for the HGS

Code: Select all


--***********************************************************************--
--Set environment
xpl_dataref_write("sim/private/controls/panel/always_render","FLOAT",1)
xpl_dataref_write("sim/private/controls/perf/cockpit_kill_dist","FLOAT",30000)
xpl_dataref_write("laminar/B738/hud_disable","DOUBLE",0)

--LED declare
rwy_led  = hw_led_add("Runway", 0)
gs_led   = hw_led_add("Glide Slope", 0)
clr_led  = hw_led_add("Clear", 0)
test_led = hw_led_add("Teas", 0)

--Make the HGS visible
xpl_dataref_subscribe("sim/graphics/view/view_type","INT",
                      "laminar/B738/hud_disable","DOUBLE",function(val,vis)
   if     val == 1024 and vis == 0.0 then
             hgs_stream = video_stream_add("xpl/gauges[1]",0, 0, 200, 164,1170, 0, 230,220)
   elseif val ~= 1024 and vis == 0.0 then
             hgs_stream = video_stream_add("xpl/gauges[1]",0, 0, 200, 164,670, 0, 230,220)
   end
end)

--Buttons
mode_button = hw_button_add("MODE Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/MODE")
end)
stby_button = hw_button_add("STBY Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/STBY")
end)
rwy_button = hw_button_add("RWY Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/RWY")
end)
gs_button = hw_button_add("GS Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/GS")
end)
clr_button = hw_button_add("CLR Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/CLR")
end)
brt_button = hw_button_add("BRT Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/BRT")
end)
dim_button = hw_button_add("DIM Button",function()
   xpl_command("ToGate/B738/HUD_HGS/Command/DIM")
end)

--Matrix for the NUM Pad
num_pad =hw_button_array_add("NUM keypad", 4, 3
,function(row,column)
--Row 0
    if     row == 0 and column == 0 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_1")
    elseif row == 0 and column == 1 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_2")
    elseif row == 0 and column == 2 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_3")
    end
--Row 1
    if     row == 1 and column == 0 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_4")
    elseif row == 1 and column == 1 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_5")
    elseif row == 1 and column == 2 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_6")
    end
--Row 2
    if     row == 2 and column == 0 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_7")
    elseif row == 2 and column == 1 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_8")
    elseif row == 2 and column == 2 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_9")
    end
 --Row3
    if     row == 3 and column == 0 then
        xpl_command("ToGate/B738/HUD_HGS/Command/ENTER")
    elseif row == 3 and column == 1 then
        xpl_command("ToGate/B738/HUD_HGS/Command/NUMPAD_0")
    elseif row == 3 and column == 2 then
        xpl_command("ToGate/B738/HUD_HGS/Command/TEST")
    end
end)

--Subscribe to datarefs for led state
xpl_dataref_subscribe("ToGate/B738/HUD_HGS/ANIM/Light_RWY","DOUBLE",
                      "ToGate/B738/HUD_HGS/ANIM/Light_GS","DOUBLE",
                      "ToGate/B738/HUD_HGS/ANIM/Light_CLR","DOUBLE",
                      "ToGate/B738/HUD_HGS/ANIM/Light_TEST","DOUBLE", function(rwy,gs,clr,test)
hw_led_set(rwy_led , rwy)
hw_led_set(gs_led  , gs)
hw_led_set(clr_led , clr)
hw_led_set(test_led, test)
end)
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

SimPassion
Posts: 5676
Joined: Thu Jul 27, 2017 12:22 am

Re: HUD, HGS and HCP Project

#3 Post by SimPassion »

Hi Keith, just watch if it make any difference when starting X-Plane with the EFB HUD parameter OFF for Pilot vs starting X-Plane with EFB HUD parameter ON ... in any case 😉

User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

Re: HUD, HGS and HCP Project

#4 Post by Keith Baxter »

SimPassion wrote: Wed Jan 10, 2024 1:45 pm Hi Keith, just watch if it make any difference when starting X-Plane with the EFB HUD parameter OFF for Pilot vs starting X-Plane with EFB HUD parameter ON ... in any case 😉
Gilles,

This dataref makes the HUD visible or not.
xpl_dataref_write("laminar/B738/hud_disable","DOUBLE",0)
The only time there might be an issue is if the sim is started after the instrument because the setting of dataref is already done and the sim will start with the dataref at "1"

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

SimPassion
Posts: 5676
Joined: Thu Jul 27, 2017 12:22 am

Re: HUD, HGS and HCP Project

#5 Post by SimPassion »

Keith Baxter wrote: Wed Jan 10, 2024 4:34 pm
SimPassion wrote: Wed Jan 10, 2024 1:45 pm Hi Keith, just watch if it make any difference when starting X-Plane with the EFB HUD parameter OFF for Pilot vs starting X-Plane with EFB HUD parameter ON ... in any case 😉
Gilles,

This dataref makes the HUD visible or not.
xpl_dataref_write("laminar/B738/hud_disable","DOUBLE",0)
The only time there might be an issue is if the sim is started after the instrument because the setting of dataref is already done and the sim will start with the dataref at "1"

Keith
So I guess not even tried ... 😮😂

User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

Re: HUD, HGS and HCP Project

#6 Post by Keith Baxter »

Gilles,

The point is-- There is a HGS and HDU installed so it should always be visible. Well the HGS at least.

I would have to look at the pilots guide to see if the HUD can be switched off without removing it from the cockpit.
I will ask.


Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

Re: HUD, HGS and HCP Project

#7 Post by Keith Baxter »

Hi,

For the combiner I am going to use something like this---
https://www.ubuy.za.com/product/37JCBTQ ... tion_popup
with a small video projector.

Should work @jph what you think?

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

Re: HUD, HGS and HCP Project

#8 Post by Keith Baxter »

AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
jph
Posts: 2866
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: HUD, HGS and HCP Project

#9 Post by jph »

Keith Baxter wrote: Wed Jan 10, 2024 8:54 pm Hi,

For the combiner I am going to use something like this---
https://www.ubuy.za.com/product/37JCBTQ ... tion_popup
with a small video projector.

Should work @jph what you think?

Keith
Hi Keith, I am not exactly sure what you are using the sheet for, What is a 'combiner' ? can you clarify the usage ?. thanks
Joe
Joe. CISSP, MSc.

User avatar
jph
Posts: 2866
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: HUD, HGS and HCP Project

#10 Post by jph »

Just saw the video you linked to - or part of it. I presume you want a head up display ? would this not be better done as an instrument - I realise you are seeing some difficulty with the background I believe but I am sure @Corjan can sort that ?
Reflecting off a a monitor via a projector would be extremely problematic even with a coating or sheet. Even then you would need oled to have proper 'black' - ie: - no light in the unlit areas as any other system would still project light. I think the instrument (AM) route is definitely the best.
Joe
Joe. CISSP, MSc.

Post Reply