Vai al contenuto
GET /v1/two-body

Two-body barycentre

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/centerofmass-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}