## lap statistics "decimal minutes/seconds"

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

thoraxe
Posts: 47
Joined: Wed Dec 14, 2016 2:29 am
Location: Atlanta, GA
Contact:

### lap statistics "decimal minutes/seconds"

Whether or not I can simulate lap data [1] I have a question about the lap statistics "decimal minutes/seconds" --

Is the output of the function a decimal number of seconds which will always be less than 59?

In other words, is a value of 2.30 "two minutes and thirty seconds" or something else?

[1] viewtopic.php?t=6149

brentp
Posts: 5986
Joined: Wed Jan 24, 2007 6:36 am
Hi,

Decimal minutes means the fractional part is decimal. Example:

2:30 would be 2.5 decimal minutes.

Hope this helps!
Brent Picasso
CEO and Founder, Autosport Labs

thoraxe
Posts: 47
Joined: Wed Dec 14, 2016 2:29 am
Location: Atlanta, GA
Contact:
brentp wrote:Hi,

Decimal minutes means the fractional part is decimal. Example:

2:30 would be 2.5 decimal minutes.

Hope this helps!
Yep, it does! But just to make it even clearer for others:

The decimal value of the lap statistic is the equivalent of:

x (sec) / 60

So to convert the decimal part to actual seconds, multiply back by 60.

In Lua terms:

Code: Select all

lap_seconds_portion = &#40;getLapTime&#40;&#41;%1&#41;*60
lap_seconds_portion would be the actual number of seconds and not the decimal.