Aller au contenu
GET /v1/resistance

Grade and curve resistance

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/railway-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/railway-api/v1/resistance" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/railway-api/v1/resistance", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/railway-api/v1/resistance");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/railway-api/v1/resistance",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "Grade resistance is the dominant force on a hill: about 20 lb per ton per 1 % of grade (it is just the weight component along the slope), so a 5,000-ton train on a 1 % grade fights 100,000 lbf before it even rolls. Curve resistance adds roughly 0.8 lb per ton per degree of curve from wheel-flange friction. This excludes the speed-dependent rolling/air resistance (the Davis equation), which dominates on the flat at speed.",
        "inputs": {
            "grade_pct": 1,
            "curve_degrees": 2,
            "train_weight_tons": 5000
        },
        "curve_resistance_lbf": 8000,
        "grade_resistance_lbf": 100000,
        "total_resistance_lbf": 108000
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:58.201Z",
        "request_id": "ff365eab-6c3d-44e9-abe2-2f1f144f5038"
    },
    "status": "ok",
    "message": "Resistance",
    "success": true
}