/v1/two-body
Two-body barycentre
Probeer het live
10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.
Het werkt. Haal een API-key op en gebruik hem in je project.
Verkrijg een API-sleutelCodefragmenten
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_..."}
)
Voorbeeldrespons
Een echte respons van dit endpoint, vastgelegd bij de laatste 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
}