View Single Post
#35: 02-10-2008, 09:05 PM
 
 CombatCQB
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:

http://spreadsheets.google.com/pub?k...kg-DLIJVouqZJQ

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.

Edit1=============
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:
Code:
switch(input)
{
   case: 20<input<26
       temp = -22 + (input - 20)
   case: 25<input<36
       temp = -17 + (input - 26)
    .
    .
    .
    default
       error in temp input data
}
Edit2==============================
The hex data is in centigrade. See post #47 for details:
http://www.legacygt.com/forums/showp...2&postcount=47

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