ride-height-calculator
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Calculate vehicle ride height accounting for progressive springs, strut geometry angles, and tire deflection.
| Method | Path | Description |
|---|---|---|
GET | / | API documentation page |
GET | /calculate?weight=1400&springF=35 | Calculate with query params |
POST | /calculate | Calculate with JSON body |
All parameters are optional — sensible defaults are used for any omitted values.
| Param | Default | Description |
|---|---|---|
weight | 1350 | Vehicle weight (kg) |
distFront | 58 | Front weight distribution (%) |
springF | 32 | Front spring rate (N/mm) |
springR | 28 | Rear spring rate (N/mm) |
progStart | 30 | Progressive spring engagement point (mm) |
progFactor | 1.5 | Spring progression multiplier |
angleF | 15 | Front strut angle (°) |
angleR | 10 | Rear strut angle (°) |
tireW | 205 | Tire width (mm) |
tireA | 55 | Tire aspect ratio (%) |
tireR | 16 | Rim diameter (inches) |
tireP | 32 | Tire pressure (psi) |
target | 180 | Target ride height (mm) |
{ "result": { "vehicle": { "weightKg": 1350, "distFront": 58 }, "front": { "springRate": 48, "wheelRate": 3.2, "compression": 80, "tireDeflection": 75.8, "rideHeight": 183, "groundClearance": 133 }, "rear": { ... }, "difference": 4, "status": "OK" }, "timestamp": "2026-04-14T12:56:41.052Z" }
Status values: OK (< 5mm diff), WARN (5–15mm), FAIL (> 15mm)
Rendering mermaid diagram...
- calc/springs.ts — Progressive rate calculation, compression solver, wheel rate conversion
- calc/tires.ts — Tire deflection estimation from dimensions and pressure
- calc/ride-height.ts — Orchestrates all calculations into a final result
- shared/types.ts — TypeScript interfaces for params and results