Class ArrayTemperature

java.lang.Object
  |
  +--ArrayTemperature

public class ArrayTemperature
extends java.lang.Object

This class is used to calculate the current array temperature from the thermistor adu value supplied by the controller. CVM - Model

Version:
1.00
Author:
Scott Streit

Field Summary
private static double adu_offset
           
private static double adu_per_volt
           
private static boolean linear_mode
           
private static double[] temperature_coeff
           
private static double vl
           
private static double vu
           
 
Constructor Summary
ArrayTemperature()
          Default constructor.
 
Method Summary
 int calculate_adu(double temperature)
          Calculates the adu value from the temperature for the nonlinear case.
 double calculate_temperature(int adu)
          Calculates the array temperature for the nonlinear case, in Celcius, from the thermistor adu value returned by the controller.
static void set_algorithm(java.lang.String algorithm)
          Determines whether to use the linear or non-linear algorithm.
static void set_linear_coefficients(java.lang.String coeff1, java.lang.String coeff2)
          Sets the coefficients to use with the linear algorithm.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

temperature_coeff

private static double[] temperature_coeff

adu_per_volt

private static double adu_per_volt

adu_offset

private static double adu_offset

vu

private static double vu

vl

private static double vl

linear_mode

private static boolean linear_mode
Constructor Detail

ArrayTemperature

public ArrayTemperature()
Default constructor.
Method Detail

set_algorithm

public static void set_algorithm(java.lang.String algorithm)
Determines whether to use the linear or non-linear algorithm.
Parameters:
algorithm - May be one of two Strings: "linear" or nonlinear".
Returns:
The array temperature, in Celcius, is returned.

set_linear_coefficients

public static void set_linear_coefficients(java.lang.String coeff1,
                                           java.lang.String coeff2)
                                    throws java.lang.NumberFormatException
Sets the coefficients to use with the linear algorithm. The input strings are parsed as double precision.
Parameters:
coeff1 - The first coefficient.
coeff2 - The second coefficient.
Throws:
java.lang.NumberFormatException - If coefficients could not be parsed.

calculate_temperature

public double calculate_temperature(int adu)
Calculates the array temperature for the nonlinear case, in Celcius, from the thermistor adu value returned by the controller.
Parameters:
adu - The array temperature in adu.
Returns:
The array temperature, in Celcius, is returned.

calculate_adu

public int calculate_adu(double temperature)
Calculates the adu value from the temperature for the nonlinear case. The calculated adu value may be passed to the controller.
Parameters:
temperature - The array temperature in adu.
Returns:
The adu value is returned.