Aller au contenu
GET /v1/course-to-steer

Heading to steer for a track

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/setanddrift-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/setanddrift-api/v1/course-to-steer" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/setanddrift-api/v1/course-to-steer", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/setanddrift-api/v1/course-to-steer");
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/setanddrift-api/v1/course-to-steer",
    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": "To hold a ground track against a current you must steer up-current of it: the heading = track + the drift correction, where the correction cancels the current's across-track component (sin(H−T) = −drift·sin(set−track)/STW). The resulting speed over ground is usually slower than your speed through the water when bucking a current, and faster with it behind you. If the current is stronger than your speed across the track, no heading can hold it.",
        "inputs": {
            "set_deg": 0,
            "drift_kt": 2,
            "desired_track_deg": 90,
            "speed_through_water_kt": 10
        },
        "drift_correction_deg": 11.54,
        "heading_to_steer_deg": 101.54,
        "speed_over_ground_kt": 9.8
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:58.986Z",
        "request_id": "2d89428e-6a0f-4b6d-9884-e9b23bb1e432"
    },
    "status": "ok",
    "message": "Course to steer",
    "success": true
}