eRoute Physics Engine – Ride Cave | Ride Cave

eRoute physics engine

Physics you can feel.

Ride Cave solves Newtonian force equations every tick of your ride. Real momentum on descents, surface-aware rolling resistance, aerodynamic drag by bike type, and automatic cornering speed limits computed from your route's GPS data.

A 3D rider on a desert road in Ride Cave

The model

Force-based speed with real momentum

Your speed isn't a lookup table. It's the result of four forces acting on you and your bike, integrated over time using Euler's method. You carry speed from descents into climbs, coast when not pedaling, and decelerate naturally into corners.

Four forces in, one velocity out.

Integrated hundreds of times per second. Every tick, the engine computes the net force on the rider and integrates acceleration into velocity.

  1. Propulsion

    Your pedaling force, derived from your real-time power output. The harder you push and the slower you're going, the more force you produce.

  2. Aerodynamic Drag

    Air resistance grows with the square of your speed. Drag area varies by bike type: a time trial bike in aero position produces roughly 30% less drag than a mountain bike.

  3. Rolling Resistance

    Friction between tires and ground. Scales with rider weight and varies dramatically by surface: sand produces nearly 7x more rolling resistance than smooth road.

  4. Gravity

    Resists you on climbs, assists you on descents. Combined with momentum-based integration, this means you naturally accelerate downhill and carry speed into flat sections.

eRoute environment

Surface and bike type matter

Set your surface type and bike type when importing an eRoute. The engine adjusts rolling resistance, aerodynamic drag, and tire grip for cornering based on your selections.

Surface Types

SurfaceRolling ResistanceTire GripDescription
RoadLowHighAsphalt or concrete
GravelModerateModeratePacked gravel roads
TrailHighModerateSingletrack, dirt
GrassVery HighLowCyclocross-style
SandExtremeLowBeach, deep gravel

Bike Types

BikeAero DragDescription
RoadModerateStandard drops position
GravelModerate-HighSlightly more upright
MountainHighFlat bars, wider stance
Time TrialLowAero bars, tucked position

Cornering

Automatic cornering speed limits

The engine computes turn radii from your route's GPS data and caps speed through corners based on real tire-surface friction physics. No configuration needed: sharp turns naturally slow you down.

  1. Direction changes detected

    From GPS heading between consecutive route points.

  2. GPS noise filtered

    With a rolling average to prevent false corners from signal jitter.

  3. Turn radius estimated

    At each point along the route.

  4. Speed limited with look-ahead

    So braking starts before the turn, not in it.

  5. Momentum preserved

    You decelerate naturally into turns and accelerate out.

Speed limits

Max cornering speed by surface and radius

Lower friction surfaces (trail, sand) and tighter turns produce stronger speed caps. Road routes are nearly unaffected: the penalty only kicks in when speed is genuinely unrealistic for the turn geometry.

Turn TypeRadiusRoadGravelTrailGrassSand
Tight switchback33 ft19 mph16 mph14 mph12 mph10 mph
Sharp turn66 ft26 mph22 mph20 mph17 mph14 mph
Moderate bend164 ft41 mph35 mph31 mph27 mph22 mph
Gentle curve328 ft59 mph50 mph44 mph38 mph31 mph

Real-world impact

Subtle where it should be, realistic where it counts

Cornering penalties are generous: they only matter when your virtual speed would be genuinely unrealistic for the turn geometry. Road routes are barely affected; technical trails see meaningful realism.

0-2%Road slower (few sharp turns, high grip)
2-5%Gravel slower (winding sections, moderate grip)
5-15%Trail slower (frequent turns, lower grip)
10-20%Grass slower (tight course, low grip)
15-25%Sand slower (technical terrain, minimal grip)

Elevation

Grade pipeline

Raw GPS altitude is noisy. The engine processes it through multiple stages to produce smooth, accurate grades that drive both the trainer resistance and the virtual speed model.

  1. GPS points resampled

    At uniform intervals for consistent spacing.

  2. Altitude spikes filtered

    Isolated GPS errors from tunnels, canyons, and signal loss are automatically corrected.

  3. Switchback zones detected

    Areas where GPS horizontal error causes bad elevation readings get extra smoothing.

  4. Elevation smoothed

    With rolling averages to eliminate noise while preserving real terrain features.

  5. Grade profile pre-computed

    As a single source of truth shared across the chart, trainer, and speed model.

  6. Trainer grade smoothed

    With look-ahead for responsive but jerk-free resistance changes.

Speed models

Two models for two ride types

Momentum-Based (eRoutes)

Your speed evolves continuously based on the net force acting on you. Carry speed from descents into flats, coast when you stop pedaling, and decelerate naturally into corners and climbs.

Steady-State (ERG Workouts)

Given your current power, weight, and grade, the engine computes what speed you'd stabilize at. Used when there's no eRoute: speed responds immediately to power changes without momentum carry-over.

Trainer integration

What you see is what you feel

Your trainer resistance and virtual speed stay in sync. Surface type, bike type, and terrain grade all influence what you feel on the pedals and what you see on screen, so riding gravel actually feels heavier than riding road, and a mountain bike on trail behaves differently than a road bike on pavement.

ParameterTrainer ResistanceVirtual Speed
GradeScaled by Trainer Difficulty, smoothedRaw from grade profile (unscaled)
Surface TypeIncreases resistance on rougher surfacesHigher rolling resistance, reduced cornering grip
Bike TypeMinimal effectAdjusts aerodynamic drag by riding position

Velodrome

Track materials

The velodrome module uses separate rolling resistance coefficients for indoor track surfaces.

WoodFastest. Smooth, purpose-built timber.
ConcreteStandard outdoor velodrome surface.
TarmacRougher asphalt, typical for older tracks.

Transparency

Limitations of virtual physics

While this is a sophisticated system, it will never be perfect. Here are the known trade-offs and what they mean for your ride experience.

The physics engine errs on the side of being slightly generous rather than overly punishing. In practice, this means your virtual ride may be a bit faster than an identical real-world effort, but it should never feel artificially slow or broken.

GPS resolutionRoutes are resampled at 10-meter intervals, which matches consumer GPS accuracy. Very tight turns on mountain bike trails (under 10 meters radius) may not be fully captured, so your virtual speed through technical singletrack can be faster than real life.
Switchback detectionHairpin turns on mountain descents are detected and penalized, but the tightest switchbacks (like alpine hairpins taken at walking speed) may show a higher speed cap than reality. The system uses adaptive smoothing to better capture sharp turns, but GPS noise makes sub-10-meter features inherently fuzzy.
Downhill corneringThe engine accounts for grade reducing available tire grip in corners: steep descents into tight turns are penalized more than flat turns. However, the model simplifies real-world combined braking and cornering forces, so very steep switchback descents may still allow slightly higher speeds than a real rider would attempt.
No wind or draftingWind speed is always zero, air density is fixed at sea level, and there is no drafting model. Exposed ridgeline routes or group ride scenarios are not represented.
Surface conditionsFriction and rolling resistance are fixed per surface type. The engine does not model wet roads, loose gravel, mud, or varying trail conditions. A gravel route always rides like good packed gravel.

Ride with real physics.

Import any GPX eRoute, set your surface and bike type, and let the engine handle the rest. Momentum, drag, rolling resistance, cornering: all computed in real time from your power data.