double Vs = 3.3;
double r1 = 10000.0;
double Vo = raw * .0001; //PSOC: .1mv to volt.
double r2 = (r1 * Vo) / (Vs - Vo);
std::cout << "Raw rtd reading = " << raw << std::endl;
std::cout << "Voltage Output = " << Vo << std::endl;
std::cout << "voltage Source = " << Vs << std::endl;
std::cout << "Given Resistance = " << r1 << std::endl;
std::cout << "Acquired Resistance = " << r2 << std::endl;
return -412.6 + (140.41 * pow(1 + (0.00764*r2), 0.5)) + (-6.25e-17 * (r2 * r2 * r2 *r2 *r2)) + (-1.25e-24 * (r2 * r2 * r2 * r2 * r2 * r2 *r2));
这是对的吗?我继续把奇怪的价值归还给我。其中很多是纳米或65,000个值。