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
123 stars 19 forks source link

VATSIM Traffic with "ASA..." #89

Open GoogleTrEx opened 1 year ago

GoogleTrEx commented 1 year ago

I have an issue where anyone using "ASA" before their callsign numbers is displayed as "Alaska 1123" and only that callsign. I have seen more than one person showing on the VATSpy and Simaware VATSIM resources that are signed in as ASA2123 and ASA427 both being displayed as "Alaska 1123." The odd thing is that all other flights are just shown with their shorthand callsigns like SWA2076 or DAL932, for example. I have tried going through all different modes of making sure it wasn't me up to and including a full re-download and install of FS2FF.

If there are any kinds of files I can provide, let me know what it's called and where I might find them and I'm happy to upload that. It's more of a nuisance than a real problem.

jeffdamp-wave commented 1 year ago

This bit of code is what you are hitting:

 private static string? TryGetFlightNumber(Traffic t) =>
            !string.IsNullOrEmpty(t.Airline) && !string.IsNullOrEmpty(t.FlightNumber)
                ? $"{t.Airline} {t.FlightNumber}"
                : null;

this code is used here:

            var data = string.Format(CultureInfo.InvariantCulture,
                "XTRAFFIC{0},{1},{2:0.#####},{3:0.#####},{4:0.#},{5:0.#},{6},{7:0.###},{8:0.#},{9}",
                SimId, id, t.Latitude, t.Longitude, t.Altitude, t.VerticalSpeed, t.OnGround ? 0 : 1,
                t.TrueHeading, t.GroundVelocity, **TryGetFlightNumber(t) ?? t.TailNumber**);

Are these actually player planes or did you have AI traffic enabled (or even ground traffic)? Last time I used VatSim there was some oddness with planes floating on the ground that showed them as airborne too. If you want, you can use this version: https://github.com/jeffdamp-wave/fs2ff/releases/tag/v1.1.16 I had modified astenlund version to play around with GDL90 to emulate a Stratux ADS-B source. I added some Vatsim work arounds for the floating planes on the ground. If you select Emulate Stratux it will only report the Tail number and not attempt to use the Airline + FlightNumber.

Lastly... Players can set their VatSim tail different than what is set in game, they might not match up. I bet a lot of people just leave the default in game tail number.

GoogleTrEx commented 1 year ago

Yeah, so I have all AI and Player traffic set off. I tested it with a buddy where he logged in and out using different callsigns when he sign onto the network. If he used "AS" ahead of the number or another airline's shorthand or even a General Aviation tail number "N12345" those all showed up correctly. So, it's definitely a real person on the network. Also, not that it matters in this example because I have players turned off on MSFS, but his game tail number was not set to anything (and we tried once where he did set it to something random) so it wasn't a conflict between MSFS and VATSIM.

I will give the one you linked a try and see of that resolves the issue. Thanks!