1 |
5d9a5bd9
|
A-Konig
|
using System;
|
2 |
|
|
|
3 |
734533a8
|
A-Konig
|
namespace ServerApp.Parser.InputData
|
4 |
5d9a5bd9
|
A-Konig
|
{
|
5 |
|
|
/// <summary>
|
6 |
734533a8
|
A-Konig
|
/// Data from weather data file
|
7 |
5d9a5bd9
|
A-Konig
|
///
|
8 |
|
|
/// Csv format:
|
9 |
|
|
/// "30.04.2019 16:19:01";20.3;5.3;0;19
|
10 |
|
|
/// [date time];[temperature];[wind];[rain];[luminance]
|
11 |
|
|
/// </summary>
|
12 |
98b568bc
|
A-Konig
|
/// <author>Alex Konig</author>
|
13 |
5d9a5bd9
|
A-Konig
|
class WeatherInstance
|
14 |
|
|
{
|
15 |
734533a8
|
A-Konig
|
/// <summary> Date and time </summary>
|
16 |
|
|
// index 0
|
17 |
5d9a5bd9
|
A-Konig
|
public DateTime dateTime;
|
18 |
734533a8
|
A-Konig
|
/// <summary> Temperature in °C </summary>
|
19 |
|
|
// index 1
|
20 |
5d9a5bd9
|
A-Konig
|
public double temp;
|
21 |
734533a8
|
A-Konig
|
/// <summary> Wind in m/s </summary>
|
22 |
|
|
// index 2
|
23 |
5d9a5bd9
|
A-Konig
|
public double wind;
|
24 |
734533a8
|
A-Konig
|
/// <summary> Rain (0 if none, 1 if rain) </summary>
|
25 |
|
|
// index 3
|
26 |
5d9a5bd9
|
A-Konig
|
public int rain;
|
27 |
734533a8
|
A-Konig
|
/// <summary> Luminance in klux </summary>
|
28 |
|
|
// index 4
|
29 |
5d9a5bd9
|
A-Konig
|
public double lum;
|
30 |
|
|
|
31 |
734533a8
|
A-Konig
|
/// <summary>
|
32 |
|
|
/// Constructor
|
33 |
|
|
/// </summary>
|
34 |
|
|
/// <param name="date"></param>
|
35 |
|
|
/// <param name="temp"></param>
|
36 |
|
|
/// <param name="wind"></param>
|
37 |
|
|
/// <param name="rain"></param>
|
38 |
|
|
/// <param name="lum"></param>
|
39 |
5d9a5bd9
|
A-Konig
|
public WeatherInstance(DateTime date, double temp, double wind, int rain, double lum)
|
40 |
|
|
{
|
41 |
|
|
this.dateTime = date;
|
42 |
|
|
this.temp = temp;
|
43 |
|
|
this.wind = wind;
|
44 |
|
|
this.rain = rain;
|
45 |
|
|
this.lum = lum;
|
46 |
|
|
}
|
47 |
|
|
}
|
48 |
|
|
}
|