Einbauprotokoll angepasst

This commit is contained in:
HuskyTeufel
2020-03-18 12:10:49 +01:00
parent 2e25d523de
commit bb59ec3665
10 changed files with 77 additions and 328 deletions

View File

@@ -21,7 +21,7 @@ namespace CSVParser
DateTime zeit;
double temperatur;
double druck;
int geschwindigkeit;
double geschwindigkeit;
bool gestarted = false;
@@ -40,13 +40,20 @@ namespace CSVParser
throw new CSVImportException("Konnte die datum uhrzeit nicht konventieren");
double.TryParse(parts[3].Replace("\"","").Replace('.', ','), out temperatur);
int.TryParse(parts[4].Replace("\"",""), out geschwindigkeit);
double.TryParse(parts[4].Replace("\"",""), out geschwindigkeit);
double.TryParse(parts[5].Replace("\"","").Replace('.', ','), out druck);
string x = (druck*1000).ToString();
if (geschwindigkeit > 100) geschwindigkeit = 0;
if (geschwindigkeit > 50) geschwindigkeit = 1;
/*
*
* Geschwindigkeit wird in Meter angegeben pro stunde
* : 60 :60 * 100 = 36;
*/
geschwindigkeit = geschwindigkeit / 36.00;
strukture.Zeitstempel = zeit;
strukture.Druck = int.Parse(x);