ATR Discussion Forums Homepage
Forum Home Forum Home > ATR Discussion Forums > Flight1 ATR Technical Support
  New Posts New Posts RSS Feed - Idle Gate and Landing data
  FAQ FAQ  Forum Search   Register Register  Login Login

Idle Gate and Landing data

 Post Reply Post Reply Page  12>
Author
Message
abax2000 View Drop Down
Groupie
Groupie


Joined: July-18-2010
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote abax2000 Quote  Post ReplyReply Direct Link To This Post Topic: Idle Gate and Landing data
    Posted: November-10-2011 at 3:44am
Whoever wants the Idle Gate working, can take a look here
This is for FSX and requires a registered version of FSUIPC.

A second script in the same post, allows detailed logging and displaying of the landing and flare data. That would work with any aircraft you use. A real test for your flying skills!!

Enjoy.



Back to Top
abax2000 View Drop Down
Groupie
Groupie


Joined: July-18-2010
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote abax2000 Quote  Post ReplyReply Direct Link To This Post Posted: December-14-2012 at 5:18pm
Update:
The latest versions of these scripts, along with a new one for take-offs, are here
 
including a version of Idle Gate for twin-throttle setups, thanks to Chakko's persistence and help.
Full details and instructions can be found in the aforementioned thread.
 
Back to Top
johnny5 View Drop Down
Newbie
Newbie


Joined: August-18-2008
Location: France
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnny5 Quote  Post ReplyReply Direct Link To This Post Posted: September-28-2013 at 3:36am
Hello, found this and would like to set it up.
found the info lacking some very basic steps. Should I rename these files *.lua and put them in my modules folder?
any help appreciated.
johnny
Back to Top
abax2000 View Drop Down
Groupie
Groupie


Joined: July-18-2010
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote abax2000 Quote  Post ReplyReply Direct Link To This Post Posted: September-30-2013 at 3:52am
Originally posted by johnny5 johnny5 wrote:

Should I rename these files *.lua and put them in my modules folder?


Yes.
Rename it to ATR_Idle_Gate.lua
Then go in FSUIPC4.ini and add
[Auto.ATR]
1=Lua ATR_Idle_Gate
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: August-01-2014 at 4:25am
Hi all,

Having been dealing with this ATR idle gate for few weeks, I noticed something. I may be wrong but if someone can check.

The lua is doing fine job by blocking the PL at flight idle while idle gate is engaged, thanks to the author. And this is as in real life. Though, the associated performance seems not good because at flight idle, torque should be at zero, which is not the case in the sim. Keeping the correct landing speed at short final becomes arduous job.
In the other hand if we remove the lua, get the joystick throttle lever full aft while airborn (idle gate activated), we notice that PL in the sim goes full aft then goes up for about 1cm, just enough to allow the "low pitch" lights to go out.
If idle gate is manually overriden inflight (idle gate out) and if you pull the joystick throttle lever full back, the PL in the sim goes full back and stay there. "low pitch" lights are on.

Then I came to the conclusion that the original programming of F1 is good, regarding the matter. No need to add extra script. But then, to get things nearly perfect Tongue, the throttle texture can be modified by moving the flight idle green band bottom line to further down, just 1cm or so above the ground idle marking.

Naivoh
naivoh
Back to Top
johnny5 View Drop Down
Newbie
Newbie


Joined: August-18-2008
Location: France
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnny5 Quote  Post ReplyReply Direct Link To This Post Posted: August-30-2014 at 9:46am
Hello
had this working fine a while ago but then had to re-install and cannot for the life of me get it to work.
Activating for the first time sends the throttles to idle, but further use of the function sends the PLs to the top of the green area rather than to the FI position.
Aslo, when manually adjusting throttle with the lua script activated, the PLs jump the green area of the power quadrant rather than smoothly transition. Before is was smooth.
Could someone please share their FSUIPC ini file entry for this script.
many thanks
Johnny

