Jump to content
The simFlight Network Forums
Sign in to follow this  
UPL7

Slewing Ground AI Traffic

Recommended Posts

Would it be possible to create an option within FSUIPC to slew AI Traffic on the ground when on final similar to Radar Contact? It would prevent the runway incursions with AI traffic on the ground when not using the default ATC. The option to toggle slew all ai ground traffic on and off would be great.

Share this post


Link to post
Share on other sites
4 hours ago, UPL7 said:

Would it be possible to create an option within FSUIPC to slew AI Traffic on the ground when on final similar to Radar Contact? It would prevent the runway incursions with AI traffic on the ground when not using the default ATC. The option to toggle slew all ai ground traffic on and off would be great.

You could do this with an add-on program, reading the traffic details and sending commands using the AI aircraft IDs.  It would make a good utility program -- though aren't such actions already performed by existing programs, Traffic Manager or similar? When you say "slew" do you mean moving AI traffic back or forth? Quite a complex job if you want them to stay on the taxiways.

I don't really think this is a suitable facility for FSUIPC -- it is definitely an add-on utility job. Probably best directly interacting via SimConnect.

If you only mean using slew mode on all ground aircraft to freeze them in place, then that would be a relatively easy job, but what if they've already encroached upon your runway?

I'm not enhancing FSUIPC4 any more, so if I did do anything like that it would only be in FSUIPC5 (i.e. for P3D4).

Pete

 

Share this post


Link to post
Share on other sites

When I say slew I mean freezing the AI in there on the ground in their current position and then unfreezing them once the user aircraft touches down on runway. It would only freeze the AI traffic that have not received take off clearance. Activation could occur like 2.5 NM away from the arriving runway or at a 1000 ft when on final which would give the departing AI already on the runway time to clear it.

The only addon I know that does this is Radar Contact. FSUIPC came to mind since its can maintain a set AI count automatically and gives the option to adjust traffic density. 

If you were to consider this, applying it to FSUIPC5 would be fine because P3D is the future.

Thanks for your time sir.

Share this post


Link to post
Share on other sites
41 minutes ago, UPL7 said:

When I say slew I mean freezing the AI in there on the ground in their current position and then unfreezing them once the user aircraft touches down on runway. It would only freeze the AI traffic that have not received take off clearance.

Well, a control would be by button assignment. I certainly wouldn't consider checking other variables.

And surely it is only the one's which have take-off clearance which will encroach upon the runway?

42 minutes ago, UPL7 said:

Activation could occur like 2.5 NM away from the arriving runway or at a 1000 ft when on final which would give the departing AI already on the runway time to clear it.

It would be up to you to press a button of key, then again after.

Pete

 

Share this post


Link to post
Share on other sites

A button assignment would be great and would add more flexibility.

In regards to the AI with take off clearances encroaching the runway, I had in mind that the feature would ignore freezing the AI which had already received take off clearance and was in the process of taking off to continue and clear the runway. This would allow that AI to go while freezing the following AI traffic that is holding short and waiting to receive take off clearance. The AI aircraft holding short is usually the one that enters the runway when on very short final. 

Thanks for you time and consideration in adding a option like this to FSUIPC.

 

Edited by UPL7

Share this post


Link to post
Share on other sites
16 hours ago, UPL7 said:

In regards to the AI with take off clearances encroaching the runway, I had in mind that the feature would ignore freezing the AI which had already received take off clearance and was in the process of taking off to continue and clear the runway. This would allow that AI to go while freezing the following AI traffic that is holding short and waiting to receive take off clearance. The AI aircraft holding short is usually the one that enters the runway when on very short final. 

The states in which AI can be are:

    "init",            // 0
    "sleep",           // 1
    "flt plan",        // 2
    "clearance",       // 3
    "push back 1",     // 4
    "push back 2",     // 5
    "startup",         // 6
    "pre taxi out",    // 7
    "taxi out",        // 8
    "takeoff 1",       // 9
    "takeoff 2",       // 10
    "T&G depart",      // 11
    "enroute",         // 12
    "pattern",         // 13
    "landing",         // 14
    "rollout",         // 15
    "go around",       // 16
    "taxi in",         // 17
    "shutdown",        // 18

