Page 2 of 5

Re: OBD logging/display issues in Android

Posted: Mon May 23, 2016 10:18 pm
by Harry
Can't say if this is the workaround, at least it sounds interesting. :-) But to clarify for Aaron: changing the OBD delay will have no effect on existing laps, it is for new recordings only.

- Harry

Re: OBD logging/display issues in Android

Posted: Tue May 24, 2016 10:19 pm
by aaronc7
Very interesting indeed. I did notice some sync issues between g-force/OBD/GPS in previous recordings, but had put it on the back burner. I'm in the middle of moving right now, but when I get a chance I'll look into the OBD and/or other delays, unless Harry releases the 'fix' first :).

Re: OBD logging/display issues in Android

Posted: Wed May 25, 2016 4:56 pm
by gplracerx
I used a slightly more sophisticated technique. I calculated the square of the difference of the OBD and GPS speed for each fix on the spreadsheet data, summed that and then shifted the GPS by one row (Z3-H4 then Z3-H5, etc. where the Z column is wheel speed in kph and the H column is GPS speed in kph) until the sum of squares was minimized. The minimum was at a difference of four rows or 0.35 seconds, since the first fix is almost never exactly on a time stamp. I think that means I have to add 0.35 seconds to the OBD delay, but I usually get that backwards. It's easy enough to test.

Re: OBD logging/display issues in Android

Posted: Wed May 25, 2016 11:54 pm
by gplracerx
Oops. I forgot. You need to zero everything to the iPhone, not to the GPS or OBDII data. The way to do this is to calculate speed from accelerometer data by integration of lineal acceleration and then adjust the OBDII delay and the GPS delay to match that. That's not going to work all that well unless you also refine the calibration of the iPhone axes using calculated yaw rate from speed and lateral acceleration and integrate to get course and combine that with GPS speed and accelerometer calculated speed to get accelerometer offset and yaw correction. Rinse, lather and repeat until it stops making a difference.

Or you can eyeball it and probably get close.

Re: OBD logging/display issues in Android

Posted: Thu May 26, 2016 12:49 am
by gplracerx
If I'm doing this in the right direction, I need to increase the XGPS160 delay by 0.1 second from 0.7 to 0.8 seconds and increase the BT1 delay by 0.5 seconds from 1 to 1.5 seconds. Now to test.

Changing the effective delay in the spreadsheet changed the phone axis calibration by an insignificant amount.

This calculation may seem complex, but you should only have to do it once for any given combination of phone, OBD and GPS devices.

Here's the resulting graph:

Image

I'm hoping the OBD speed will be less noisy with the correct delay.

Another note: I don't recommend doing this with the accelerometer update rate at less than the maximum of 100Hz. It might work on a race track where things are happening less rapidly. It certainly won't work for autocross, like the run data in the graph.

Re: OBD logging/display issues in Android

Posted: Thu May 26, 2016 10:28 am
by Willi87
Hi,
I have the same problem as aaronc7 discribed in his first post.
Two weeks ago I got the Galaxy S7 as well an I am using the same hardware. -> Android 6.0.1, Skypro XGps 160, OBDLink MX

When I only watch the enging data, everything seems to work fine. The XGps 160 has a refresh rate of 10Hz the OBD has a 60Hz refresh rate (?? I think...)

But when I made some tests I had the problem that the whole app crashes. I had to close all apps an restart the laptimer.
When I was at the NOS I prepared everything that laptimer says ready. Then I choosed the video priview. It just took a few seconds and the app crashed. Later I saw a Message that the OBD refresh rate was very low...
The first round was not recorded.

Then I restarted and only choosed the timer view. I did the lap and a viedo was recorded. When I watched the Video with the overlay I noticed that the gauges often just jump. And the viewed gear is sometimes wrong as well.

In laptimer settings I choosed for the camera resolution full HD. In my camera app I choosed the resolution 1920x1080 with 60fps.
Could that be a problem?

I also can choose a QHD and UHD resolution.


Here is a link where you can see this issue:

[youtube]https://www.youtube.com/watch?v=z-U1x3csKMw[/youtube]


Greetings
Willi

Re: OBD logging/display issues in Android

Posted: Thu May 26, 2016 4:28 pm
by Harry
The OBD rate message is not related to the crash. The message means there are some communication issues for your OBD connection. As long it works usually, please check the connection or unplug / replug the adapter to restart it. Gear, RPM, speed - that has all the same root cause. Thanks for your patience, this will be fixed the next weeks.

For the crash: I regularly check crash logs submitted by Google and add workarounds. The video part is difficult to handle because all the smartphone models out there behave quite different and come with regular issues. Diversity is a pain for the low level media functions.

- Harry

Re: OBD logging/display issues in Android

Posted: Thu May 26, 2016 5:28 pm
by ereynold60
Here is a link to a graph I created in Circuit tools, showing GPS and OBD wheel speed, after adjusting my OBD delay. (Clink link if the image is not showing, below.


Image

https://drive.google.com/open?id=0ByvT9 ... HUzUEdBNGM

Re: OBD logging/display issues in Android

Posted: Thu May 26, 2016 6:39 pm
by gplracerx
I'm guessing that the image tag doesn't work because the URL doesn't have an image extension like .jpg or .png.

Re: OBD logging/display issues in Android

Posted: Fri May 27, 2016 4:59 pm
by fstlane
Thank you to the OP for pointing out the issue and to Harry for committing to resolving it. I too have the same erratic OBD data problem with my setup consisting of HLT Grandprix Edition, HTC M8 or Nexus 7, Qstarz 818XT, OBDLink MX and a 2012 Subaru BRZ. My engine view shows a solid 14-15Hz OBD refresh with a PID rate of 65-70. I've always assumed it was an issue with bad data from my car's bus but I now feel confident it's a software issue that can be resolved. Thank you!

Darren

Example: https://youtu.be/0sAdllLC8Gk