RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 2
Goto page 1, 2  Next
Issues with Lap Timer?
Author Message
Reply with quote
Post Issues with Lap Timer? 
Hey guys, just wondering if the lap timer feature (as well as the streaming telemetry to race-capture.com feature) isn't active on V2 beta or if I am doing something wrong. I'm going to be hitting the track soon so I want to make sure this setup will work. I just tested by setting up a custom start/finish line and I had nothing but issues. Either i get no laps or it just increments the lap counter every 10.x seconds.

Here is my current setup:
RCP MK1 Firmware v2.7.6 + bluetooth module + CanX module
RaceCapture Windows app v1.2.2
RaceCapture Android app (beta v1.2.3)


I can provide more details and sdcard .log file and .rcp config but if this isn't a feature that has ported to V2 beta, then I have my answer.

View user's profile Send private message
Reply with quote
Post  
Hi- that is definitely an incorrect behavior.

Can you post your RCP configuration file and we can take a look? You're on the currently latest 2.7.6 firmware, correct?


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Thanks for the quick reply Brent.

Yes, unit is mk1 on firmware 2.7.6.

Attached is a zip containing my .rcp config file along with .log file. The log file should show I drove the same roads across my starting line 3-4 times as test track. But in the log file you should see the lap count incrementing begining at interval 117015.

EDIT: zip was slightly to large to attach, i put it on google drive:
https://drive.google.com/file/d/0B32khitIH6DENzlNaVNTUmIzcXM/view?usp=sharing

Here is a screen shot of the race track/sectors page:



One thing I noticed is when I enter in latitude 33.077303 and longitude -96.668958 and upload the config to the unit, I can retrieve the settings from the MK1 and it has changed the numbers ever so slightly to 33.077305 and -96.668961. Potentially a byproduct of data type conversion? Shouldn't be a big deal but I figure I should note the behavior.

View user's profile Send private message
Reply with quote
Post  
Also, I'm not sure what the default radius is for starting points or if there are any special conditions to trigger lap start.

I consulted the RaceCapturePro V2 User's Guide read this note:
Quote:
The beginning of a lap is triggered by the combination of a start point which defines the general area where the race car is staged, and a launch detection algorithm combining a speed and g-force delta threshold.


This is listed under Separate Start/Finish Lines so I wouldn't think this applies but either way it doesn't explain the lap count incrementing every ~10.x seconds.

View user's profile Send private message
Reply with quote
Post Can you use a pre-defined track 
I have seen this behavior before but am still hunting down the root cause. One question: Do you see this issue when you use a predefined track as opposed to specifying your own start/finish points? Its an outside shot but any info you have will be useful in tracking down this issue.


_________________
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post Default radius 
Also FYI the default radius is about 11M. Hope that helps.


_________________
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
Hi Andrew, thanks for the response.

I have only used the device prior to V2/beta firmware on track so I haven't been able to test predefined tracks.

On firmware 1.2.8 i can verify that the device does trigger starting/finish beacon with those specific coordinates.

View user's profile Send private message
Reply with quote
Post  
Confirming.. thought it was just me. Here's my RCP config, and a logfile massaged into OpenOffice Calc. Hardware is Mk1, firmware 2.7.6, GPS/bluetooth but no telemetry. When lapcount started ticking upward, I was a few miles from my start/finish line. Seems to be incrementing at a steady rate (I plotted lapcount vs time) independent of speed or position.

When I was running the original firmware, I created a test track around the block near home, loaded the JSON in, and had RCP counting laps for me, even showing up on the Android app via bluetooth. I used the same coordinates a few weeks ago with no triggers.

Tonight I used the Windows app to reconfig, and moved to a different start/finish (43.08, -73.7711), but lapcounting is still being weird. Near the end of the logfile I crossed this point several times, no effect on the continual increase of lapcount.

I also notice that the Distance field is weird - mostly zero, but jumps to a few constants : 3735928559 1083683.75 and -6044.697 ... usually for a while, but sometimes just for one log record. This happens in the logfile before the lapcounter upticking starts, so I'm not suspecting any relation between the two.


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Reply with quote
Post  
More clues.. From lap 55-75, lapcount ticks up at a nearly-constant 10.15-ish second rate. Laptime shows at 0.1683 minutes/lap which agrees (=10.1/60) Sector time is 0.0017 minutes. (All sector coordinates are set to 0,0) Speed during these "laps" ranges randomly from 0-30mph. My datalogging rates are 1/sec, 5/sec, or 10/sec depending on variable.


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Reply with quote
Post  
Steig - does MK1 hardware/processor correctly run distPythag() and fast_square_root() as found in geopoint.c? Or is that too much maths for it?


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Reply with quote
Post  
toga94m,

