mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Take out pressure slope and angle
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using ChrisKaczor.HomeMonitor.Weather.Models;
|
||||
using ChrisKaczor.HomeMonitor.Weather.Service.Data;
|
||||
@@ -21,10 +20,6 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Models
|
||||
|
||||
public decimal PressureDifferenceThreeHour { get; set; }
|
||||
|
||||
public decimal PressureSlope { get; set; }
|
||||
|
||||
public decimal PressureAngle { get; set; }
|
||||
|
||||
public decimal RainLastHour { get; set; }
|
||||
|
||||
public WeatherUpdate(WeatherMessage weatherMessage, Database database)
|
||||
@@ -70,12 +65,6 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Models
|
||||
|
||||
var lineFunction = Fit.LineFunc(xData, yData);
|
||||
|
||||
var pressureSlope = (lineFunction(xData[0]) - lineFunction(xData.Last())) / (xData[0] - xData.Last());
|
||||
|
||||
PressureSlope = (decimal)pressureSlope;
|
||||
|
||||
PressureAngle = (decimal)Math.Atan(pressureSlope);
|
||||
|
||||
PressureDifferenceThreeHour = (decimal)(lineFunction(xData.Last()) - lineFunction(xData[0]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user