The aircraft are actually off the ground in part of TakeOff-2, and 11 (I think), 12,  13 and 16 are flying. 

As you see, there's no actual "hold" state I can detect. I can certainly allow those in "TakeOff-1" and "TakeOff-2" states to continue and only stop the others.

I think, in fact, that you'd want those on the ground in states 14-18 to continue also. and those in states 0-3 are still parked. So you'd only want to freeze those in states 4-8 at most, and maybe only 8 (taxi).

Of course take-off1" might be just before thay enter the runway and therefore need freezing too. I'm not really sure. I'll watch in TrafficLook to see.

If the addition is an assignable control, like the Zapper, then more sophisticated actions could be programmed via Lua plug-ins -- like automatically operating the freeze when you lower the gear, perhaps, and releasing them when you are on the ground. But i think I would prefer to leave that level of sophistication to folks' imaginations and ingenuity.

Pete

[LATER]

Watching the traffic with TrafficLook running so I can see the States, it appears that they Hold in "taxi-out" state. Once in "TakeOff-1" mode they move onto the runway. "TakeOff-2" mode is actually accelerating down the runway.

So, I think the freeze should only operate on "Taxi-Out" state.

Pete

 

 

Share this post


Link to post
Share on other sites

Great work sir! I really appreciate you looking into this.

Based on what has been presented here, I agree that the freeze would best work on the  “taxi-out” state AI traffic. The option to have automatic triggers via LUA plugins along with the assignable control you are looking into would be great.

Thank you very much for your ingenuity with the FSUIPC program.

Share this post


Link to post
Share on other sites

In the next release there will be three new controls:

Traffic freeze toggle
Traffic freeze on
Traffic freeze off

The way it is done is by sending Slew toggle controls to each relevant aircraft (i.e. those in Taxi out state). There's no "on" and "off" slew controls, so FSUIPC keeps a note of what state you've set. If you load a new flight then the aircraft will all load in unslewed state in any case, so it is reasonably safe, it is just that you may occasionally need to use the toggle control twice. Best to use the on or off for clarity.

Also, in my tests, it can sometimes happen that the control doesn't actually get to an aircraft.  There may be so many and Simconnect so busy, that is misses some in the queue. However, this seems to be a rare occurrence, and for me it only happened when i sped the sim up to 4x so that the traffic got a move on! 😉

Pete

 

Share this post


Link to post
Share on other sites

You are the man sir! Looking forward to the upcoming release. Again thanks for your hard work over these years.

Share this post


Link to post
Share on other sites

pete

I've been reading your notes here & at the P2ATC forum re a lua .... "I'm supplying a Lua plug-in example with the release which freezes them when the gear is lowered on approach (or, for fixed gear aircraft, full flaps are engaged), and releases them on touch down".

I am unable to find it in 5.141e example's or her ... you advice please.

john

Share this post


Link to post
Share on other sites
51 minutes ago, vadriver said:

I've been reading your notes here & at the P2ATC forum re a lua .... "I'm supplying a Lua plug-in example with the release which freezes them when the gear is lowered on approach (or, for fixed gear aircraft, full flaps are engaged), and releases them on touch down".

I am unable to find it in 5.141e example's or her ... you advice please.

"AIfreezer.lua" was prepared ready for the next full release. I don't remember where I mentioned it. Can you give me links to those two mentions, please. It would help me check that we are thinking about the right thing.

Pete

 

Share this post


Link to post
Share on other sites

Ah, you mean this bit:

or preventing runway incursions on approach, with P3D4 and FSUIPC 5.14 or later (to be released this weekend), there are AI Traffic Freeze and Release controls added. These operate on all the AI aircraft in "Taxi out" mode.

I'm supplying a Lua plug-in example with the release which freezes them when the gear is lowered on approach (or, for fixed gear aircraft, full flaps are engaged), and releases them on touch down.

