>
> At 01:08 PM 10/26/00 EDT, you wrote:
> >It's a formula to calculate water vapour pressure given a temperature in
> Deg C
> >
> > float calculateWaterWVP(float Temp)
> > {
> > float a,tempInK,c,d,e,wvp;
> >
> > tempInK = Temp + 273.15;
> > a = -6096.9385 * (1/tempInK);
> > c = -2.711193 * 0.01 * tempInK;
> > d = 1.673952 * 0.00001 * (tempInK * tempInK);
> > e = 2.433502 * (log(tempInK)/log(10)/0.434294509);
> >
> >
> > wvp = exp(a + 21.2409642 + c + d + e);
> > return wvp;
> >
> > } */
> >
> >If you can do this, you get a medal !
> >
> >(Accuracy of result = 1% or better)
>
> How nonlinear is this function OVER THE RANGE OF INTEREST?
>
> How much resolution do you need (for display, it may be unacceptable
> to have poor resolution, even if the accuracy is ok)?
>
> Since this is a SISO function of temperature, I'd be tempted to use
> either a lookup table with linear interpolation or a polynomial fit to
> the analytical function above. Using 16-32 bit fixed point integer
> math, depending.
>
> Best regards,
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Spehro Pefhany --"it's the network..." "The Journey is the reward"
>
.....speffKILLspam
@spam@interlog.com Info for manufacturers:
http://www.trexon.com
> Embedded software/hardware/analog Info for designers:
http://www.speff.com
> Contributions invited->The AVR-gcc FAQ is at:
http://www.bluecollarlinux.com
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> --
>
http://www.piclist.com hint: The PICList is archived three different
> ways. See
http://www.piclist.com/#archives for details.