libraries/TypeK/TypeK.cpp
// ------------------- given mv reading, returns absolute temp C

given mv reading, returns absolute temp C
given mv reading returns absolute temp C
double TypeK::Temp_C( float mv ) {
  double x = 1.0;
  double sum = 0.0;
  int i,j,ind;
  ind = 0;
  if ( ! inrange_mV( mv ) ) return TC_RANGE_ERR;
  for( j = 0; j < nranges_inv; j++ ) {
    if((mv >= range_inv[0][j]) && (mv <= range_inv[1][j]))
      ind = j;
  };
  for( i = 0; i < ncoeff_inv; i++ ) {
    sum += x * coeff_inv[i][ind];
    x *= mv;
  }
  return sum;  
}
double TypeK :: Temp_C ( float mv ) { double x = 1.0 ; double sum = 0.0 ; int i , j , ind ; ind = 0 ; if ( ! inrange_mV ( mv ) ) return TC_RANGE_ERR ; for ( j = 0 ; j < nranges_inv ; j ++ ) { if ( ( mv >= range_inv [ 0 ] [ j ] ) && ( mv <= range_inv [ 1 ] [ j ] ) ) ind = j ; } ; for ( i = 0 ; i < ncoeff_inv ; i ++ ) { sum += x * coeff_inv [ i ] [ ind ] ; x *= mv ; } return sum ; }
given mv reading, returns absolute temp C
given mv reading returns absolute temp C
// first figure out which range of values
 //  Serial.println(ind);
