-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCalibrations.cs
44 lines (43 loc) · 1.11 KB
/
Calibrations.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace ImportWLK
{
public class Calibrations
{
public Calibrations()
{
Temp = new Settings();
InTemp = new Settings();
Hum = new Settings();
InHum = new Settings();
Press = new Settings();
Rain = new Settings();
WindSpeed = new Settings();
WindGust = new Settings();
WindDir = new Settings();
Solar = new Settings();
UV = new Settings();
WetBulb = new Settings();
}
public Settings Temp { get; set; }
public Settings InTemp { get; set; }
public Settings Hum { get; set; }
public Settings InHum { get; set; }
public Settings Press { get; set; }
public Settings Rain { get; set; }
public Settings WindSpeed { get; set; }
public Settings WindGust { get; set; }
public Settings WindDir { get; set; }
public Settings Solar { get; set; }
public Settings UV { get; set; }
public Settings WetBulb { get; set; }
}
public class Settings
{
public double Offset { get; set; } = 0;
public double Mult { get; set; } = 1;
public double Mult2 { get; set; } = 0;
public double Calibrate(double value)
{
return value * value * Mult2 + value * Mult + Offset;
}
}
}