Jump to content

How can i detect if landing gear is down with .lua file? i also am trying to see if afterburner is on.???


Recommended Posts

Posted

hi, i have been trying to edit a custom export.lu file to detect if the landing gear is down on the f-16.

i have also been trying to figure out id afterburner is on/off. i'd am trying to use those values to send a little kick to my motion rig.

the issue are i can't seem to figure out how to get the .lua file to know if the afterburn is on or the landing gear is down.

any help please!!!

Posted

ok i figured out how to find if the Landing gear is down or not.  BUT i cannot find how to know if the Afterburnner is on...please help

                local mech_info = LoGetMechInfo()
                local gear = mech_info.gear.value
                local gearNoseComp = mech_info.gear.nose.rod
                local gearRightComp = mech_info.gear.main.right.rod
                local gearLeftComp = mech_info.gear.main.left.rod

if the landing gear is down the value is  returns 1,

if the landing is on the ground and has compression, then the values (mech_info.gear.nose.rod) etc are around .8 , zero if no compression

 

 

 

 

Posted
On 6/23/2024 at 4:18 AM, rocket302 said:

BUT i cannot find how to know if the Afterburnner is on...please help

You can't just get RPM and base AB info on that...

because it's not linear and simple...

Best to use throttle position I guess.

🖥️ Win10  i7-10700KF  32GB  RTX4070S   🥽 Quest 3   🕹️ T16000M  VPC CDT-VMAX  TFRP   ✈️ FC3  F-14A/B  F-15E   ⚙️ CA   🚢 SC   🌐 NTTR  PG  Syria

Posted

When the sim lacks direct telemetry for something (like afterburner actuation), this is when you have to dive into the world of looking at the model draw arguments (the objects that control the external visual rendering of the aircraft).

*Most* aircraft use a common set of arguments for the afterburner...  Though I can't say with certainty whether it is always 28=Right and 29=Left

local AB_Right = LoGetAircraftDrawArgumentValue(28)

local AB_Left = LoGetAircraftDrawArgumentValue(29)

Value(s) will be 0.0 with no afterburner and 1.0 with full afterburner.  As soon as either value comes off of 0.0, the afterburner is lit for that engine.  You can open an aircraft in the model viewer and play with the slider for those arguments.  You will see the afterburner visual model react as you would in the sim when in external view.

null

For single engine aircraft, you'll have to determine which value is actually used.  The F-16 is '29', the Mirage-F1 is '28'.

There's actually quite a bit if data you can source from the draw arguments (and the main panel arguments)..  these are the hoops we must jump through to get at the data.

image.png

  • 2 weeks later...
Posted
On 6/24/2024 at 9:56 AM, Number481 said:

When the sim lacks direct telemetry for something (like afterburner actuation), this is when you have to dive into the world of looking at the model draw arguments (the objects that control the external visual rendering of the aircraft).

*Most* aircraft use a common set of arguments for the afterburner...  Though I can't say with certainty whether it is always 28=Right and 29=Left

local AB_Right = LoGetAircraftDrawArgumentValue(28)

local AB_Left = LoGetAircraftDrawArgumentValue(29)

Value(s) will be 0.0 with no afterburner and 1.0 with full afterburner.  As soon as either value comes off of 0.0, the afterburner is lit for that engine.  You can open an aircraft in the model viewer and play with the slider for those arguments.  You will see the afterburner visual model react as you would in the sim when in external view.

null

For single engine aircraft, you'll have to determine which value is actually used.  The F-16 is '29', the Mirage-F1 is '28'.

There's actually quite a bit if data you can source from the draw arguments (and the main panel arguments)..  these are the hoops we must jump through to get at the data.

image.png

Wow, that's very helpful! Thank you for the post!
 

I've been looking for some information also. For example, I can't find out how to find the fuel consumption for the F-4 and F-14 engines.

The command "LoGetEngineInfo()" with ".FuelConsumption.left" (or right) works on many modules, but not on those two. Do you have any suggestions?

And can you use the model viewer or similar method to find out which commands/arguments are for in cockpits? Such as if indicator lights are on/off?

Thank you! 😄

  • 2 months later...
Posted
21 minutes ago, rocket302 said:

Thanks for the reply. I think I’ll try the model viewer . However we’re do I find that at? Is it’s a 3rd party app? 

In DCS installation /bin folder.

🖥️ Win10  i7-10700KF  32GB  RTX4070S   🥽 Quest 3   🕹️ T16000M  VPC CDT-VMAX  TFRP   ✈️ FC3  F-14A/B  F-15E   ⚙️ CA   🚢 SC   🌐 NTTR  PG  Syria

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...