SimConnect_AICreateNonATCAircraft Question

Hi @FlyingRaccoon

Need some clarification on SimConnect_AICreateNonATCAircraft…
Been tinkering with the AIObjectsAndWaypoints sample. Basically using pretty much the same codebase, but with some minor modifications and compiled as WASM:

  • Whenever an aircraft is spawned on the ground (using SimConnect_AICreateNonATCAircraft, speed = 0, ground = 1 and altitude = airport runway altitude), and a flightplan is sent to the aircraft, the aircraft will takeoff normally and follow the flightplan as coded. This is expected behaviour.

  • However, if aircraft is spawned airborne (using SimConnect_AICreateNonATCAircraft, speed = 150, ground = 0 and altitude = 2000), and a flightplan is sent to the aircraft, the aircraft will slowly lose speed until it comes to a full stop, hovering in the air above the airport. The flight plan is not followed, nor the aircraft can keep the current speed constant.

According to SDK Documentation, " A non-ATC aircraft can be on the ground or airborne when it is created by this function."

Is there something I’m missing? any way of having the SimConnect_AICreateNonATCAircraft stay airborne, with constant airspeed and following a flightplan?

Is there any way, as part of the flightplan, to control the AI Aircraft pitch/vertical speed? (perhaps not through SimConnect, but is there an associated variable on the AI aircraft cfg that can be edited to achieve this?)
Thanks!

[SU14] (managed) SetDataOnSimObject - “AI WAYPOINT LIST” can only be used once - Bug Reports / SimConnect - MSFS DevSupport (flightsimulator.com)

The thread describes what you are seeing (scroll down a bit), Asobo has logged it as a bug.