If you'd repro'd this in the first place i could have checked and replied properly.

Obviously the AIFreezer.lua plug-in should have been included in the Example Lua Plugins ZIP with  FSUIPC release 5.14, but checking now I see it missed out. Sorry about that. i'll make sure it is included in the next update. Meanehile, here it is: just save this to a file called AIFreezer.lua:

-- NOTE: For use with FSUIPC 5 only

-- This small plug in, which should be pre-loaded: for example, by adding
-- [Auto] 
-- 1=Lua AIfreezer
-- to your FSUIPC5.INI file.

-- It freezes taxi-out AI traffic when you lower your gear,
-- and releases them when you touch down.

-- For aircraft with non-retractable gear, it checks the state of
-- the Flaps instead, expecting full flaps for landing. (amend where
-- noted for other flap settings).

function GroundCheck(off, val)
	if ipc.val ~= 0 then
		ipc.control(1149) -- Freeze AI off if user landed
		ipc.log("AI taxiout traffic released")
	end
end

function GearCheck(off, val)
	if val >= 16383 and ipc.readUW(0x0366) == 0 then
		ipc.control(1150) -- Freeze AI on if gear just lowered (whilst in the air)
		ipc.log("AI taxiout traffic frozen")
	end
end

function FlapsCheck(off, val)
	-- See if gear is fixed first:
	if ipc.readUB(0x060C) == 0 then
		if val >= 16383 and ipc.readUW(0x0366) == 0 then
			ipc.control(1150) -- Freeze AI on if now full flaps set when in the air
			ipc.log("AI taxiout traffic frozen")
		end
	end
end

event.offset(0x0366, "UW", "GroundCheck")
event.offset(0x0BE8, "UD", "GearCheck")
event.offset(0x0BDC, "UD", "FlapsCheck")

Pete

 

Share this post


Link to post
Share on other sites
On ‎7‎/‎23‎/‎2018 at 8:03 PM, Pete Dowson said:

I would prefer to leave that level of sophistication to folks' imaginations and ingenuity.

pete

now there's a challenge, imagination certainly, lua ingenuity dubious as you know  ..... so decided to "try" TrafficLook" but no joy, don't see "anything" nor a user guide to check (wanted to understand what states apply crossing runways both before & after)

the attached shows there's a connection but no "ini" is created in my TrafficLook folder.

Your advice please.

john 

WideClient.log

Share this post


Link to post
Share on other sites
5 hours ago, vadriver said:

decided to "try" TrafficLook" but no joy, don't see "anything" nor a user guide to check (wanted to understand what states apply crossing runways both before & after)

TrafficLook really needs no user guide. What's to document? The only menu is self-explanatory, surely?

The "states" are as reported by SimConnect. Exactly what they mean is reasonably obvious when you watch. "Clearance", TaxiOut", TakeOff1, TakeOff2 (I think the difference between those two is permission to line up, and rolling, but I've only deduced that from watching.

Crossing runways doesn't have a state. that's just taxiing as far as they are converned.

5 hours ago, vadriver said:

the attached shows there's a connection but no "ini" is created in my TrafficLook folder.

Why do you want to access the INI? it only saves changes you make, like Window positions for Airborne and Ground, and column positions if you move them or resize them. It isn't intended to be user-accessed.

Pete

 

Share this post


Link to post
Share on other sites
12 hours ago, Pete Dowson said:

The only menu is self-explanatory, surely?

but there is the problem ..... i am not getting a screen display with said menu (on my client).

the application file is only 17kB ??

john

Share this post


Link to post
Share on other sites
41 minutes ago, vadriver said:

i am not getting a screen display with said menu (on my client).

Sorry, I don't understand. What happens when you run TrafficLook? No screen display at all? Or a good traffic display with no menu bar, or what?  The menu contains just "File" and "Help", with the Help only showing an "About" option. The File item has "Print", "Ground Traffic Only" , "Airborne Traffic Only",  "Refresh", "autorefresh" and "Exit" options.