PS Naivoh, I do not think you should have zero torque at FI, torque should be closer to zero at GI but not quite zero.
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: September-01-2014 at 8:54am
Johnny5<<< This info is from real ATR captains: torque is 0 at flight idle (I'm working in an airline).
From flight idle to ground idle, I think, is beta range.

Quote [Beta mode is a range of settings that are below the normal flight idle. It is commonly known as the ground operating range. (With the air operating range named Alpha)
Letís say that the minimum pitch of the prop in the flight idle position is 10 degrees. Beta range means that the prop can be pitched anywhere from 9 degrees to the stops]

cheers Wink
naivoh
Back to Top
johnny5 View Drop Down
Newbie
Newbie


Joined: August-18-2008
Location: France
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnny5 Quote  Post ReplyReply Direct Link To This Post Posted: September-01-2014 at 4:14pm
Even at flight idle, depending on the TAS, the propellers are producing thrust from the power they are absorbing from the core engine, this power being rpm x torque, the rpm being fixed, the torque is non zero.

could you be kind enough to post your fsuipc .ini entries relating to the idle gate lua script?

mant thanks in advance

johnny
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: September-08-2014 at 1:43am
Johnny5<<< Presently, I am not using this script no more and all my log were already cleared (idlegate.txt and fsuipc log). I'll try to get the lua back for you and as soon as my sim is back from repair, I'll throw you a feed back Big smile
... BTW, why would you need the fsuipc.ini?

Meanwhile, check this video on youtube
http://www.youtube.com/watch?v=i1rBVxXdcMo

This is an ATR72 on approach at LFKC. You can see the torque indication is zero.

Flight idle is usually initiated at an altitude equal to: target altitude + IASx10. Means if I descend at 240kt IAS and I want to be at 1200ft on the FAF, then I will set flight idle at 3600ft, which is: 1200 + 240x10.
Usually being at -1500ft/min during approach and -500ft/min on final, timing match approximatively the video: 1min40 (from 3600ft to 1200ft) + 2min20 (from 1200ft to 0ft) = flight idle 4min before landing.
naivoh
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (1) Thanks(1)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: September-12-2014 at 7:57am
Hi again all,

I made few flights in an atr cockpit today (real atr) and I can confirm with an absolute certainty that torque is zero at flight idle. it goes around 5 at ground idle, in low pitch range of course.


On approach 1000ft above terrain. PL at flight idle.


Taxiing at FMMI (4200ft). PL at ground idle.

Definitely, I think F1 programing is good and doesn t need an extra lua Clap
naivoh
Back to Top
johnny5 View Drop Down
Newbie
Newbie


Joined: August-18-2008
Location: France
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnny5 Quote  Post ReplyReply Direct Link To This Post Posted: September-20-2014 at 4:34am
that is great information there, many thanks for posting Naivoh. I am going to check out my numbers again. I think I will have to clear my fsuipc.ini and start over.
thanks very much for the photos, nice.
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: September-22-2014 at 7:54am
@Johnny5<<< ;)
One question though: why would you need to clear the fsuipc.ini? I think, you just need to remove the idlegate lua from the module folder. Thus, you leave the native Flight1 programming managing the stuff for you. That's what I did and it does work.
Then I changed one texture in the Virtual Cabin to remind me that flight idle IN THE SIM is indeed at a lower position that the actual one: lengthened the green band on PL course till about 1/2inch above ground idle LOL
naivoh
Back to Top
johnny5 View Drop Down
Newbie
Newbie


Joined: August-18-2008
Location: France
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnny5 Quote  Post ReplyReply Direct Link To This Post Posted: September-26-2014 at 12:06am
I don't have the spare time to do that to be honest and I just want PLs in the correct position in FI, but I think my .ini is polluted by attempts to get it back to how it was before I had to re-install.
Back to Top
ckovoor View Drop Down
Newbie
Newbie


Joined: February-05-2012
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ckovoor Quote  Post ReplyReply Direct Link To This Post Posted: June-01-2016 at 6:07am
Hello everyone, and especially Naivoh,

I know this is an old thread, but I recently revived my interest in this airplane, and am revisiting this issue.

Thank you, Naivoh, for your clarification regarding the Torque value at Flight Idle (FI), and your reasoning about the position of the FI mark on the simulated throttle quadrant. I believe you are correct in everything you have argued.

I believe that the (entirely understandable) error made by the author of this script was to assume that FI occurs at the marking at the start of the throttle range on the sim (as it is in the r/w aircraft), at which position he refers to a torque value of 14 % and FSUIPC offsets 0x3330 and 0x3332 attaining values of 3200.

[0x3330 = Throttle 1 Axis input value, post calibration, just before being applied to the simulation (if allowed to by the byte at offset 310A).
0x332 = similarly for Throttle 2.]


But as Naivoh points out, this cannot be the true FI position as the torque must be zero (in-flight) there. So to locate the true position, I activated the Idle Gate manually in flight, and pulled the joystick throttles right back, and I found that the sim throttles moved back to a position in between GI and FI (or about 1-cm forward of GI, as Naivoh said). Significantly, the torque is zero at this point, and FSUIPC offsets 0x3330 and 0x3332 attain values of 819 each. So 819 is the true throttle axis input value at FI.

So the original programming and operation of the Flight1 ATR72 does seem correct and complete, except in the location of the FI mark and one other detail: the Idle Gate is supposed to retract automatically on Take-Off and extend automatically on Landing. But in my F1-ATR simulation, while it does extend on landing, it does not retract on take-off. So I feel there is still a need to automate this aspect of it via a LUA script, presented below. The alternative would be to manually activate the Idle Gate on Take-Off with a mouse click.

