Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 6be850fd authored by Michael KRISPER's avatar Michael KRISPER
Browse files

more accurate calculation of v_act

parent d7ebf55d
No related branches found
No related tags found
No related merge requests found
......@@ -274,12 +274,11 @@ namespace TUGraz.VectoCore.OutputData
object[] remainingRow = null;
var gearsList = new Dictionary<object, Second>(3);
var v_act = 0.SI<MeterPerSecond>();
var v_act = data.Rows.Cast<DataRow>().First().Field<MeterPerSecond>((int)ModalResultField.v_act);
foreach (DataRow row in data.Rows) {
var currentDt = row.Field<Second>((int)ModalResultField.simulationInterval);
distance = row.Field<Meter>((int)ModalResultField.dist);
v_act = (MeterPerSecond)row[(int)ModalResultField.v_act];
// if current + remaining time >= 1 second: take remaining row and split up currentRow to fill up 1 second.
if (remainingDt > 0 && remainingDt + currentDt >= 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment