Aparent database problems, but check database is OK!?

Help on issues you run into with LapTimer; in case you have a question on how to use LapTimer, use the forum "Using LapTimer" instead
toysareforboys
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 27
Joined: Sat Mar 16, 2013 2:30 am

Aparent database problems, but check database is OK!?

Post by toysareforboys »

re: viewtopic.php?f=11&t=1159&start=80#p6967
Harry wrote:The crashes show some database inconsistencies that need to be repaired. Please enter Lap List and press "Check Data".
I ran "check database" the other day, before trying to attach my video and getting the crashes, it said everything was OK. I just ran it again:

Image

My database: http://ecuflashking.com/LapTimerGPSRecDB_3.zip
Harry wrote:2) In case you need to manually sync video and recordings (which should be necessary in selected cases only), you need to try. The end of the lap should be the end of the lap :-) In case your impression is the data is far off once overlaid, you need to readjust and find the best position depending on your device and sensors used.
Did you watch my video? The running timer on the overlay and the running timer on the ipod in the video are perfectly in sync, ONLY the gps speed and accelerometer are out of sync (the GPS speed is off by more than a second). I assume there's no way to calibrate them separately? It would look pretty unprofessional to just offset the overlay and have the two running track timers (overlay plus ipod) be way way off from each other :( just to get the GPS speed and accelerometer sync'd! No matter how difficult, is there any way I can open up the lap file (with iExplorer or whatever) and add a delay into the data (either offset the timer start, or add a delay to the gps speed or accelerometer, etc.).
Harry wrote:5) First choice is to find and fix errors. Building in recovery strategies is sometimes necessary in computer science, but should be done only in cases no other option is available. Every minute I spend in thing like that, miss for the real fixes. v17.0.6 is pretty stable and I try to close any remaining issues. In cases like yours, were the database has a problem, crashes can appear everywhere - which probably generates an impression of general instability.
After the crash on the first lap and it not recording any data for that session, without fixing or doing anything different, it recorded perfectly for the entire 40 min session after that one. Would you not agree that it was a recoverable crash? There was nothing catastrophic that would have prevented HLT from restarting and recording the rest of the session it missed, minus a lap or two of data :(

-Jamie M.
User avatar
Harry
Site Admin
Site Admin
Posts: 10520
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Aparent database problems, but check database is OK!?

Post by Harry »

Yes, watched the video, but it actually looked o.k. for me. GPS derived speed is always a little late (even more than position), so please do not expect these to be in sync to the 10th of a second. In case you want to pull it forward, you can change the GPS sensor delay in LapTimer's Expert Setting. In case GPS speed is late in the video, you need to increase the GPS delay in Expert Settings. The delays are applied during recording, so changing the delays will not fix existing recordings. Same for acceleration. In case you record using a 1 Hz GPS (internal), you may consider to use calculated acceleration by the way, this will give you later acceleration on motorbikes. Please be careful when playing around with the delays, it is easy to get lost :-)

- Harry
Image Image Image Image
toysareforboys
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 27
Joined: Sat Mar 16, 2013 2:30 am

Re: Aparent database problems, but check database is OK!?

Post by toysareforboys »

Harry wrote:Yes, watched the video, but it actually looked o.k. for me. GPS derived speed is always a little late (even more than position), so please do not expect these to be in sync to the 10th of a second. In case you want to pull it forward, you can change the GPS sensor delay in LapTimer's Expert Setting. In case GPS speed is late in the video, you need to increase the GPS delay in Expert Settings. The delays are applied during recording, so changing the delays will not fix existing recordings. Same for acceleration. In case you record using a 1 Hz GPS (internal), you may consider to use calculated acceleration by the way, this will give you later acceleration on motorbikes. Please be careful when playing around with the delays, it is easy to get lost :-)
Thank you for the reply :) Nice to know about the delay, I'll set the GPS and accelerometer to offset by 1 second for my next session and see how it goes.

I use a 5hz UltiMate GPS, is there a better way to do lateral acceleration and braking vs. using the iPod's accelerometer?

-Jamie M.
User avatar
Harry
Site Admin
Site Admin
Posts: 10520
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Aparent database problems, but check database is OK!?

Post by Harry »

Lateral acceleration is too noisy when calculated from 5 Hz (need to add a filter here). You may try it for a test lap, but mostly it delivers this too noise data. There is no alternative currently for 5 Hz (i.e. measured lateral acceleration neutralized by the lean angle, or noise calculated data).

- Harry
Image Image Image Image
toysareforboys
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 27
Joined: Sat Mar 16, 2013 2:30 am

Re: Aparent database problems, but check database is OK!?

Post by toysareforboys »

