private double InterpolatePressure(double lat, double lon, double altFt, Func <WxTable, TableItem> getTable) { double press = ConversionTools.PressureMb(altFt); int index = GetIndicesForInterpolation(press); return(Interpolate1D.Interpolate( pressures[index], pressures[index + 1], getTable(windTables[index]).ValueAt(lat, lon), getTable(windTables[index + 1]).ValueAt(lat, lon), press)); }
public WindUV GetWindUV(double lat, double lon, double altitudeFt) { double press = ConversionTools.PressureMb(altitudeFt); int index = GetIndicesForInterpolation(press); double uWind = Interpolate1D.Interpolate( pressures[index], pressures[index + 1], windTables[index].GetUWind(lat, lon), windTables[index + 1].GetUWind(lat, lon), press); double vWind = Interpolate1D.Interpolate( pressures[index], pressures[index + 1], windTables[index].GetVWind(lat, lon), windTables[index + 1].GetVWind(lat, lon), press); return(new WindUV(uWind, vWind)); }