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

Skip to content
Snippets Groups Projects
Commit dc33ad21 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

reduce distance divergance warning in release mode to 1e-6m

parent e3f8a384
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Log.Warn("Distance field is not set!");
} else {
var distance = (SI)container[ModalResultField.dist];
if (!distance.IsEqual(CurrentState.Distance, 1e-12.SI<Meter>())) {
Log.Warn("Vehicle Distance diverges from Cycle by {0} [m]. Distance: {1}", (distance - CurrentState.Distance).Value(), distance);
#if DEBUG
var tolerance = 1e-12.SI<Meter>();
#else
var tolerance = 1e-6.SI<Meter>();
#endif
if (!distance.IsEqual(CurrentState.Distance, tolerance)) {
Log.Warn("Vehicle Distance diverges from Cycle by {0} [m]. Distance: {1}",
(distance - CurrentState.Distance).Value(), distance);
}
}
}
......
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