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

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

fix: preprocessing for pcc segment annotation: remove condition that target...

fix: preprocessing for pcc segment annotation: remove condition that target speed must not change within the preview distance before x_v_low -> change start of pcc segment to min. of last target speed change and look-ahead distance
parent a063da51
No related branches found
No related tags found
No related merge requests found
......@@ -76,11 +76,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl {
var slope = VectoMath.InclinationToAngle(
(tuple.Item2.Altitude - tuple.Item1.Altitude) / (tuple.Item2.Distance - tuple.Item1.Distance));
if (pccSegment == null && slope < minSlope &&
(tuple.Item1.Distance - targetspeedChanged).IsGreater(PCCDriverData.PreviewDistanceUseCase1)) {
if (pccSegment == null && slope < minSlope) {
pccSegment = new PCCSegment() {
DistanceMinSpeed = tuple.Item1.Distance,
StartDistance = tuple.Item1.Distance - PCCDriverData.PreviewDistanceUseCase1,
StartDistance = tuple.Item1.Distance - VectoMath.Min(tuple.Item1.Distance - targetspeedChanged, PCCDriverData.PreviewDistanceUseCase1), // PCCDriverData.PreviewDistanceUseCase1,
TargetSpeed = tuple.Item1.VehicleTargetSpeed,
Altitude = tuple.Item1.Altitude,
EnergyMinSpeed = (runData.VehicleData.TotalVehicleWeight * Physics.GravityAccelleration * tuple.Item1.Altitude)
......
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