ID
API & MCPDokumentasi

Platform Agen & API Mariner GPS Tools

Hitung arah sejati awal

Hitung arah sejati awal dari satu posisi ke posisi lainnya.

Antarmuka

POST
Titik akhir REST/api/v1/bearing
MCP
Nama alatcalculate_bearing

Permintaan

Kirim permintaan sebagai JSON. Klien MCP meneruskan bidang yang sama dengan argumen alat.

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
  }
}'
Permintaan tubuhjson
{
  "from": {
    "lat": 50.1,
    "lng": -4.2
  },
  "to": {
    "lat": 49.8,
    "lng": -3.1
  }
}

Respon

REST membungkus hasil perhitungan dalam amplop keberhasilan standar. MCP mengembalikan data penghitungan yang sama sebagai keluaran alat terstruktur.

JSON
{
  "ok": true,
  "data": {
    "degrees": 112.54786806700503,
    "compass": "ESE"
  }
}

Skema

Definisi di bawah ini menunjukkan Skema JSON lengkap yang digunakan untuk memvalidasi masukan dan menjelaskan keluaran.

Skema input

{
  "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"
  ]
}

Skema output

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "degrees": {
      "type": "number"
    },
    "compass": {
      "type": "string"
    }
  },
  "required": [
    "degrees",
    "compass"
  ]
}

Hasil benchmark MCP

Diukur untuk alat ini dengan dan tanpa server MCP Mariner GPS Tools terpasang.

92%lebih sedikit token yang dihasilkan modelMedian untuk alat ini di antara 8 dari 9 model yang memiliki cukup hasil baseline yang benar untuk dibandingkan.
5,2×lebih cepat dalam benchmarkMedian untuk alat ini di antara 8 dari 9 model yang memiliki cukup hasil baseline yang benar untuk dibandingkan.
100%benar dengan MCP, dibandingkan 93,5% tanpa alat108/108 observasi MCP untuk alat ini berada dalam toleransi.

Diukur September 2026 · 9 model · 4 kasus navigasi · 3 pengulangan · 216 observasi · MCP produksi

Dokumentasi API & MCP