AR
API & MCPالتوثيق

منصة Mariner GPS Tools للوكلاء وAPI

حساب الاتجاه الحقيقي الابتدائي

حساب الاتجاه الحقيقي الابتدائي من موقع إلى آخر.

واجهات

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 لهذه الأداة ضمن هامش التفاوت المسموح.

تاريخ القياس: سبتمبر 2026 · 9 نماذج · 4 حالات ملاحية · 3 تكرارات · 216 مشاهدة · MCP الإنتاجي

وثائق API وMCP