Visit Captain Sim web site  
  Welcome, Guest. Please Login or Register

 

Page Index Toggle Pages: 1 Send TopicPrint
OVSPD prevention lua script (Read 520 times)
Angel of Attack
Full Member
*
Offline



Posts: 249
Joined: Dec 15th, 2019
OVSPD prevention lua script
Aug 28th, 2021 at 4:19am
Print Post  
Hello everyone, since CS doesn't seems still working on fixing half-broken P3D aircraft's code, I have to do something myself.

This is my little "fix" for the infamous Over speed issue on 767/757, been reported million times and still not fixed by CS.

if you haven't encountered one(really?) or didn't pay attention exactly how it works, long story short:
1.if you get your airspeed close to VMO/MMO (most likely in a bumpy air), the A/T will miraculously jam at high power and send you even more overspeed.
2.On VNAV descend, when your speed are too low, FMC SPD kicks in and throttle up, it will ended up jam at high power and transfer to HOLD, send you overspeed.

While both condition you can easily resolve by manually move your throttle back, if you are monitoring the aircraft... let's be realistic, this is sim, and these are long haul aircrafts....

So, to the point, what this script do?
Simple, if your speed and mach is near VMO/MMO (I set it as 350/0.845, but you can change it.), it'll brutally hold your throttle back to idle.
Sounds brutal, but it's very effective, once your speed drop back down, CS's Autothrottle should be able to take over here and works fine.

How to install:
0.You'll need registered version of FSUIPC.
1.Put the CS_Anti_OVSP.lua in Prepar3D v*\Modules or related add-ons folder if you install FSUIPC that way.
2.create a FSUIPC controller profile for CS757 and/or for 767(I just use one profile for both of them), if you haven't done so. in this case I name it as "cs757"
3.Now in FSUIPC6.ini (or FSUIPC5.ini), add:
[Auto.cs757]
  1=Lua CS_Anti_OVSP

This lua script should automaticlly load the next time you load in whatever the aircraft you have associated with this profile.

Known issue:
1. It'll also cut power without autothrottle engeged, as I can't easily read if the AT is engaged(not just armed), so it'll be hard to manually go overspeed if you really want to.
2.It only cut power, so if the overspeed is not thrust related(eg descending too fast), it won't help.
3.I tried to make it also cut power when AT is on and IAS is > Selected airpseed+10 or so,  but that part of code just broken, so I removed it.
  

CS_Anti_OVSP.zip ( 1 KB | 50 Downloads )
Back to top
 
IP Logged
 
Angel of Attack
Full Member
*
Offline



Posts: 249
Joined: Dec 15th, 2019
Re: OVSPD prevention lua script
Reply #1 - Aug 28th, 2021 at 4:21am
Print Post  
Here is the code I tried to make it cut power on AT+10kts, but it doesn't work, just put here if anyone knows how to fix it:
Code
Select All
function Anti_ATOV()
	local ATSPD = ipc.readLvar("L:G03_008_LT0")
	local ATVNV = ipc.readLvar("L:G03_012_LT0")
	local SELSP = ipc.readLvar("L:L03_007_BUG")
	local IASN = ipc.readUW(0x02BC)/128
	local SEL10 = SELSP + 10
	if (ATSPD = 1) then
	 if (IASN > SEL10) then
	 ipc.control(65604, 0)
     ipc.sleep(100)
	 else
	 end
	else
	end
	if (ATVNV = 1) then
	 if (IASN > SEL10) then
	 ipc.control(65604, 0)
     ipc.sleep(100)
	 else
	 end
	else
	end
end
 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
 
  « Board Index ‹ Board  ^Top