Python-SimConnect icon indicating copy to clipboard operation
Python-SimConnect copied to clipboard

Fly_Assistant_Set_As_Destination returns none

Open TobaT3 opened this issue 3 years ago • 2 comments

I have this very simple piece of code that tries to get the destination of the plane in msfs2020. I tried the "FLY_ASSISTANT_SET_AS_DESTINATION" simvar and it should return the destination set by the flight assistant (which is automatically set if you have selected a flight plan on the world map), however it simply returns None, even though i have a destination set. It returns other parameters (like the altitude there) just fine:

from SimConnect import *
import time

sm = SimConnect()
aq = AircraftRequests(sm)

while True:

    altitude = aq.get("PLANE_ALTITUDE")
    print(altitude)

    destination = aq.get("FLY_ASSISTANT_SET_AS_DESTINATION")
    print(destination)
    
    time.sleep(2)

TobaT3 avatar May 25 '22 17:05 TobaT3

And if someone had another way of getting the destination (from the flight plan inputted in the world map), that would be great. I saw something with saving and dictionaries but i cant get that to work.

TobaT3 avatar May 25 '22 17:05 TobaT3

Did you ever get past this? I have a really nicely functioning AI co-pilot bot sets destinations for (in my code) and I can successfully feed it my position and it 'guides' me to the target by voice with headings and distance, but i would love just SET THE DESTINATION PIN or something equivalent to dropping a marker in the world with the lat and lon I already have.

Any help would be appreciated

I am going to try to play with these, but I'm still thinking this is barking up the wrong tree : "GPS_IS_ACTIVE_WAY_POINT", "GPS_POSITION_LAT", "GPS_POSITION_LON"

telemole avatar Mar 24 '23 16:03 telemole