Page 1 of 2

How to get GPS speed in kph?

Posted: Sat Jun 27, 2015 8:37 pm
by GTIspirit
Using a Mk1 unit with latest V2 software.

GPS speed is in units of MPH. How to configure it for kph?

Preferences in the RaceCapture app are set for Celsius and kilometers. I don't see any option under the GPS section to select units, and I can't find any other places to select units. So how to get metric GPS data?

Posted: Tue Jul 07, 2015 11:08 am
by GTIspirit
No one knows????? I know there are users in Europe. Except for a "pint" the metric system is used in Europe, right?

Posted: Tue Jul 07, 2015 12:38 pm
by JMcDonough
Virtual channel with getGpsSpeed()*1.6 would seem to be a quick and dirty work around.

Posted: Mon Aug 24, 2015 10:51 am
by dvsu12
Also wondering how to do this without using a virtual channel!

Posted: Thu Sep 10, 2015 7:25 pm
by rdoherty
Hi GTISpirit, this is on our todo list, hang in there!

Posted: Sun Jul 10, 2016 11:53 am
by GTIspirit
Did this ever get implemented? I thought I saw a selection for units preference, but GPS speed in my most recent recording is in mph. :( And now I can't find where I saw the units preference selection, so maybe I'm remembering wrong and it's still not possible to get GPS speed in kph without a virtual channel????

Posted: Mon Jul 11, 2016 3:48 pm
by stieg
GTIspirit wrote:Did this ever get implemented? I thought I saw a selection for units preference, but GPS speed in my most recent recording is in mph. :( And now I can't find where I saw the units preference selection, so maybe I'm remembering wrong and it's still not possible to get GPS speed in kph without a virtual channel????
Not yet I'm afraid. It is something we are aware of internally but there is a high cost to making this change a reality for us. We would like to fix it as well but there are many things that need to happen before we will be able to support it effectively.

Posted: Tue Aug 23, 2016 1:19 am
by Zefy
just here to voice my opinion that this is a need to have... The majority of the stuff I do is in metric. Every software I've used always has the units able to be switched so I never even thought to check if this app is capable of doing it.

Please fix it...

Posted: Sat Sep 24, 2016 1:33 pm
by GTIspirit
Actually, it's somewhat surprising that RCPro ended up with GPS speed in mph when the NMEA string is in knots or kmh. It would be extra work to provide GPS speed in mph.....

Posted: Thu Sep 29, 2016 10:36 pm
by GTIspirit
So I'm not quite understanding how to add a virtual channel. I followed the instructions and examples, and here's what I have

This gets added to the Lua header, to configure the new channel
SpeedGPS = addChannel("SpeedGPS", 10, 2, 0, 200, "kmh"]
What I don't quite understand, is the first argument in addChannel == existing channel name, or != existing channel name?

Then in the onTick section there is this line:
setChannel(SpeedGPS, getGpsSpeed()*1.61)

I'm expecting to see a new channel named "SpeedGPS" in the drop down list of the analysis.

There is no new channel, and the Lua script crashes. Indication that the Lua script crashes is that the shift lights are glowing dimly. When the Lua script is running correctly the shift lights will be off with key on engine off.

So what am I missing here?

P.S. moderators, feel free to move this to the Lua script section now since the thread has taken a turn into doing.

Doh, typo in the first line, incorrectly ended with square brace instead of parenthesis. But now Lua is out of memory :o
viewtopic.php?p=24663#24663

Posted: Fri Oct 14, 2016 6:13 am
by brentp
I would start by adapting one of the simple examples for virtual channels, and expanding from there:

https://wiki.autosportlabs.com/RaceCapt ... g_Examples

You can start a new topic as needed, we'll leave this one here.

Posted: Wed Aug 16, 2017 6:02 pm
by thokes82
Can't believe that configuration of different units is not possible without Lua. Could you just fix this, please? This is open for too long in my opinion.
Is there a way to overwrite the units of an existing channel with Lua? If I do this, it does not work and stays with "mph":

Code: Select all

tickRate=30

SpeedId = addChannel("Speed", 10, 0, 0, 300, "KMH")
function onTick() 
setChannel(SpeedId, getGpsSpeed()/1.61)

end

Posted: Wed Aug 16, 2017 8:35 pm
by brentp
Hi,

We're sorry this has taken so long, and it is one of our highest priorities. Fortunately, part of the work is already done, which will help speed up the remaining implementation.

You can't override the built-in speed channel that way. Best thing to do in the meantime is create a separate Speed channel (example: SpeedKph) with the conversion applied, using a virtual channel.

We'll be sure to announce when support is available. Thanks again for your patience!

Posted: Mon Aug 21, 2017 1:24 am
by GTIspirit
The GPS NMEA speed sentence is natively in M = m/s, N = knots, K = km/hr, so it's a bit strange how we ended up with mph and why it would be so difficult to flip back to a native value. Thank goodness for the LUA scripting to make the conversion as a workaround.

Posted: Sat Oct 07, 2017 12:59 am
by Yu
When will you look to add it as an option app release?
I hope for early release.