Platforma agentów i API Mariner GPS Tools
Oblicz początkowy namiar rzeczywisty
Oblicz początkowy namiar rzeczywisty z jednej pozycji do drugiej.
Interfejsy
POST
Punkt końcowy REST
/api/v1/bearingMCP
Nazwa narzędzia
calculate_bearingŻądanie
Wyślij żądanie jako JSON. Klienci MCP przekazują te same pola, co argumenty narzędzi.
cURLshell
curl -X POST https://marinergps.tools/api/v1/bearing \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"from": {
"lat": 50.1,
"lng": -4.2
},
"to": {
"lat": 49.8,
"lng": -3.1
}
}'Treść żądaniajson
{
"from": {
"lat": 50.1,
"lng": -4.2
},
"to": {
"lat": 49.8,
"lng": -3.1
}
}Odpowiedź
REST zawija wynik obliczeń w standardową kopertę sukcesu. MCP zwraca te same dane obliczeniowe jako ustrukturyzowane dane wyjściowe narzędzia.
JSON
{
"ok": true,
"data": {
"degrees": 112.54786806700503,
"compass": "ESE"
}
}{
"ok": false,
"error": {
"code": "invalid_request",
"message": "Invalid request input."
}
}Schematy
Poniższe definicje przedstawiają kompletny schemat JSON używany do sprawdzania poprawności wejść i opisywania wyjść.
Schemat wejścia
{
"type": "object",
"additionalProperties": false,
"properties": {
"from": {
"type": "object",
"additionalProperties": false,
"properties": {
"lat": {
"type": "string",
"description": "Latitude as signed decimal degrees (-33.8688), decimal degrees with a hemisphere letter (33.8688° S), degrees and decimal minutes (33° 52.13′ S) or DMS (51° 30′ 26.4″ N). S is negative. Do not combine a sign with a hemisphere letter."
},
"lng": {
"type": "string",
"description": "Longitude as signed decimal degrees (-4.15), decimal degrees with a hemisphere letter (4.15° W), degrees and decimal minutes (4° 09.0′ W) or DMS (0° 07′ 39″ W). W is negative. Do not combine a sign with a hemisphere letter."
}
},
"required": [
"lat",
"lng"
]
},
"to": {
"type": "object",
"additionalProperties": false,
"properties": {
"lat": {
"type": "string",
"description": "Latitude as signed decimal degrees (-33.8688), decimal degrees with a hemisphere letter (33.8688° S), degrees and decimal minutes (33° 52.13′ S) or DMS (51° 30′ 26.4″ N). S is negative. Do not combine a sign with a hemisphere letter."
},
"lng": {
"type": "string",
"description": "Longitude as signed decimal degrees (-4.15), decimal degrees with a hemisphere letter (4.15° W), degrees and decimal minutes (4° 09.0′ W) or DMS (0° 07′ 39″ W). W is negative. Do not combine a sign with a hemisphere letter."
}
},
"required": [
"lat",
"lng"
]
}
},
"required": [
"from",
"to"
]
}Schemat wyjścia
{
"type": "object",
"additionalProperties": false,
"properties": {
"degrees": {
"type": "number"
},
"compass": {
"type": "string"
}
},
"required": [
"degrees",
"compass"
]
}Wyniki benchmarku MCP
Zmierzono dla tego narzędzia z podłączonym serwerem MCP Mariner GPS Tools i bez niego.
Pomiar: wrzesień 2026 · 9 modeli · przypadki nawigacyjne: 4 · 3 powtórzenia · 216 obserwacji · Produkcyjny MCP