Skip to content

Wrong slope force calculation for flipped vehicles #890

Description

@xmnovotny

When vehicle is flipped, slope force (and acceleration/power needed) is calculated as on opposite direction - going downhill will slow down the vehicle and vice versa.

Steps to reproduce
Build long slope, long doubleheaded train and observe speed, acceleration and power needed for going uphill and downhill after whole train reverse its direction.

Build version
0.86.1.0

Platform
Windows 10

Reproducibility
Everytime

Fix
In function Vehicle.GetSlopeForce multiply whole result by -1 when Vehicle.IsFlipped and subresults by -1 when VehicleUnit.IsFlipped

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions