This is now done and available in the interim test version 3.507, see top announcement above. Could you try it and let me know if it works as you'd expect, please?
The calculations seem good (also when the a/c is placed below the lowest temperature sample or above the highest and also when there is just one temperature sample).
Thank you very much.
I think you could be interested in a strangeness (a bug?) in the structure _NewTemp.
When a temperature sample is negative, the member Alt is wrong (because it's an unsigned short).
Try, for example, to place the a/c at KBWC (which is below the sea level) using the weather theme "Building Storms".
You should see the lowest temperature sample = 214885 ft and the second sample = 4134 ft. A bit strange... :-)
I think a float type for Alt would be the right choice.
For the other members (Day, DayNightVar and DewPoint) why don't you use something like _NewTemp.DewPoint = dew_point * 256 (like with the new offset 0E8E)?
Cristiano