function [TinC,TinK] = TfromV(Voltage)
%TFROMV Calculate the temperature for a TCS10K5 thermstor
%   This function calculates the temperature in both C and K
%   for a TCS10K5 thermistor processed by the temperature
%   circuit on an E190AJ class rocket
% Constants
A = 1.1279E-3;
B = 2.3429E-4;
C = 8.7298E-8;
Vref = 0.5; % Generated by an ADR130
Rref = 10000; %Precision 0.1% resistor
G = 6.60; %Non-inverting op amp with precision 0.1% resistors
RT = Rref*(G*Vref./Voltage - 1);
TinK = 1./(A + B.*log(RT) + C.*(log(RT).^3));
TinC = TinK - 273.15;
end

