plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

Kaiii3 avatar image
Kaiii3 asked Kaiii3 commented

Calculate final parking position of AI airplanes

To improve our SimConnect based Airport Services for AI airplanes I would like to calculate the final parking position of the airplane that is currently taxiing in.

Is there a function to calculate the Offset from the parking centerpoint for the nosewheel or the airplane centerpoint?

scenery
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
Yoanito avatar image
Yoanito answered Kaiii3 commented

Hello @Kaiii3

We unfortunately don't have this kind of function, but maybe it is possible to make with the simvar and event available, can you explain to me exactly what you want to do and what you have already done ?

Best regards,
Yohan

4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Kaiii3 avatar image Kaiii3 commented ·

Hey @Yoanito

my overall goal is to have a a full set of Airport Services controlled via our SimConnect application serving the injected AI airplanes.

Handling services for airplanes already injected or parked at a parking spot is easy for us since we already know the actual park position (GeoLocation) since they are already there.

What we already added is a function to send boarding ramps, baggageloaders and busses to a parking spot for standby while the AI airplane is still taxiing from the runway to the spot. And here starts my issue: As long as the aircraft is not fully parked I can only use the parkingspot location as base-point for any calculation to place the services in their stand-by location.

Lets take this 2 examples:

- Airplane A320 Parking Spot Radius: 31.1m

- Airplane A330 Parking Spot Radius: 31.1m

The final postion of the back door of the A320 will be much closer to the front of the parking spot compared to the A330. So the back boarding ramp should be waiting further to the front compared to the A330

Since I know the offset of all doors/interactive points it would be perfect to calculate the waiting positions for the services based on the dynmic final airplane-location and no longer based on the fixed parkingspot-location.

How does the Simulator calcualtes the final waypoint for the AI airplanes? Maybe I just can do the calculations myself in the app. I can access data stored in the aircraft.cfg files, SimVars (SimConnect) and the NavData API for the airport stuff.



0 Likes 0 ·
FlyingRaccoon avatar image FlyingRaccoon ♦♦ Kaiii3 commented ·
Hello @Kaiii3


We don't have that information right away as this behaviour is largely inherited from FSX.
We would need to investigate and I'm not sure we'll be able to do so in the next few days.
Have you tried comparing the traffic aircraft final position with the parking position you already have? I wouldn't be surprised if they would match or the offset would be constant...

Regards,
Sylvain

0 Likes 0 ·
Kaiii3 avatar image Kaiii3 FlyingRaccoon ♦♦ commented ·
Hey @FlyingRaccoon

I have not spend time trying to write my own function to calculate the offset yet, but I have some spare time next week and will give it a try. Will report back with my findings.


0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.