Back

#cycling

3 APIs with this tag

Spoke Length & Wheel API

Bicycle wheel-building maths as an API, computed locally and deterministically — the spoke-length and tension numbers a wheelbuilder laces a wheel by. The spoke endpoint runs the classic spoke-length formula from the hub and rim geometry: L = √(R² + r² + f² − 2·R·r·cos θ) − hole ÷ 2, where R is half the effective rim diameter (ERD), r is half the hub flange diameter, f is the centre-to-flange offset and θ = crosses × 720° ÷ spokes — so a 602 mm ERD rim on a 45 mm flange at 35 mm offset, 32 spokes laced 3-cross (a 67.5° crossing angle), needs a 293.9 mm spoke. It handles radial (0-cross) builds and computes the drive and non-drive sides separately from their own offsets, since a dished wheel’s two sides differ. The bracing endpoint gives each side’s bracing angle = atan(offset ÷ (ERD/2)) — the lever that resists side loads — and the resulting tension ratio, because the side with the smaller offset must carry higher tension, which is why a rear wheel’s non-drive spokes (often only about half the drive-side tension) go slack first. Everything is computed locally and deterministically, so it is instant and private. Ideal for bike-shop, wheelbuilding, cycling and bike-fit app developers, spoke-calculator and build-sheet tools, and component-database software. Pure local computation — no key, no third-party service, instant. Millimetres. Live, nothing stored. 2 compute endpoints. For gear inches or gearing use a bicycle-gear API.

api.oanor.com/spokelength-api

Bicycle Gear API

Bicycle gearing maths as an API, computed locally and deterministically. The gear endpoint takes a chainring and cog tooth count and a wheel size and returns every common gearing metric: the gear ratio, gear inches (the classic measure — ratio times wheel diameter in inches), the gain ratio (Sheldon Brown's crank-length-aware measure), the development or rollout (metres travelled per crank revolution), and the road speed at a chosen cadence in km/h and mph. The speed endpoint converts between a gear-and-cadence and road speed in either direction — the speed at a cadence, or the cadence needed for a target speed. The table endpoint builds a gear chart: give one or more chainrings and a cassette of cogs and it returns a matrix of gear inches, development, gain ratio or ratio for every combination — ideal for visualising a drivetrain. Wheel size can be a preset (700x25c, 26-inch, 29er and more) or an exact rolling circumference in millimetres, and crank length is configurable for the gain ratio. Everything is computed locally and deterministically, so it is instant and private. Ideal for cycling apps and bike-fit tools, drivetrain and gear-ratio planners, and bike-shop and component sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is bicycle gearing; for cycling power, FTP and training zones use a cycling API.

api.oanor.com/bikegear-api

Cycling Performance API

Cycling performance maths as an API. The power endpoint estimates the power in watts needed to ride at a given speed on a given gradient, from a physical model — rolling resistance, gravity on the climb, and aerodynamic drag — with sensible defaults you can override (rolling-resistance coefficient, drag area CdA, air density, drivetrain efficiency and headwind), and breaks the power down into its rolling, gravity and aero components plus watts-per-kilogram. The ftp-zones endpoint turns a Functional Threshold Power into the seven Coggan training zones, from active recovery to neuromuscular power, as watt ranges. The vam endpoint computes VAM — vertical ascent metres per hour, the climbing-speed metric — either from elevation gained and time, or from speed and gradient. Everything is computed locally and deterministically, so it is instant and private. Ideal for cycling and training apps, bike computers and power-meter tools, coaching, and route and climb analysis. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is cycling maths; for running pace use a pace API and for heart-rate training zones use a heart-rate API.

api.oanor.com/cycling-api