Zum Inhalt springen
GET /v1/two-body

Two-body barycentre

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/centerofmass-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/centerofmass-api/v1/two-body" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/centerofmass-api/v1/two-body", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/centerofmass-api/v1/two-body");
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/centerofmass-api/v1/two-body",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "Two-body barycentre: r1 = d·m2/(m1+m2) from the first mass; the barycentre lies closer to the heavier body. For the Earth-Moon system it sits inside the Earth.",
        "inputs": {
            "m1": 10,
            "m2": 2,
            "separation": 12
        },
        "mass_ratio": 5,
        "distance_from_m1": 2,
        "distance_from_m2": 10
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:23.035Z",
        "request_id": "ff6e002e-b843-4134-8482-f021f3c28a57"
    },
    "status": "ok",
    "message": "Two-body barycentre",
    "success": true
}