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