One other detail: I use Saitek throttle quadrants and do not have a detent to mark the true FI position, nor have I (so far) edited the bitmaps on the simulated TQ to show it. As the separation between the physical locations of GI and FI on the Saitek quadrant is very small, it is difficult to locate FI precisely while flying, especially while busy doing other things. So I usually just move the joystick lever back into the GI detent for landing - as, with the Idle Gate active, the Throttle Axis inputs cannot go below FI while airborne. But FSX axes react only to changes, so on landing I would need to move the jostick lever again in order for the throttle to move to its true sub-FI location. My script below also updates the Throttle Axis value on touchdown, so it will move to its correct sub-FI location if I have moved the joystick lever below the FI position prior to touchdown.

ATR_Idle_Gate.lua
*******************************************************************
-- ATR Idle Gate (2-throttles)
-- modified by Chakko Kovoor (with thanks to abax2000 who wrote the original script)
-- sets idle gate consequent to on-ground flag
-- if either throttle position is below FI (thres value) on touchdown then update throttle value

thres1 = 819
thres2 = 819

function onground(offset,value)
    if ipc.readUW(0x0366) == 1 then
        ipc.writeLvar("L:ATRIdleGate", 0)
        checkgi( )
    else
        ipc.writeLvar("L:ATRIdleGate", 1)
    end
end


function checkgi( )
    if ipc.readUW(0x0366) == 1 then
        if ipc.readLvar("L:ATRPLLeft_notch") == 0 or ipc.readLvar("L:ATRPLRight_notch") == 0 then
            if ipc.readSW(0x3330) <= thres1 then
                ipc.writeSW(0x088C, ipc.readSW(0x3330))
            end
            if ipc.readSW(0x3332) <= thres2 then
                ipc.writeSW(0x0924, ipc.readSW(0x3332))
            end
        end
    end
end
   
event.offset(0x0366,"UW","onground")


******************************************************************
The script seems to work well on my system so far, but I would be grateful to anyone who tests it and gives me feedback.

Thanks,

Chakko.
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: June-02-2016 at 12:48am
Hi there,

I'm still in Smile.

Chakko, you are right about the idle gate.Thank you for writting the script to solve the issue Clap
Further to FI/GI/SAITEK TQ, so if you use the script, what would be your action on the SAITEK levers when landing: on short final, get the levers full back to have FI. Then, when touch down ...?

What I have done to have GI upon touchdown is assign the button of the throttle lever to "THROTTLE CUT" (the one beyond the potentiometer course, usually set to have reverser). In fact, I have never seen ATR pilots using reverser though in the worst conditions. One day, we were on visual approach, weighted 22t and passed RWY THR at about 150ft. The RWY is only 1300m long and after we touched, we had about only 800m of remaining asphalt (kind of things that make you, observer in the cockpit, piss in your pants. Believe me Sleepy). But the pilot did not use reverser.
And that's the reason why I delete reverser assignment in my SIM, and rather use the lever button for GI.

So when i SIM, throttle lever full back on course is FI (the end of the course would be the fictious idle gate Tongue). Then, upon touch, pull the lever another inch back to have GI (thus activating the virtual button beyond the lever course).
naivoh
Back to Top
ckovoor View Drop Down
Newbie
Newbie


Joined: February-05-2012
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ckovoor Quote  Post ReplyReply Direct Link To This Post Posted: June-03-2016 at 4:00am
Hi Naivoh,

Thanks for your response, and good to see you that you are around.Wink

You have used the Saitek reverser switch range very creatively to simulate the GI detent Clap. I suppose the only drawback is that movement of the hardware lever within the reverser slot cannot be mapped to a range of throttle axis input values between GI and FI. The CH throttle quadrant might work better here, because its reverse-range is a potentiometer and not a switch.

Originally posted by Naivoh Naivoh wrote:

Further to FI/GI/SAITEK TQ, so if you use the script, what would be your action on the SAITEK levers when landing: on short final, get the levers full back to have FI. Then, when touch down ...?


My script has a single action only: when it sees the aircraft "on ground" flag change from "airborne" to "on ground", it checks the physical location of the hardware lever, and if it is between the FI and GI positions at that instant, moves the sim throttle to the same location with matching throttle input ..... or, in other words, it synchronises the sim throttle with the Saitek throttle lever at that instant if the conditions are met. It is a single action only, so if the aircraft continues on the ground, and the hardware lever is moved again (which of course one is sure to do), then the script will not interfere any more, but the throttle lever and sim lever will move in sync anyway subject to any Gust Lock limitation.

If the aircraft bounces and gets airborne again, the script should re-activate the Idle Gate momentarily, but when it hits the ground again, the script should again act to sync the hardware and sim throttles if the conditions are met.

