How to get GPS speed in kph?

Found a bug or got a feature request? Post it here.
GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

How to get GPS speed in kph?

Post 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?

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post by GTIspirit »

No one knows????? I know there are users in Europe. Except for a "pint" the metric system is used in Europe, right?

JMcDonough
Posts: 70
Joined: Tue Mar 10, 2015 3:31 pm
Location: Detroit, MI

Post by JMcDonough »

Virtual channel with getGpsSpeed()*1.6 would seem to be a quick and dirty work around.
Josh

dvsu12
Posts: 18
Joined: Sun May 17, 2015 11:02 pm

Post by dvsu12 »

Also wondering how to do this without using a virtual channel!

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Hi GTISpirit, this is on our todo list, hang in there!
Ryan Doherty
Autosports Labs

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post 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????

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post 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.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

Zefy
Posts: 4
Joined: Tue Aug 23, 2016 12:57 am
Location: Vancouver, BC

Post 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...

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post 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.....

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post 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

brentp
Site Admin
Posts: 5956
Joined: Wed Jan 24, 2007 6:36 am

Post 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.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

thokes82
Posts: 8
Joined: Wed Aug 02, 2017 4:01 pm
Location: Aachen, Germany
Contact:

Post 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

brentp
Site Admin
Posts: 5956
Joined: Wed Jan 24, 2007 6:36 am

Post 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!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post 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.

Yu
Posts: 5
Joined: Fri Oct 06, 2017 4:38 pm

Post by Yu »

When will you look to add it as an option app release?
I hope for early release.

Post Reply