Unify Visual and Physics Superelevation
Currently there are two types of superelevation in OR, physics (used for calculating curve resistance, passenger comfort, and derailment risk) and visual (used to add 3D superelevation to tracks and cause rail vehicles to visually roll left or right on curves). Despite theoretically representing the same thing, these two systems function entirely independently and regularly produce different values of superelevation (the visual amount of tilting seen on a train has no bearing on the amount of tilting considered by the physics).
This is because each system calculates superelevation in entirely different ways; physics superelevation depends on arbitrary user-given values as a function of curve radius while visual superelevation calculates the ideal amount of superelevation for a train going at the route's max speed. Not only do these disagree, neither method will reliably produce correct superelevation as both fail to consider the actual speed of the curve. Visual superelevation will almost always overestimate superelevation because it uses the route max speed, while physics superelevation is often insufficient for passenger comfort at high speeds.
For consistency and accuracy, the rendering of visual superelevation should be changed to match the amount of physical superelevation (where possible, it is not possible to add superelevation to some track sections such as tunnels and switches), and new calculations should be employed to determine the value of superelevation using the same methods as real railroads (considering track speed, cant deficiency, runoff rate, etc).
Specific changes should include:
- Give a new way to define superelevation (in the .trk or similar) using real design parameters such as cant deficiency, min and max superelevation, accuracy of construction, and so on (see documents such as this: https:/
- Replace all superelevation calculations with the standard superelevation equation which considers track radius, track speed (use the local speed limit, not the route max speed), track gauge, and cant deficiency for both passenger and freight trains
- Remove artificial smoothing on superelevation, limit rate of change based on runoff rate and related real design parameters instead
- Cache all superelevation calculations so they can be used by all game systems without recalculation in real time
- Anticipate future support to define superelevation in a route editor by adding some way to bypass superelevation calculations and use a predefined value instead
- Generate 3D superelevated track using the same values of superelevation (where possible) instead of recalculating with a different method
- Allow 3D superelevation to be generated by raising the outer rail, lowering the inner rail, or both (current method is both)
- Adjust bogie & train car positioning code to handle changes to the superelevation system and improve overall accuracy of track following
- And remove/resolve the multiple bugs and workarounds present in the superelevation system
Discussion for this refactor started from the discussion about superelevation track profiles: https:/
Discussion has also revealed desire for clothoid easements, which would make curves and superelevation smoother, but this is outside the scope of refactoring superelevation.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Phillip Schlichting
- Direction:
- Needs approval
- Assignee:
- Phillip Schlichting
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by