I'm off-line now for about 10 days, though I may be able to do some work next Monday or Tuesday. I can try to help, but you should know, that the TrafficLook and WeatherSet utilities are only demos of specific aspects of FSUIPC offset access, and are not really supported and certainly not maintained. They use standard Windows facilities and have not been changed in any real way for years. The menu is defined in the resoource data of the program, so If it isn't appearing, something must be wrong with the EXE, or with the standard libraries used in Windows.

Pete

 

 

Share this post


Link to post
Share on other sites
5 hours ago, Pete Dowson said:

No screen display at all ...

using fsuipc5.141e / wideclient 7141 / trafficlook 1650 / P3Dv4.3 / W764 ...... unzipped trafficlook folder aside wideclient outside program files & on main c:\ drive.

no rush, enjoy off-line .... as before, I was keen to see what state crossing runways was (@ ksfo for example, traffic departing 28R cross the 28's to taxiway E from the terminals, so freezing might stop an aircraft mid runway whilst I'm on final .... but have zapper ready anyway & / or tweak afcad for 28L only departs).

john

 

Share this post


Link to post
Share on other sites
On 10/9/2018 at 12:27 AM, vadriver said:

I was keen to see what state crossing runways was

I'm pretty sure they just stay in TaxiOut or TaxiIn state and press on blindly.

Pete

 

Share this post


Link to post
Share on other sites

Pete,

I don't know if you are back online or not, but I just checked TrafficLook 1.56 with P3d4 and the most recent version of FSUIPC5 and I get the same result as John reported above. It's not a big deal to me, but I just wanted to confirm his results that TrafficLook was reported as running in the Task Manager, but its main window does not display. I'm running Win 10 and not WideClient.

Jay

Share this post


Link to post
Share on other sites
15 hours ago, Pete Dowson said:

I'm pretty sure they just stay in TaxiOut or TaxiIn state and press on blindly

pete

seems so ..... if looking at state shown by PATC.

Maybe an enhancement is to add a "zapper" when crossing the threshold (using 31E4) to clear any TaxiOut or TaxiIn stuck on the runway !

john

Share this post


Link to post
Share on other sites
7 hours ago, vadriver said:

Maybe an enhancement is to add a "zapper" when crossing the threshold (using 31E4) to clear any TaxiOut or TaxiIn stuck on the runway !

You could write a little Lua plug-in to do that easily enough, similar to the little one I'll be including in the next Lua package release:which I think will also do the job without the extreme of Zapping:

This is AIFreezer.lua (it was posted in an earlier message here):

-- NOTE: For use with FSUIPC 5 only

-- This small plug in, which should be pre-loaded: for example, by adding
-- [Auto] 
-- 1=Lua AIfreezer
-- to your FSUIPC5.INI file.

-- It freezes taxi-out AI traffic when you lower your gear,
-- and releases them when you touch down.

-- For aircraft with non-retractable gear, it checks the state of
-- the Flaps instead, expecting full flaps for landing. (amend where
-- noted for other flap settings).

function GroundCheck(off, val)
	if ipc.val ~= 0 then
		ipc.control(1149) -- Freeze AI off if user landed
		ipc.log("AI taxiout traffic released")
	end
end

function GearCheck(off, val)
	if val >= 16383 and ipc.readUW(0x0366) == 0 then
		ipc.control(1150) -- Freeze AI on if gear just lowered (whilst in the air)
		ipc.log("AI taxiout traffic frozen")
	end
end

function FlapsCheck(off, val)
	-- See if gear is fixed first:
	if ipc.readUB(0x060C) == 0 then
		if val >= 16383 and ipc.readUW(0x0366) == 0 then
			ipc.control(1150) -- Freeze AI on if now full flaps set when in the air
			ipc.log("AI taxiout traffic frozen")
		end
	end
end

event.offset(0x0366, "UW", "GroundCheck")
event.offset(0x0BE8, "UD", "GearCheck")
event.offset(0x0BDC, "UD", "FlapsCheck")

Pete

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.