Jump to content

AI Traffic - all have issues but one option is acceptable


Recommended Posts

2 hours ago, KL Oo said:

Surely you could inject statics as regular AI Traffic that were sleeping and just set a far away take off time?

That's what I do already. I don't know how to "call" a jetway... do you?

Link to comment
Share on other sites

On 11/29/2022 at 4:08 PM, kiek said:

@RobJCFor your information: 

In 32.9.4 the micro stutters are gone. Traffic is smooth now.

PSXT can now handle up to 100 fps!

That's a fantastic improvement indeed!

Now if you could solve the sliding through turns, it would be close to perfect. 🙂

 

Link to comment
Share on other sites

21 minutes ago, kiek said:

Is on my to-do list.

That would be great. The fix for the stuttering is a big improvement.
Your program has come a long way since the v8 days when I first started using it!

AMD Ryzen 5800X3D; MSI RTX 3080 Ti VENTUS 3X; 32GB Corsair 3200 MHz; ASUS VG35VQ 35" (3440 x 1440)
Fulcrum One yoke; Thrustmaster TCA Captain Pack Airbus edition; MFG Crosswind rudder pedals; CPFlight MCP 737; Logitech FIP x3; TrackIR

MSFS; Fenix A320; A2A PA-24; HPG H145; PMDG 737-600; AIG; RealTraffic; PSXTraffic; FSiPanel; REX AccuSeason Adv; FSDT GSX Pro; FS2Crew RAAS Pro; FS-ATC Chatter

Link to comment
Share on other sites

3 hours ago, kiek said:

That's what I do already. I don't know how to "call" a jetway... do you?

This is all total speculation so take my thoughts with a grain of salt...

I saw this comment on the third-party forums discussion about how there are two types of AI in the sim, and that the jetways would only dock to one of the two types:
https://forums.flightsimulator.com/t/3rd-party-airport/322519/5

When you're setting a parked aircraft at the gate, are you calling the SimConnect_AICreateEnrouteATCAircraftSimConnect_AICreateParkedATCAircraft, or something different? I'm speculating that the latter method (ParkedATCAircraft) wouldn't dock jetways because it's being treated as a parked aircraft with no future. I'm speculating that there's no way to control jetways, and that the sim automatically handles this and other airport operations like bag services based on conditions of the AI aircraft object.

Link to comment
Share on other sites

1 hour ago, AeroMaster12 said:

This is all total speculation so take my thoughts with a grain of salt...

I saw this comment on the third-party forums discussion about how there are two types of AI in the sim, and that the jetways would only dock to one of the two types:
https://forums.flightsimulator.com/t/3rd-party-airport/322519/5

When you're setting a parked aircraft at the gate, are you calling the SimConnect_AICreateEnrouteATCAircraftSimConnect_AICreateParkedATCAircraft, or something different? I'm speculating that the latter method (ParkedATCAircraft) wouldn't dock jetways because it's being treated as a parked aircraft with no future. I'm speculating that there's no way to control jetways, and that the sim automatically handles this and other airport operations like bag services based on conditions of the AI aircraft object.