If, as I sometimes do, the Saitek lever is in the GI detent on touchdown, then, at that instant the sim throttle will move from FI to GI. So I will not have to move the Saitek lever again to get GI. But I could move it forwards to get the range from GI to FI and beyond. Or I could move it back to get Reverse.

Alternatively, I could carefully place the Saitek lever at FI (or a little behind it) on flare, and move the lever back into the GI detent on touchdown. In this case the script's only action will be to sync the levers at touchdown (for whatever little mismatch there may be) and then retire. But this is difficult to achieve because of the close proximity of FI and GI on the Saitek lever.

But if one does not require this functionality, then the following stripped lua merely automates the retraction of the Idle Gate on T/O and extension on Landing (actually the latter is programmed into the aircraft anyway, but is there in the script nevertheless).

ATR_Idle_Gate.lua
*******************************************************************
-- ATR Idle Gate (2-throttles)
-- modified by Chakko Kovoor (with thanks to abax2000 who wrote the original script)
-- merely automates idle gate extension/retraction consequent to on-ground flag

function onground(offset,value)
    if ipc.readUW(0x0366) == 1 then
        ipc.writeLvar("L:ATRIdleGate", 0)
    else
        ipc.writeLvar("L:ATRIdleGate", 1)
    end
end
  
event.offset(0x0366,"UW","onground")

******************************************************************


Thank you once again for your excellent contribution.Thumbs Up

Chakko.
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: June-03-2016 at 5:36am
aahh. okey, I see. A single action. okey, I figure out Tongue. Nice.

I would like to take the opportunity to point also some issue on F1ATR variables when using autopilot module with display (saitek, goflight)... or should I create a new topic Tongue
naivoh
Back to Top
wilgner View Drop Down
Newbie
Newbie


Joined: December-10-2018
Location: Brasil
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote wilgner Quote  Post ReplyReply Direct Link To This Post Posted: December-10-2018 at 7:48pm
Hello all, I am newbie and I do not understand anything about * .lua files, I want to know if it works in FS2004, if it works, how to install? If anyone can explain me I would be grateful !!!
Back to Top
Naivoh View Drop Down
Newbie
Newbie


Joined: May-23-2013
Location: Madagascar
Points: 24
Post Options Post Options   Thanks (1) Thanks(1)   Quote Naivoh Quote  Post ReplyReply Direct Link To This Post Posted: December-11-2018 at 12:38am
Hi Wilgner,

you need to copy those text in a notepad then rename this notepad file with extension ".lua" (example: atr.lua). Then put this file in the MODULE folder of fs2004.
Then you have two options: if the command is to be triggered manualy, you need to assign that lua to a button (go to fsuipc and assign like you assign any fs2004 control. The lua will appear in the list of assignable control).
second option is if lua needs to automatically run upon the ATR is loaded in fs2004. That case, you need to add some line in the aircraft.cfg
I dont recall exactly what line should be added but you can quickly google to find the step.

Good luck
naivoh
Back to Top
wilgner View Drop Down
Newbie
Newbie


Joined: December-10-2018
Location: Brasil
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote wilgner Quote  Post ReplyReply Direct Link To This Post Posted: December-12-2018 at 4:15am
Thanks a lot for the Naivoh answer, the problem is that I'm really very lazy on the subject, I want you to tell me if it's correct.

This is my lua file;

thres1 = 819
thres2 = 819

function onground(offset,value)
    if ipc.readUW(0x0366) == 1 then
        ipc.writeLvar("L:ATRIdleGate", 0)
        checkgi( )
    else
        ipc.writeLvar("L:ATRIdleGate", 1)
    end
end


function checkgi( )
    if ipc.readUW(0x0366) == 1 then
        if ipc.readLvar("L:ATRPLLeft_notch") == 0 or ipc.readLvar("L:ATRPLRight_notch") == 0 then
            if ipc.readSW(0x3330) <= thres1 then
               ipc.writeSW(0x088C, ipc.readSW(0x3330))
            end
            if ipc.readSW(0x3332) <= thres2 then
               ipc.writeSW(0x0924, ipc.readSW(0x3332))
            end
        end
    end
end
    
event.offset(0x0366,"UW","onground")

function onground(offset,value)
    if ipc.readUW(0x0366) == 1 then
        ipc.writeLvar("L:ATRIdleGate", 0)
    else
        ipc.writeLvar("L:ATRIdleGate", 1)
    end
end
   
event.offset(0x0366,"UW","onground")


I copied the two files from the above post that ckovoor shared, please tell me if it's right. As for running the .lua automatically I did not find in google any entries in the aircraft.cfg. I believe I did something wrong because I received the following message in FSUIPC.log;
   133194 *** LUA Error: ... ogram Files \ Microsoft Games \ Flight Simulator 9 \ MODULES \ ATR_Idle_Gate.lua: 2: '=' expected near '*'

Since now I thank you for your patience and understanding!
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.125 seconds.