Harry wrote:Lateral acceleration is too noisy when calculated from 5 Hz (need to add a filter here). You may try it for a test lap, but mostly it delivers this too noise data. There is no alternative currently for 5 Hz (i.e. measured lateral acceleration neutralized by the lean angle, or noise calculated data).
Ahhh, that makes sense. I was adding a data logger for my throttle position, and it was 200hz, VERY noisy :( I'm getting a serial programmer so I can edit the microcontroller and add in my own filter (I will make it be 4hz final. I'm thinking it'll take 50 readings, subract a few of the highest values, the lowest values, then average the rest, spit out number). Assuming the math part of it doesn't take much CPU overhead that'd be 4hz output, nice and filtered and smooth :D

The only lateral acceleration I'm interested in capturing is braking, which is generally done with the motorcycle vertical and traveling in a straight line. Is this something I can realistically capture accurately with my iPod's internal sensor? Would the orientation of the iPod make any different, (it's hard to see in my video, but it's at a 20% angle from flat, and I can make it so it's perfectly level horizontally, it's slightly off right now, but can't adjust the 20% angled up).

Assuming either my iPod orientation isn't great for capture braking force, or the iPod accelerometer isn't the best device to do it, I'm planning on adding a brake fluid pressure sensor. That, combined with my TPS sensor, could give me a really sweet vertical graph, green up top for acceleration, red for braking.

-Jamie M.
(p.s. I solved the calibration problem by putting your overlay onto a green screen video, then using adobe primere to overlay the green screen. I cut each part of the overlay, timer, gps speed, sensor, etc, into a separate video so I can calibrate each one individually. Lots of work, I'll post up the results when done if successful. Works extra good cause I hardly need any space at all on the iPod, and can just dump lap after lap after lap and then put it all in primere, fast and works great for an entire session!)
User avatar
Harry
Site Admin
Site Admin
Posts: 10520
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Aparent database problems, but check database is OK!?

Post by Harry »

Longitudinal acceleration is measured correctly for motorbikes as you usually will not have a relevant lean angle at the braking point.

- Harry
Image Image Image Image
toysareforboys
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 27
Joined: Sat Mar 16, 2013 2:30 am

Re: Aparent database problems, but check database is OK!?

Post by toysareforboys »

Hey Harry :) I got the green screen working (actually blue screen because the dot on the track map is green)!! Works amazing!! The GPS speed and running lap timer are now sync'd flawlessly, and the accelerometer as well as I could understand it. The GPS speed and accelerometer were off by 1.73 seconds from the timer, and the track map by 1 second but that's mostly just preference for how I wanted it to look.

[youtube]http://www.youtube.com/watch?v=d0nZPxr1Rzg[/youtube]

Now I'm trying to work with HLT to allow the overlay to be scaled (primarily for making the track map bigger like I did in the above video, but without losing resolution/quality. If my idea works, you could scale any of the overlay items larger or smaller). The only issue is my iPod 4th gen doesn't like to handle any video resolutions over 720p of course!

I've got my super high res (2560x1440) green screen video into HLT and it shows me the preview, plays it, everything looks peachy, but when I go to apply the overlay it gets right to 100% then says:

Image

I figure it's getting an error when it tries to move the processed video to the "camera roll" (due to unsupported resolution for the iPod). If there's an error log somewhere that you want to look at just let me know where/what it is and I'll get it over to ya. There is lots of space available, so that's not it. My question is, when this error pops up, is the temporary file it was creating gone? Where does it build this temporary file? So I can try and find/copy it out with iExplorer...

I've looked in /Apps/com.harrys.LapTimerPro/tmp and /tmp/MediaCache but I don't see anything getting built in there :(

Any help you could provide would be great, just trying to streamline my workflow for my next track day!

-Jamie M.
(p.s. I'm also trying to figure this out in case I shoot my front cam in 1080p and need to overlay it but my iPod 4th gen won't want to do it).
toysareforboys
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 27
Joined: Sat Mar 16, 2013 2:30 am

Re: Aparent database problems, but check database is OK!?

Post by toysareforboys »

No news?
User avatar
Harry
Site Admin
Site Admin
Posts: 10520
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Aparent database problems, but check database is OK!?

Post by Harry »

The error code is not too helpful (AVErrorUnknown). It is raised when LapTimer / iOS finish of writing the overlaid video is not successful. At this point in time, the transfer to the Photo library has not yet started. So it is not related to Photo library incompatibility, but most probably a general issue with the video file format processed. I remember there were some problems like this with old iOS version, which one do you use for your iPod? Otherwise my only guess is the format simply doesn't work.

- Harry

P.S. When you see the message, the incomplete video fragment written is deleted already.
Image Image Image Image
toysareforboys
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 27
Joined: Sat Mar 16, 2013 2:30 am

Re: Aparent database problems, but check database is OK!?

Post by toysareforboys »

Harry wrote:When you see the message, the incomplete video fragment written is deleted already.
Bummer :(
Harry wrote:I remember there were some problems like this with old iOS version, which one do you use for your iPod?
Says 6.1.3

So I guess that rules out shooting video in 2.7k (2704 x 1524) on my new Hero3 :(

-Jamie M.
Post Reply