@kiek what @AeroMaster12 has said was my understanding (although I'm not a programmer). I recall you inject your AI as objects as opposed to AI Traffic. I'm not sure if the sim can connect a jetway to an object thats not identified as AI Traffic so my through was when you park an aircraft as static, could you inject it as an AICreate_ParkedATCAircraft? That might trigger the jetway (and other ground services). That said, I'm not sure you can dictate to the sim which gates the AI park at, that may be left up to the sim to decide.

Still - This the fact you've got rid of the stutters is amazing. Well played. 

Kael Oswald

7950X3D / 64GB DDR5 6000 @ CL30 / Custom Water Loop / RTX 4090 / 3 x 50" 4K LCD TVs

Link to comment
Share on other sites

I know that PSXT changes an object from when it goes static to live (you see it briefly disappear and respawn with gear animations). I was instead implying that instead of calling ParkedATC (which seems like it creates a static aircraft object), to instead call AICreateEnrouteATCAircraft, as this should theoretically bind properties (i.e., destination) that make the sim treat the plane as one that would be "servicable" by ground services. 

Again, all is pure speculation at this point.

Link to comment
Share on other sites

Hi guys,

PSXT uses the SimConnect_AICreateNonATCAircraft function for as well live as static aircraft. It cannot use the "ATC" versions because then it has to provide a flight plan which is useless for real time live traffic.

That's probably the reason that PSXT aircraft are not serviced by the jetways and ground services.

btw: PSXT's live aircraft park at gates too. They switch off the engines and so on, wait and come to live again when it is time for the return flight. So it is not only static parked aircraft that are silently replaced by a live version. If you use the "Initial load only" option you will end up with parked live aircraft only (no statics).

Nico

Link to comment
Share on other sites

36 minutes ago, kiek said:

Hi guys,

PSXT uses the SimConnect_AICreateNonATCAircraft function for as well live as static aircraft. It cannot use the "ATC" versions because then it has to provide a flight plan which is useless for real time live traffic.

That's probably the reason that PSXT aircraft are not serviced by the jetways and ground services.

btw: PSXT's live aircraft park at gates too. They switch off the engines and so on, wait and come to live again when it is time for the return flight. So it is not only static parked aircraft that are silently replaced by a live version. If you use the "Initial load only" option you will end up with parked live aircraft only (no statics).

Nico

Ahh and I see the problem with this now. Consider the following function definitions:

The method that PSXT uses rightfully has the ability to position the plane wherever it needs to go.

HRESULT SimConnect_AICreateNonATCAircraft(
    HANDLE  hSimConnect,
    const char*  szContainerTitle,
    const char*  szTailNumber,
    SIMCONNECT_DATA_INITPOSITION  InitPos, // < -- NOTE THIS ARGUMENT
    SIMCONNECT_DATA_REQUEST_ID  RequestID
    ); 

However, this ability does not exist when creating a ParkedATCAircraft - the sim will randomly assign it a spot, which is not what we want.

HRESULT SimConnect_AICreateParkedATCAircraft(
    HANDLE  hSimConnect,
    const char*  szContainerTitle,
    const char*  szTailNumber,
    const char*  szAirportID,
    SIMCONNECT_DATA_REQUEST_ID  RequestID
    );

Now... thinking out loud here, what if one were to create a NonATCAircraft (first method), and then create a "dummy" pln file where it would never take off or pushback before PSXT would manage it, and then pass along the aircraft and dummy.pln to this method? I don't know if it's possible to set a "delay" or a departure time of the current DateTime.AddDays(1) or bind a flight plan but never trigger a pushback, or something else like that.

Function definition here:

HRESULT SimConnect_AISetAircraftFlightPlan(
        HANDLE  hSimConnect,
        SIMCONNECT_OBJECT_ID  ObjectID,
        const char*  szFlightPlanPath,
        SIMCONNECT_DATA_REQUEST_ID  RequestID
      );

 

Edited by AeroMaster12
Link to comment
Share on other sites

1 hour ago, AeroMaster12 said:

 

Now... thinking out loud here, what if one were to create a NonATCAircraft (first method), and then create a "dummy" pln file where it would never take off or pushback before PSXT would manage it, and then pass along the aircraft and dummy.pln to this method? I don't know if it's possible to set a "delay" or a departure time of the current DateTime.AddDays(1) or bind a flight plan but never trigger a pushback, or something else like that.
 

This is what I was suggesting above - inject the aircraft as ATCAircraft however give it a plan that will never go anywhere....or if it must depart it in 6 hours by which time the user has moved on. Only thing I'm not sure of is if MSFS allows you to tell ATCAircraft which gates to spawn at

 

Kael Oswald

7950X3D / 64GB DDR5 6000 @ CL30 / Custom Water Loop / RTX 4090 / 3 x 50" 4K LCD TVs

Link to comment
Share on other sites

19 minutes ago, KL Oo said:

This is what I was suggesting above - inject the aircraft as ATCAircraft however give it a plan that will never go anywhere....or if it must depart it in 6 hours by which time the user has moved on. Only thing I'm not sure of is if MSFS allows you to tell ATCAircraft which gates to spawn at

 

Problem with creating it as an ATCAircraft is that you can't place it in a spot where it just parked. For example, if a plane that's a live object parked at gate C4, if you de-spawn and create a new ATCAircraft object, it'll spawn in a completely different gate (i.e., G6). You'd have to spawn a nonATC aircraft to ensure that it's placed in the exact spot where the live object parked, and then try to bind a flight plan or modify enough simvars to trigger ATC to handle gate operations at the airport 

Link to comment
Share on other sites

Hmmmm, you sound like you know alot more about this than I do - which to be fair wouldn't be hard 🙂 

 

Fingers crosed @kiek is able to use some of the ideas you raised and see if we can't get jetways moving! 

  • Like 1

Kael Oswald

7950X3D / 64GB DDR5 6000 @ CL30 / Custom Water Loop / RTX 4090 / 3 x 50" 4K LCD TVs

Link to comment
Share on other sites

7 hours ago, AeroMaster12 said:

Now... thinking out loud here, what if one were to create a NonATCAircraft (first method), and then create a "dummy" pln file where it would never take off or pushback before PSXT would manage it, and then pass along the aircraft and dummy.pln to this method? I don't know if it's possible to set a "delay" or a departure time of the current DateTime.AddDays(1) or bind a flight plan but never trigger a pushback, or something else like that.

That's exactly what PSXT already does... It adds a simple flight plan with orgin and destination airports only, for the flight plan info in P3D (can be shown above the aircraft) and external programs such as LittleNavMap. But that does not make it an ATC controlled aircraft, nor that it can trigger ground services ior jetways. I need an SDK function for that.

Note that I know all corners of SimConnect, while I'm programming in it for some 15 years now...

Edited by kiek
Link to comment
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
×
×
  • Create New...