{"uid":"cap_qYxureR-MQ-Vnsr4k64m7","slug":"coprocesseur-deterministe-great-circle-distance-haversine-44cf45b6","name":"coprocesseur-deterministe — Great-Circle Distance (Haversine)","description":"Trois calculs déterministes destinés aux agents IA : amortissement de prêt, distance orthodromique, conversion d'unités.\n\nChaque réponse porte son résultat, la formule appliquée, ses limites, et une empreinte SHA-256 recalculable — la chaîne exacte qui a été hachée est renvoyée avec, et `POST /verifier` permet de la contrôler gratuitement. Un même appel rend toujours la même empreinte : l'horodatage est exclu du hachage.\n\nLe paiement suit le protocole x402 (version 2), en USDC sur Base.","url":"https://x402.laboiteatubes.media/distance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["lat1","lon1","lat2","lon2"],"properties":{"lat1":{"type":"number","maximum":90,"minimum":-90},"lat2":{"type":"number","maximum":90,"minimum":-90},"lon1":{"type":"number","maximum":180,"minimum":-180},"lon2":{"type":"number","maximum":180,"minimum":-180}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"notes":["Modèle SPHÉRIQUE : l'écart avec un calcul ellipsoïdal (Vincenty / WGS84) atteint typiquement 0,3 à 0,5 %. Pour du géodésique de précision, ce service n'est pas le bon outil.","L'altitude n'est pas prise en compte : c'est une distance au niveau de la sphère de référence.","L'azimut renvoyé est le cap INITIAL ; il varie le long d'un grand cercle."],"preuve":{"note":"L'horodatage `calcule_le` est volontairement exclu de l'empreinte.","empreinte":"7052442400f9fd1c636e78e5d88ab34ccb7cf9ada9406209a860bf33096aa8e2","algorithme":"SHA-256","chaine_hachee":"{\"entrees\":{\"lat1\":48.8566,\"lat2\":45.764,\"lon1\":2.3522,\"lon2\":4.8357,\"rayon_terre_m\":6371008.8},\"formule_expression\":\"a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2) ; c = 2·atan2(√a, √(1−a)) ; d = R·c\",\"operation\":\"distance\",\"resultat\":{\"angle_central_rad\":0.061450154085,\"azimut_initial_deg\":150.5125,\"distance_km\":391.499472,\"distance_m\":391499.472,\"distance_mille_nautique\":211.392804},\"version_formule\":\"haversine@1.0.0\"}","champs_couverts":["operation","version_formule","entrees","resultat","formule_expression"],"canonicalisation":"JSON à clés triées récursivement, sans espace, encodé en UTF-8"},"entrees":{"lat1":48.8566,"lat2":45.764,"lon1":2.3522,"lon2":4.8357,"rayon_terre_m":6371008.8},"formule":{"reference":"R. W. Sinnott, « Virtues of the Haversine », Sky & Telescope, 1984.","variables":{"R":"rayon terrestre moyen, 6371008.8 m","d":"distance orthodromique en mètres","Δφ, Δλ":"différences de latitude et de longitude, en radians","φ₁, φ₂":"latitudes des deux points, en radians"},"expression":"a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2) ; c = 2·atan2(√a, √(1−a)) ; d = R·c","description":"Formule de haversine : distance sur un modèle sphérique de la Terre, le long du grand cercle."},"service":"coprocesseur-deterministe","resultat":{"distance_m":391499.472,"distance_km":391.499472,"angle_central_rad":0.061450154085,"azimut_initial_deg":150.5125,"distance_mille_nautique":211.392804},"operation":"distance","calcule_le":"2026-08-16T08:29:39.318Z","version_formule":"haversine@1.0.0","version_service":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GX1U7vgj11bPQOYm_dxZ4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the great-circle (orthodromic) distance between two geographic coordinates using the Haversine formula on a spherical Earth model, returning distance in km, m, and nautical miles, initial bearing, central angle, and a verifiable SHA-256 proof.","exampleAgentPrompt":"What is the great-circle distance between Paris (48.8566°N, 2.3522°E) and Lyon (45.764°N, 4.8357°E)? I need it in kilometres and nautical miles, and I'd like the initial bearing and a SHA-256 proof I can verify.","exampleUseCases":[{"title":"Flight planning distance check","prompt":"What's the great-circle distance from London Heathrow (51.4775°N, 0.4614°W) to New York JFK (40.6413°N, 73.7781°W)? Give me the result in kilometres, nautical miles, and the initial bearing, with a verifiable fingerprint."},{"title":"Delivery radius eligibility","prompt":"Can you calculate the surface distance between our warehouse at 48.8566°N, 2.3522°E and a customer at 48.6921°N, 6.1844°E so I can check whether they fall within our 300 km delivery zone? I want the result in metres and kilometres."},{"title":"Maritime route estimation","prompt":"I need the orthodromic distance and initial compass bearing from Cape Town (33.9249°S, 18.4241°E) to Buenos Aires (34.6037°S, 58.3816°W) in kilometres and nautical miles, plus a SHA-256 proof hash so I can confirm the calculation is deterministic."}],"resultDescription":"A JSON object containing: distance in metres, kilometres, and nautical miles; the central angle in radians; the initial azimuth/bearing in degrees; the applied Haversine formula expression with variable definitions; a SHA-256 proof block with the exact canonical string that was hashed (recursively sorted JSON keys, no spaces) and the fields covered — allowing independent verification that the result has not changed.","failureModes":["Missing required query parameter (lat1, lon1, lat2, or lon2) — returns 400 Bad Request","Latitude out of range [-90, 90] or longitude out of range [-180, 180] — returns 400 validation error","Payment not included or insufficient (x402 protocol) — returns 402 Payment Required","Identical input points return distance 0 and undefined azimuth","Antipodal or near-antipodal points may have numerically unstable azimuth values"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, auditable great-circle distance computation whose result can be independently verified via the included SHA-256 proof. It is ideal for AI agents and automated pipelines that require reproducible, provenance-tracked geographic calculations at low cost ($0.001 USDC). Use it when accuracy within ~0.3–0.5% (spherical vs ellipsoidal) is acceptable. Prefer an ellipsoidal (Vincenty/WGS84) service instead when sub-millimetre geodetic precision is required. Sibling endpoints on the same service cover loan amortisation and unit conversion under the same verifiable proof pattern.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:37:50.400Z","isFirstParty":false,"canonicalSlug":"coprocesseur-deterministe-great-circle-distance-haversine-44cf45b6"}