FA
API & MCPمستندات

پلتفرم عامل‌ها و API Mariner GPS Tools

محاسبهٔ سمت حقیقی اولیه

محاسبهٔ سمت حقیقی اولیه از یک موقعیت به موقعیت دیگر.

رابط ها

POST
نقطه پایانی REST/api/v1/bearing
MCP
نام ابزارcalculate_bearing

درخواست کنید

درخواست را به عنوان JSON ارسال کنید. مشتریان MCP همان فیلدها را به عنوان آرگومان های ابزار ارسال می کنند.

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
  }
}'
درخواست بدنjson
{
  "from": {
    "lat": 50.1,
    "lng": -4.2
  },
  "to": {
    "lat": 49.8,
    "lng": -3.1
  }
}

پاسخ

REST نتیجه محاسبات را در پاکت استاندارد موفقیت قرار می دهد. MCP همان داده های محاسباتی را به عنوان خروجی ابزار ساخت یافته برمی گرداند.

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

طرحواره ها

تعاریف زیر طرح کامل JSON را نشان می دهد که برای اعتبارسنجی ورودی ها و توصیف خروجی ها استفاده می شود.

شِمای ورودی

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

شِمای خروجی

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

نتایج بنچمارک MCP

برای این ابزار، با اتصال سرور MCP ‏Mariner GPS Tools و بدون آن اندازه‌گیری شده است.

92%توکن تولیدشدهٔ کمتر توسط مدلمیانه این ابزار در میان 8 مدل از 9 مدلی که نتایج پایه صحیح کافی برای مقایسه داشتند.
5.2×سریع‌تر در بنچمارک‌هامیانه این ابزار در میان 8 مدل از 9 مدلی که نتایج پایه صحیح کافی برای مقایسه داشتند.
100%پاسخ درست با MCP، در برابر 93.5% بدون ابزار108/108 مشاهدهٔ MCP برای این ابزار در محدودهٔ رواداری.

اندازه‌گیری‌شده در 1405 شهریور · 9 مدل · 4 مورد ناوبری · 3 تکرار · 216 مشاهده · MCP عملیاتی

مستندات API و MCP