Skip to content

Commit 2ec2334

Browse files
authored
Merge pull request #103 from luizrenault/devel
Working FLIR
2 parents 3ca299e + 3f3746a commit 2ec2334

File tree

175 files changed

+7460
-701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+7460
-701
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
Dev
2-
Textures/A-29B
2+
Textures/A-29B
3+
DTC
4+
*.exp
5+
*.pdb
6+
*.lib

A-29B.lua

Lines changed: 99 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
--mounting 3d model paths and texture paths
22

33
mount_vfs_model_path (current_mod_path.."/Shapes")
4+
mount_vfs_texture_path (current_mod_path.."/Cockpit/Textures/")
5+
mount_vfs_model_path (current_mod_path.."/Cockpit/Shape")
46
mount_vfs_liveries_path (current_mod_path.."/Liveries")
57
mount_vfs_texture_path (current_mod_path.."/Textures/A-29B.zip")
68
mount_vfs_texture_path (current_mod_path.."/Textures/")
@@ -159,7 +161,9 @@ A_29B = {
159161
IR_emission_coeff_ab = 0.1, -- With afterburner
160162
wing_tip_pos = {-0.39, -0.412, 5.591}, -- wingtip coords for visual effects
161163
brakeshute_name = 0, -- Landing - brake chute visual shape after separation
162-
164+
flaps_transmission = "Electrical",
165+
undercarriage_transmission = "Hydraulic",
166+
163167
-- The following is used for graphical AB effects
164168
engines_count = 1, -- Engines count
165169
engines_nozzles =
@@ -512,7 +516,18 @@ A_29B = {
512516
{ CLSID = "<CLEAN>", arg_value = 1 }, -- CLEAN --
513517
}
514518
),
515-
pylon(6, 0, 1.664, -0.933, 0.715,
519+
pylon(6, 0, 1.0, -1.13, 0.0,
520+
{
521+
connector = 'flir',
522+
use_full_connector_position = false,
523+
DisplayName = "FLIR",
524+
},
525+
{
526+
{ CLSID = "{FLIR-STAR-SAFIRE}" },
527+
{ CLSID = "<CLEAN>", arg_value = 1 }, -- CLEAN --
528+
}
529+
),
530+
pylon(7, 0, 1.664, -0.933, 0.715,
516531
{
517532
use_full_connector_position = true,
518533
connector = "SmokeWhite",
@@ -543,6 +558,21 @@ A_29B = {
543558
},
544559
DefaultTask = aircraft_task(CAS),
545560

561+
-- AirframeProperties =
562+
-- {
563+
-- foreplane =
564+
-- {
565+
-- area = 6.70; -- in square meters
566+
-- span = 5.45; -- in meters
567+
-- mean_chord = 2.3; -- mean aerodynamic chord length
568+
-- mean_chord_position = 1.0; -- mean aerodynamic chord position
569+
-- mean_chord_position_y = 1.0; -- mean aerodynamic chord position - vertical
570+
-- sweep_angle = 59; -- for leading edge
571+
-- sweep_angle_25 = 59; -- 25 % of the way back from the leading edge
572+
-- tip_pos = {1.35, -0.02, -2.42}; -- for vortex attachment
573+
-- },
574+
-- },
575+
546576

547577

548578
SFM_Data = {
@@ -561,6 +591,12 @@ A_29B = {
561591
cy_flap = 0.18, -- Additional coefficient of lift for flap extended
562592
cx_brk = 0.065, -- Additional coefficient of drag for air brakes
563593

594+
595+
-- mz_table_data
596+
-- mz_ige_table_data
597+
-- mx_table_data
598+
599+
564600
-- Hi guys. I try to calculate the rollrate, or maxrollrate (omxmax) for a plane and I've got the measurements of the plane, Cl (rolling moment coefficient) and Clp.
565601
-- I've found a formula for Rollrate which looks like this:
566602
-- rollrate = -((2 * v) / b) * (Cle / Clp) * ((Eleft - Eright) / 2)
@@ -656,6 +692,7 @@ A_29B = {
656692
prop_pitch_max = 65.0, -- prop pitch max, degrees
657693
prop_pitch_feather = 80.0, -- prop pitch feather position, degrees if feather < prop_pitch_max no feathering available
658694
Nominal_RPM = 2000,
695+
Nominal_Fan_RPM = 2000,
659696
Startup_Prework = 1.0,
660697
Startup_RPMs = {
661698
{0.0, 0},
@@ -690,20 +727,6 @@ A_29B = {
690727
extended =
691728
{
692729

693-
thrust_max = -- thrust interpolation table by altitude and mach number, 2d table
694-
{ -- Minimum thrust 2000 kN, maximum thrust 16700 kN
695-
M = {0*666.739,100*666.739,120*666.739,140*666.739,160*666.739,200*666.739,220*666.739,280*666.739,320*666.739,400*666.739},
696-
H = {0,3048,6096,9144,10500,12192},
697-
thrust = {--KCAS 0 100 120 140 160 200 220 280 320 400
698-
{ 17000, 17000, 17000, 17000, 17000, 17000, 17000, 17000, 16925, 17000 },--H = 0 (sea level)
699-
{ 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000 },--H = 3048 (10kft)
700-
{ 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500 },--H = 6096 (20kft)
701-
{ 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000 },--H = 9144 (30kft)
702-
{ 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },--H = 10500 (34kft)
703-
{ 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },--H = 12192 (40kft)
704-
705-
},
706-
},
707730
TSFC_max = -- thrust specific fuel consumption by altitude and Mach number for RPM 100%, 2d table
708731
{ -- factor = kg/h /2000
709732
M = {0/666.739, 140/666.739, 160/666.739, 200/666.739, 220/666.739, 260/666.739, 300/666.739},
@@ -719,16 +742,63 @@ A_29B = {
719742
}
720743
},
721744

745+
-- TSFC_afterburner = -- thrust specific fuel consumption by altitude and Mach number for RPM 100%, 2d table
746+
-- { -- factor = kg/h /2000
747+
-- M = {0/666.739, 140/666.739, 160/666.739, 200/666.739, 220/666.739, 260/666.739, 300/666.739},
748+
-- H = {0, 1524, 3048, 4572, 6096, 7620, 9144},
749+
-- TSFC = {-- KT 0 140 160 200 220 260 300--0.1264
750+
-- { 150/1800, 195/1800, 205/1800, 243/1800, 271/1800, 347/1800, 380/1800},--H = 0 -- SL
751+
-- { 140/1800, 180/1800, 188/1800, 218/1800, 240/1800, 300/1800, 360/1800},--H = 1524 -- 5000'
752+
-- { 130/1800, 152/1800, 175/1800, 195/1800, 215/1800, 268/1800, 330/1800},--H = 3048 -- 10000'
753+
-- { 120/1800, 120/1800, 160/1800, 177/1800, 191/1800, 234/1800, 285/1800},--H = 4572 -- 15000'
754+
-- { 115/1800, 115/1800, 135/1800, 165/1800, 175/1800, 210/1800, 250/1800},--H = 6096 -- 20000'
755+
-- { 110/1800, 110/1800, 110/1800, 160/1800, 165/1800, 195/1800, 210/1800},--H = 7620 -- 25000'
756+
-- { 110/1800, 110/1800, 110/1800, 152/1800, 165/1800, 175/1800, 175/1800},--H = 9144 -- 30000'
757+
-- }
758+
-- },
759+
722760
TSFC_throttle_responce = -- correction to TSFC for different engine RPM, 1d table
723761
{
724762
RPM = {0, 70, 80, 90, 100},
725763
K = {1, 1, 1, 1, 1},
726764
},
765+
766+
thrust_max = -- thrust interpolation table by altitude and mach number, 2d table
767+
{ -- Minimum thrust 2000 kN, maximum thrust 16700 kN
768+
M = {0*666.739,100*666.739,120*666.739,140*666.739,160*666.739,200*666.739,220*666.739,280*666.739,320*666.739,400*666.739},
769+
H = {0,3048,6096,9144,10500,12192},
770+
thrust = {--KCAS 0 100 120 140 160 200 220 280 320 400
771+
{ 17000, 17000, 17000, 17000, 17000, 17000, 17000, 17000, 16925, 17000 },--H = 0 (sea level)
772+
{ 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000 },--H = 3048 (10kft)
773+
{ 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500 },--H = 6096 (20kft)
774+
{ 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000 },--H = 9144 (30kft)
775+
{ 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },--H = 10500 (34kft)
776+
{ 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },--H = 12192 (40kft)
777+
778+
},
779+
},
780+
781+
-- thrust_afterburner = -- thrust interpolation table by altitude and mach number, 2d table
782+
-- { -- Minimum thrust 2000 kN, maximum thrust 16700 kN
783+
-- M = {0*666.739,100*666.739,120*666.739,140*666.739,160*666.739,200*666.739,220*666.739,280*666.739,320*666.739,400*666.739},
784+
-- H = {0,3048,6096,9144,10500,12192},
785+
-- thrust = {--KCAS 0 100 120 140 160 200 220 280 320 400
786+
-- { 17000, 17000, 17000, 17000, 17000, 17000, 17000, 17000, 16925, 17000 },--H = 0 (sea level)
787+
-- { 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000, 16000 },--H = 3048 (10kft)
788+
-- { 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500, 11500 },--H = 6096 (20kft)
789+
-- { 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000 },--H = 9144 (30kft)
790+
-- { 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },--H = 10500 (34kft)
791+
-- { 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },--H = 12192 (40kft)
792+
793+
-- },
794+
-- },
795+
727796
--rpm_acceleration_time_factor = -- time factor for engine governor ie RPM += (desired_RPM - RPM ) * t(RPM) * dt
728797
--{
729798
-- RPM = {0, 50, 100},
730799
-- t = {0.3,0.3,0.3}
731800
--},
801+
732802
--rpm_deceleration_time_factor = -- time factor for engine governor
733803
--{
734804
-- RPM = {0, 50, 100},
@@ -739,60 +809,29 @@ A_29B = {
739809
throttle = {0, 0.1, 0.55, 1.0},
740810
RPM = {64.6, 84, 92, 100},
741811
},
812+
813+
742814
thrust_rpm_responce = -- thrust = K(RPM) * thrust_max(M,H)
743815
{
744816
RPM = {0, 64.6, 84, 100},
745817
K = {0, 0.00, 0.1, 1},
746818
},
819+
747820
}, -- end of extended data
748821

749822

750823
}, -- end of engine
751-
-- thrust_max = -- thrust interpolation table by altitude and mach number, 2d table. Modified for carrier takeoffs at/around 71 foot deck height
752-
-- {
753-
-- M = {0, 0.1, 0.225, 0.23, 0.3, 0.5, 0.7, 0.8, 0.9, 1.1},
754-
-- H = {0, 19, 20, 23, 24, 250, 4572, 7620, 10668, 13716, 16764, 19812},
755-
-- thrust = {-- M 0 0.1 0.225 0.23, 0.3 0.5 0.7 0.8 0.9 1.1
756-
-- { 41370, 39460, 38060, 38056, 37023, 36653, 36996, 37112, 36813, 34073 },--H = 0 (sea level)
757-
-- { 41370, 39460, 38060, 38056, 37023, 36653, 36996, 37112, 36813, 34073 },--H = 19 (~62.3 feet)
758-
-- { 41370, 39460, 38060, 38056, 37023, 36653, 36996, 37112, 36813, 34073 },--H = 20 (~66.6 feet)
759-
-- { 41370, 39460, 38060, 38056, 37023, 36653, 36996, 37112, 36813, 34073 },--H = 23 (~75.5 feet)
760-
-- { 41370, 39460, 38060, 38056, 37023, 36653, 36996, 37112, 36813, 34073 },--H = 24 (~78.7 feet)
761-
-- { 41370, 39460, 38060, 38056, 37023, 36653, 36996, 37112, 36813, 34073 },--H = 250 (820 feet)
762-
-- { 27254, 25799, 24765, 24761, 24203, 24599, 26227, 27254, 28353, 29785 },--H = 4572 (15kft)
763-
-- { 20818, 19203, 18130, 18127, 17548, 17473, 18638, 19608, 20684, 22873 },--H = 7620 (25kft)
764-
-- { 10876, 11076, 11128, 11130, 11556, 12193, 13024, 13674, 14434, 16098 },--H = 10668 (35kft)
765-
-- { 6025, 6379, 6676, 6680, 6837, 7433, 8194, 8603, 9101, 10075 },--H = 13716 (45kft)
766-
-- { 3336, 3554, 3837, 3840, 3990, 4484, 5000, 5307, 5596, 6232 },--H = 16764 (55kft)
767-
-- { 1904, 2042, 2296, 2300, 2433, 2798, 3212, 3483, 3639, 4097 },--H = 19812 (65kft)
768-
-- },
769-
-- },
770-
-- TSFC_afterburner = -- afterburning thrust specific fuel consumption by altitude and Mach number RPM 100%, 2d table
771-
-- {
772-
-- M = {0,0.3,0.5,0.7,1.0},
773-
-- H = {0,1000,3000,10000},
774-
-- TSFC = {-- M 0 0.3 0.5 0.7 1.0
775-
-- { 1, 1, 1, 1, 1},--H = 0
776-
-- { 1, 1, 1, 1, 1},--H = 1000
777-
-- { 1, 1, 1, 1, 1},--H = 3000
778-
-- { 1, 1, 1, 1, 1},--H = 10000
779-
-- }
824+
825+
-- engine_data = {
826+
-- power_take_off = 1000.0 * algumacoisa,
827+
-- power_max = 1000.0 * algumacoisa,
828+
-- power_WEP = algumacoisa,
829+
-- power_TH_k = algumacoisa,
830+
-- SFC_k = 0,
831+
-- power_RPM_k = 0,
832+
-- power_RPM_min = 0,
833+
-- Nmg_Ready = 0,
780834
-- },
781-
-- extended =
782-
-- {
783-
-- Cx0 = -- Interpolierung von Cx0 bei Geschwindikeit M und Höhe H
784-
-- {-- minimum Cx0 ist xxx maximum Cx0 ist yyy
785-
-- M = {0, 0.2, 0.4, 0.6, 0.7, 0.8, 0.9, 1, 1.05, 1.1, 1.2, 1.3, 1.5, 1.7, 1.8, 2, 2.1, 2.2, 3.9},--Machnumber as above
786-
-- H = {0, 4572, 10668, 13716, 16764}, --Höhe = SeaLevel, 15kft, 35kft, 45kft, 55kft
787-
-- Cdmin = {--M 0 0.2 0.4 0.6 0.7 0.8 0.9 1 1.05 1.1 1.2 1.3 1.5 1.7 1.8 2 2.1 2.2 3.9
788-
-- { 0.015, 0.5, 0.04, 0.019, 0.018, 0.015, 0.018, 0.045, 0.048, 0.05, 0.048, 0.047, 0.046, 0.046, 0.046, 0.046, 0.046, 0.046, 0.046,}, --SeaLevel 0
789-
-- { 0.015, 0.015, 0.1, 0.027, 0.02, 0.019, 0.02, 0.045, 0.048, 0.05, 0.048, 0.047, 0.046, 0.046, 0.046, 0.046, 0.046, 0.046, 0.046,},-- 15kft
790-
-- { 0.015, 0.015, 0.015, 0.12, 0.08, 0.04, 0.035, 0.05, 0.055, 0.06, 0.065, 0.06, 0.05, 0.04, 0.035, 0.025, 0.02, 0.015, 0.015,},-- 35kft
791-
-- { 0.015, 0.015, 0.015, 0.015, 0.12, 0.1, 0.07, 0.075, 0.077, 0.08, 0.075, 0.07, 0.055, 0.05, 0.049, 0.0475, 0.045, 0.035, 0.031,},-- 45kft
792-
-- { 0.015, 0.015, 0.015, 0.015, 0.05, 0.09, 0.11, 0.14, 0.13, 0.12, 0.1, 0.09, 0.07, 0.06, 0.055, 0.05, 0.0475, 0.042, 0.035,},-- 55kft
793-
-- },
794-
-- },
795-
-- }, -- end of Cx0
796835

797836
},
798837

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
CMFD_HSD_FORMAT_IDS = {
2+
HSD = 0,
3+
DL = 1,
4+
DCTL = 2,
5+
ROUTE = 3
6+
}
7+
8+
CMFD_HSD_DL_IDS = {
9+
ALL = 0,
10+
FORM = 1,
11+
TGT = 2,
12+
NONE = 3
13+
}
14+
15+
CMFD_HSD_FLTAREA_TYPES = {
16+
A = 0,
17+
B = 1,
18+
C = 2,
19+
D = 3,
20+
E = 4,
21+
F = 5,
22+
G = 6,
23+
H = 7
24+
}
25+
26+
CMFD_HSD_FLTAREA_COLORS = {
27+
YELLOW = 0,
28+
GREEN = 1,
29+
PURPLE = 2
30+
}
31+
32+
CMFD_HSD_DL_IDS.ALL = "DL\nALL"
33+
CMFD_HSD_DL_IDS.FORM = "DL\nFORM"
34+
CMFD_HSD_DL_IDS.TGT = "DL\nTGT"
35+
CMFD_HSD_DL_IDS.NONE = "DL\nNONE"

Cockpit/Scripts/CMFD/CMFD_init_COMMON.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ mat_tbl = {
123123
"cmfd_font_d",
124124
"cmfd_font_r",
125125
"ufcp_font_def",
126+
127+
"render_target_1",
126128
}
127129

128130
-- MFCD Colors

Cockpit/Scripts/CMFD/Indicator/CMFD_BIT.lua

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
dofile(LockOn_Options.script_path .. "CMFD/CMFD_defs.lua")
22
dofile(LockOn_Options.script_path .. "CMFD/CMFD_pageID_defs.lua")
3+
dofile(LockOn_Options.script_path .. "Indicator/Indicator_defs.lua")
4+
5+
dofile(LockOn_Options.script_path.."utils.lua")
36

47
local CMFDNumber=get_param_handle("CMFDNumber")
58
local CMFDNu = CMFDNumber:get()
69

10+
local aspect = GetAspect()
11+
12+
-- Content
13+
14+
DEFAULT_LEVEL = 9
15+
default_material = CMFD_FONT_DEF
16+
stroke_font = "cmfd_font_def"
17+
stroke_material = "HUD"
18+
stroke_thickness = 1 --0.25
19+
stroke_fuzziness = 0.6
20+
additive_alpha = true
21+
default_element_params={"CMFD"..tostring(CMFDNu).."_BRIGHT"}
22+
default_controllers={{"opacity_using_parameter", 0}}
23+
724
local page_root = create_page_root()
825
page_root.element_params = {"CMFD"..CMFDNu.."Format"}
926
page_root.controllers = {{"parameter_compare_with_number",0,SUB_PAGE_ID.BIT}}
1027

28+
local object
29+
30+
local CMFD_BIT_origin = addPlaceholder(nil, {0,0}, page_root.name)
31+
32+
-- DTE format text
33+
object = addStrokeText(nil, "", CMFD_STRINGDEFS_DEF_X08, "CenterCenter", {0, 0.5}, CMFD_BIT_origin.name, nil, {"%s"})
34+
object.element_params = {"CMFD"..tostring(CMFDNu).."_BRIGHT", "CMFD_BIT_TEXT"}
35+
object.controllers = {{"opacity_using_parameter", 0},{"text_using_parameter", 1, 0}}
36+
1137
-- OSS Menus
1238
local HW = 0.15
1339
local HH = 0.04 * H2W_SCALE

0 commit comments

Comments
 (0)