View Single Post
#35: 02-10-2008, 09:05 PM
CombatCQB's Avatar
Title: Contributor
Location: Rochester, NY
Car: 05 Legacy GT 5MT
Posts: 494
iTrader: (4)
Send a private message to CombatCQB Find all posts by CombatCQB Reply With Quote
Here is my analysis of the temperature data:

It seems that every 9th and 10th data point produces the same temperature value. It is based on the data that I did replicate on my trip meter (green highlight) and I manually filled in the rest after seeing the pattern. I can't explain why this is the case, but I'm 99% sure the pattern is correct.

It would be nice to have a simple formula to replicate this in our code, but have to think on it a little to come up with one.

This pattern lines up with every 5th and 6th decimal value of the input data (i.e. 25,26,35,36). If we create an xy plot we see the steps generated and we can divide this up into linear segments; so 20-25 is linear, 26-35 is linear, 36-45 is linear.

We could write a switch statement that will recreate these segments:
   case: 20<input<26
       temp = -22 + (input - 20)
   case: 25<input<36
       temp = -17 + (input - 26)
       error in temp input data
The hex data is in centigrade. See post #47 for details:

Last edited by CombatCQB; 02-11-2008 at 03:05 PM..