The video should work now.
Here's a log from this morning's ride.
When it works, the calculated speed lines up almost perfectly with GPS speed.
Since I don't have any way of directly detecting the clutch or neutral, it get's a bit flaky at times.
Around 325 seconds, I was coasting and revving the engine.
It tries desperately to find a gear that matches.
Rapid acceleration also causes issues as there's a bit of lag in the GPS response.
The top graph is my calculated speed, with gaps where it doesn't know what gear it's in.
The middle is GPS vs calculated speed. It's spot on most of the time.
The bottom shows what gear it thinks it's in.
I need to set a minimum RPM for when I'm coasting at idle, so it doesn't try to guess a gear.
During this particular stretch, you can see the calculated speed wasn't consistently available until about 30 MPH.
The shift from 3rd-4th shows a speed drop from 33 MPH to 30 MPH and back to 33 MPH as it reselects the next gear.
Same thing happens 4th-5th dropping from 38 MPH to 33 MPH and back to 38 MPH.
The blip at time 80 was me pulling the clutch to see what the calculated speed would do.
The GPS speed shows some lag, most prominent around time 120. The lag is also visible at the beginning when I am decelerating in gear.
Zooming in closely, the lag seems to be about 0.5 - 0.6 seconds.
At time 54 and 154, I pull in the clutch to stop and the calculated speed goes away.
However the calculated speed briefly comes back at time 60-64 as it finds a gear that matches that GPS speed at idle RPM.
Battery usage is about 16% per hour, or 6 hours on a charge.
The G forces are very noisy with road bumps. I need to add some filtering before I can get usable G-forces and lean angles.