SanDiegoMark posted:stan2004 posted:
Perhaps another way to look at it is to observe that 46.5 x 11 = 511.5. That is suspiciously close to "exactly" 512.000 - in other words is a 9-bit binary shift which is arguably what you'd expect a presumably fixed-point microcontroller processor to do to represent two levels of resolution or scaling of the same underlying value.
Stan, you may be onto something here. The 46.5 number I use was derived by working backwards. With a little more 'tuning', it really could be 46.545454 and then 46.545454 * 11 = 512.
What I'm suggesting is only one of the DTO or DOD values gives you "all" the info you can expect in terms of raw_value as the dependent variable. In other words DTO and DOD represent simple linear equations DTO=m1 * x + b1, DOD=m2 * x + b2. x is the same raw_value (tach stripe count). Different slopes and different offsets but with a fixed-ratio (512) between m1 and m2. So for the purpose of messing with the gear ratio and wheel diameter, use the higher resolution (larger slope "m") which is undoubtedly the trip odometer since its "b" gets reset on every new trip and hence does not require the range of the overall-cumulative odometer. This gets you the best resolution for the task at hand. My 2 cents.