I try to design a program to detect braking on bike. I use accelerometer and gyrometer to create an simple IMU.
I try many program to try to detect braking parts on my log without success.
My euler angle estimation works properly but when brake happen, the imu estimate an pitch but it is not.
I suggest to mount the sensor on the bike, with the Z axis up, and monitor just the horizontal X and Y accelerations. Unless the sensor orientation changes, the magnitude of the horizontal acceleration
You've set yourself a significant challenge here. The device must be able to detect braking of the motorcycle from a device which is not connected directly to the bike, but indirectly via a human body with a neck that rolls, pitches and yaws independently of the bike!
Phew - I'd be impressed if you got that working. Perfectly possible, of course, but definitely challenging.
Isn't that where the gyro comes in? Rotating the helmet downwards will be picked up by the gyro, whereas deceleration won't, so that is how your code can tell the difference.
In fact when you use IMU algorithm is the value of angle from accelerometers is integrate over the time so after few second the deceleration due to brake is interpreted as an angle.
I don't find any imu algorithm with deals with that problem.