I can answer that, and yes. In fact, the previous MK1 firmware ran a much less efficient algorithm before fast_square_root() was added- and back then, it ran without problems at 10Hz. The MK1 processor is plenty fast, even with the old algorithm, and fast_square_root() only gave it even more processing headroom. Hence the word fast. Wink

The problem is likely a more mundane logic error on our part.


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Tonight I created a test-track map JSON and had the Windows app load it to the RCP. One start/finish, four corner datapoints, no sectors defined. I also set config for auto-track-detect instead of hardcoding the start/finish coordinates like previous tests. Helpful tip for others - the track JSON files are living at C:\Users\Tom\AppData\Roaming\racecapture\venues on my Win8 machine. Took a half-hour to find them again, I knew where they were last summer............

I drove around the block a few times with bluetooth streaming to my Android tablet, crossed start/finish three times, but never saw the lapcounter do the right thing. Eventually it started doing the increment-every-10-seconds trick.

Once I got the log into a spreadsheet, I found a new clue. The Sector number is logged at -1 until the first time I cross start/finish. Then it bumps one to 0, and stays there.. and that's when the lap counter starts incrementing at the 10-second rate. I'm now convinced the start/finish detection and auto-track detection is working, because the sector change happened at -73.771217 by 43.080647 and my start/finish is tagged at -73.7711 by 43.0800

Does lap counting work on other test tracks with no sectors defined, like Oregon Test Track 1?


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Reply with quote
Post  
I found an explanation for the 10 second delay for lap upcounting...
#define START_FINISH_TIME_THRESHOLD 10000

A little above that, something looks odd to my n00b self. There's a definition for
static int processStartFinish(const Track *track, const float targetRadius) {

and a const variable, then some code.... then we define some more variables without any function definition above it. I'm guessing that's legal or it wouldn't compile.. but aren't all the variables supposed to come first?


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Reply with quote
Post Nice work thus far 
Nice work toga94m. I intend to dig into this more tonight. I'll add what I find here.

Quote:
The Sector number is logged at -1 until the first time I cross start/finish.


Yep. That is expected. That is how I know when you have actually crossed start/finished and triggered a launch event.

Quote:
Does lap counting work on other test tracks with no sectors defined, like Oregon Test Track 1?


It should. But I can test this further tonight. By test track I assume you are referring to one you created by hand?

Quote:
found an explanation for the 10 second delay for lap upcounting...
#define START_FINISH_TIME_THRESHOLD 10000


That is a big find. Its 10.1 because we sample every 1/10th of a second, so that makes perfect sense to the cadence. This would imply that if I were to adjust this value to say 20 seconds, it would take 20.1 seconds before it ticks up. That would indicate that the algorithm always thinks it in the start/finish GeoCircle. Interesting. More to come tonight.


_________________
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
I filtered all available tracks by the word 'TEST' and found that one in Oregon, assuming it was one used by RCP authors for drive-testing. I was curious if existing drive-testing had been done on track definitions that had sectors in them, or if they were simple one-stage tracks like my rectangle.

I'm also wondering why Distance in the logfile jumps around all over the place - if that's related. If that's the odometer per lap, then it shouldn't be non-zero when we haven't crossed start/finish yet.. but it kicks out those huge numbers like 3735928559 occasionally (for the first 90+ seconds of my logfile), then returns to 0... Then midway through 10-second lap #2, it gives me -0.015 and -45136.617, then returns to zero for lap #3.

From /src/logger/loggerSampleData.c
chanCfg = &(gpsConfig->latitude);
sample = processChannelSampleWithFloatGetterNoarg(sample, chanCfg, getLatitude);
chanCfg = &(gpsConfig->longitude);
sample = processChannelSampleWithFloatGetterNoarg(sample, chanCfg, getLongitude);
chanCfg = &(gpsConfig->speed);
sample = processChannelSampleWithFloatGetterNoarg(sample, chanCfg, getGpsSpeedInMph);
chanCfg = &(gpsConfig->distance);
sample = processChannelSampleWithFloatGetterNoarg(sample, chanCfg, getGpsDistanceMiles);
chanCfg = &(gpsConfig->satellites);
sample = processChannelSampleWithIntGetterNoarg(sample, chanCfg, getSatellitesUsedForPosition);


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 2
Goto page 1, 2  Next
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum