RE: New CDI - opensource project JMJ and Bigboat
once the engine is running, I really don't care where the sensor is.
The idea is that you measure and filter the interval between the pulses, and constantly estimate the rotor position, based on this interval measurement. Every time a pulse is received, you calculate the difference between the estimated and measured position of the crankshaft, and adjust the estimated position by a fraction of the difference. That way, you always have a fairly high-resolution live estimation of the crankshaft position, which is constantly adjusted but small amounts, and keeps tracking the actual position.
This way, it doesn't matter exactly where the sensor is, because the switching events are related to the estimated crankshaft position, and not directly to the sensor input.