Skip to content

Commit

Permalink
config: add Felis 747-200 sample config
Browse files Browse the repository at this point in the history
Signed-off-by: Norbert Takacs <norbert.takacs@commsignia.net>
  • Loading branch information
Norbert Takacs committed May 30, 2023
1 parent 640c001 commit 702b410
Show file tree
Hide file tree
Showing 18 changed files with 383 additions and 13 deletions.
94 changes: 94 additions & 0 deletions config/747-200/B742-script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,97 @@ function altitude_select_mode_toggle()
set_dataref("B742/AP_panel/altitude_mode_sw",-1)
end
end

function get_vs_selected()
vs = get_dataref("B742/AP_panel/VS_rotary")
return 1000*vs
end

function landing_light_green()
ld_lamp_lg_down = get_dataref("B742/front_lamps/LG_gear_down_lit")
battery_sw = get_dataref("B742/ELEC/battery_sw")

if (ld_lamp_lg_down > 0.8 and battery_sw == 1) then
return 1
else
return 0
end
end

function landing_light_red()
ld_lamp_lg_down = get_dataref("B742/front_lamps/LG_gear_down_lit")
battery_sw = get_dataref("B742/ELEC/battery_sw")

if (ld_lamp_lg_down < 0.8 and battery_sw == 1) then
return 1
else
return 0
end
end

function hsi_course_rotation()
course_set = get_dataref("B742/AP_panel/course_1_set")
heading = get_dataref("sim/cockpit2/gauges/indicators/compass_heading_deg_mag")
return course_set - heading
end


scale_half_width = 44
max_dev_dot = 4

function hsi_course_dev_translation_x()
dots = get_dataref("sim/cockpit2/radios/indicators/hsi_hdef_dots_pilot")

if (dots > max_dev_dot) then
dots = max_dev_dot
elseif (dots < -1*max_dev_dot) then
dots = -1*max_dev_dot
end

return 200 + math.cos((-1*hsi_course_rotation()*3.14)/180) * (scale_half_width * (dots/max_dev_dot))
end

function hsi_course_dev_translation_y()
dots = get_dataref("sim/cockpit2/radios/indicators/hsi_hdef_dots_pilot")

if (dots > max_dev_dot) then
dots = max_dev_dot
elseif (dots < -1*max_dev_dot) then
dots = -1*max_dev_dot
end

return 120 + math.sin((-1*hsi_course_rotation()*3.14)/180) * (scale_half_width * (dots/max_dev_dot))
end

function get_current_baro_hpa()
baro_hgin = get_dataref("sim/cockpit/misc/barometer_setting")
return math.floor(33.86389*baro_hgin+0.5)
end

baro_set_to_std = false
function S1_button_set_altimeter()
if (baro_set_to_std) then
local_qnh = get_dataref("sim/weather/barometer_sealevel_inhg")
set_dataref("sim/cockpit/misc/barometer_setting",local_qnh)
baro_set_to_std = false
else
command_once("sim/instruments/barometer_2992")
baro_set_to_std = true
end
end

function S1_button_lit()
if (baro_set_to_std) then
return 1
else
return 0
end
end

function get_mach_speed()
return math.floor(get_dataref("sim/cockpit2/gauges/indicators/mach_pilot")*1000)
end

function get_gs_needle_pos()
return 120 + get_dataref("B742/HSI/GS_ratio",0)*36
end
Binary file added config/747-200/fip-images/Adf_Kompass_Ring.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/Adf_needle.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/GS_Needle.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/GS_Scale.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_card_hdg.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_gs_l.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_mask_front.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_needle.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_pointer_crs_tf.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_sel_crs.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/HSIb_sel_hdg.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/Heading_HeadingBug.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/next_wypt_mask.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/pfd_altitude.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/pfd_dme_mask.bmp
Binary file not shown.
Binary file added config/747-200/fip-images/pfd_speed_scale.bmp
Binary file not shown.
Loading

0 comments on commit 702b410

Please sign in to comment.