# This awk script generates temp.src based on a curvefit from excel. # The resistor divider network of the thermistor and a fixed resistor was # put in ice water and put at many other temperatures. BEGIN { print "; Automatically generated from temp.awk" print "PUBLIC TTABLE" print "TTABLE:" for ( i = 0; i < 256; i++ ) { printf( "\tDB\t%d\n", int(xlate(i)) ) } print "$EJECT" } function xlate(x,a,b,c) { a=0.043729121225004 b=1.75816276789992 c=34.772174890236 return( ((x-c)/a)^(1/b) ) }