patrickmoore / Mu

Mu Releases
104 stars 22 forks source link

Lap Triggers and Track Maps\Layouts #27

Closed Hazeltine29 closed 2 years ago

Hazeltine29 commented 2 years ago

Since the 2022 S3 update I have had issues with Mu converting lap triggers and\or creating track maps\layouts correctly. I do not know if it is a lap trigger issue or if they changed how they are doing the GPS in the files but something is not correct. It has happen in the Global MX-5 car as well as the Aston and Mercedes GT4. The tracks I have run since the update that have had issues are Watkins Glen, Road Atlanta, and Phillip Island. I have included a link to my last race in the Aston GT4 at Watkins that displays the issue the best\worst. I also have a file that insists on the start\finish line being placed after turn 7 at Road Atlanta if your investigation needs additional data.

Link

Thanks in advance.

patrickmoore commented 2 years ago

Are you calculating the GPS Latitude and GPS Longitude channels?

Hazeltine29 commented 2 years ago

I am using Lat and Lon provided in the converted file.

patrickmoore commented 2 years ago

I took a look at the telemetry you linked. I don't see anything wrong. I suspect your problem is how Motec is generating the track for you. It can do so in two ways, through the latitudinal and longitudinal acceleration (which I think is what you're using) and by GPS coordinates. The former works, but I've seen some weirdness with it, while GPS coordinates have been more accurate. I wrote instructions in the README on how to add the correct channels for GPS to your project.

GPS in iRacing allows for an alternative way to determine the position of the car on the track, the generation of laps, and the generation of the trackmap.

Due to precision of the MoTeC data, GPS data needs to be combined from multiple channels (actual race teams need to do this as well). GPS Telemetry data is exported in 3 channels (Degrees, Minutes, Seconds), and must be combined by MoTeC Maths into the channels GPS Latitude and GPS Longitude. The Math formula you should use is as follows:

GPS Latitude - Quantity: Angle Display Unit: degree Decimal: 8 Result Unit: Degree Expression: 'Latitude Degrees' + 'Latitude Minutes' / 60.0

  • 'Latitude Minute fraction' / 3600.0

    GPS Longitude - Quantity: Angle Display Unit: degree Decimal: 8 Result Unit: Degree Expression: 'Longitude Degrees' + 'Longitude Minutes' / 60.0

    • 'Longitude Minute - fraction' / 3600.0

After creating these new Math channels, go into Tools -> Track Editor, and click Generate Track. Change the Method to GPS and select the new GPS channels. You may need to play around with what sections of the telemetry to use for dat, but it should regenerate the track map correctly.

Hazeltine29 commented 2 years ago

Did that too. It is not significantly different from the provided Lat\Lon channels. Lap 11 still triggers about 80m too late which leaves lap 12 80m too short. Lap 27 is like a 1 2\3 of a lap and then teleports back to the S\F line for the start of Lap 28 even though that's not where I was. There were no spins or off tracks in any of laps 4-28.

The data lines up to the time and distance traveled from the beginning. It is just really hard to tell what everything is because the sectors and lap numbers do not line up.

image
patrickmoore commented 2 years ago

Thanks for the extra info, it was enough for me to isolate the problem. iRacing has updated how some of the channels work and some data that was not expected was being processed incorrectly causing the Motec Beacons to go out of sync with the lap. I'll get a new update out with the fix.