Got an email from my dad this morning, he went out to the shop and measured the forward travel on the old Dodge and found it is 23.5" per revolution of the drive line. A bit higher than the ideal 17", but workable. It occurred to me overnight that doubling the sampling rate and dividing the result was a better solution than adding a second magnet to the drive line. Partly because it's easier to undo things like that in the code, and also because I'm not sure how fast the Hall sensor can read the magnet. Having two of them whipping by could be too much at higher speeds. Much better to leave it at one magnet and just lengthen the sampling period. And speaking of the sampling period, here's how the two break down:
|One second interval||Two second interval|
The actual distance covered is close enough to the ideal 17" that the one second sampling actually isn't too bad. All depends on how accurate the old man wants his speedometer to be. Oh, and speaking of that distance, I realize now that the .5 on there means I need to be using float instead of int in the code, otherwise my calculations are going to be off.