astenlund / fs2ff

A utility that connects Microsoft Flight Simulator 2020 with ForeFlight, Sky Demon, Garmin Pilot, FlyQ EFB, and probably a few more EFB apps
The Unlicense
119 stars 18 forks source link

Incorrect Altitude with MSFS SU5 #50

Open formbstudios opened 2 years ago

formbstudios commented 2 years ago

Greetings!

With the latest changes in Microsoft Flight Sim and the way they (more accurately) report altitude now, it appears that the altitude reported in the sim does not align with the altitude being reported to ForeFlight via fs2ff.

I believe this post, by the developer that create vPilot (for VATSIM and PilotEdge) has a good overall description of the issue: https://forums.flightsimulator.com/t/vatsim-ivao-pilotedge-users-be-aware-of-an-important-bug/426142/363

Hoping that a change can be made in fs2ff for MSFS that will be able to correct for this issue.

Thanks for all the great work!

Kevin

cro4711 commented 2 years ago

sorry that's off topic. Was not aware, that a reply to the E-Mail will end in this thread.

Hi Kevin,

I’m doing some tests for the Enroute developers with MSFS. They have no Windows environment so I took this task to check the compatibility to Enroute. fs2ff works fine at the first look but I identified an issue and after having a deeper look, I got the finding that all tested MSFS2020 SimConnect based traffic gateways (e.g. Xmapsy) have this issue.

I’ve the following scenario:

MSFS2020 up and running at the Gate at EDDF Frankfurt Airport to have a lot of example traffic. fs2ff started in Visual Studio 2019 and connected to MSFS with green light.

In SimConnectAdapter.cs at the ReceiveCallback I’ve added some lines to get information about airborne traffic received:

private async void SimConnect_OnRecvSimobjectData(SimConnectImpl sender, SIMCONNECT_RECV_SIMOBJECT_DATA data)

       if (data.dwRequestID == (uint)REQUEST.TrafficObjectBase + data.dwObjectID &&

            data.dwDefineID == (uint)DEFINITION.Traffic &&

            data.dwObjectID != SimConnectImpl.SIMCONNECT_OBJECT_ID_USER &&

            data.dwData?.FirstOrDefault() is Traffic tfk)

        {

            if (!tfk.OnGround) // show only airborne traffic

            {

                Debug.WriteLine("\tTraffic received " + tfk.Altitude + "\tTail: " + tfk.TailNumber + "\tAirline: " + tfk.Airline + "\tFlight: " + tfk.FlightNumber);

                await TrafficReceived.RaiseAsync(tfk, data.dwObjectID).ConfigureAwait(false);

            }

        }

There is a lot of traffic around the airport but only traffic with tail numbers will be seen at the debug console.

I’ve added a screenshot. The green marked traffic will be received., the red marked not.

Do you have an idea why?

I guess that’s the same issue reported in your github before. (MSFS + Foreflight + Vatsim #26)

Regards

Claus

bvibber commented 2 years ago

GPS altitude appears to be correct. However GPS altitude is not necessarily the same as indicated altitude anymore. This is a correct and more realistic simulation.