JA
API & MCPドキュメント

Mariner GPS Tools エージェント & API プラットフォーム

クロストラックエラー(XTE)を計算

ある位置から大圏航路までの垂直距離を計算します。

インターフェース

POST
REST エンドポイント/api/v1/xte
MCP
ツール名calculate_cross_track_error

リクエスト

リクエストを JSON として送信します。 MCP クライアントは、同じフィールドをツール引数として渡します。

cURLshell
curl -X POST https://marinergps.tools/api/v1/xte \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "start": {
    "lat": 50,
    "lng": -4
  },
  "end": {
    "lat": 50,
    "lng": -2
  },
  "position": {
    "lat": 50.2,
    "lng": -3
  }
}'
リクエストボディjson
{
  "start": {
    "lat": 50,
    "lng": -4
  },
  "end": {
    "lat": 50,
    "lng": -2
  },
  "position": {
    "lat": 50.2,
    "lng": -3
  }
}

応答

REST は、計算結果を標準の成功エンベロープにラップします。MCP は、同じ計算データを構造化されたツール出力として返します。

JSON
{
  "ok": true,
  "data": {
    "xte": {
      "km": 21.761189017395775,
      "nm": 11.75010633826597,
      "mi": 13.52177178092823,
      "m": 21761.189017395776,
      "ft": 71394.95500330106
    },
    "side": "port",
    "alongTrack": {
      "km": 71.47269030854304,
      "nm": 38.592179440929975,
      "mi": 44.4110570497097,
      "m": 71472.69030854304,
      "ft": 234490.3812224672
    },
    "remaining": {
      "km": 71.47269030856953,
      "nm": 38.59217944094428,
      "mi": 44.41105704972615,
      "m": 71472.69030856952,
      "ft": 234490.3812225541
    },
    "nearestPoint": {
      "lat": 50.00429719577797,
      "lng": -3.0000000000002274
    },
    "beforeStart": false,
    "beyondEnd": false
  }
}

スキーマ

以下の定義は、入力の検証と出力の説明に使用される完全な JSON スキーマを示しています。

入力スキーマ

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "start": {
      "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"
      ],
      "description": "Track start waypoint (A)."
    },
    "end": {
      "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"
      ],
      "description": "Track end waypoint (B)."
    },
    "position": {
      "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"
      ],
      "description": "Vessel position (P)."
    }
  },
  "required": [
    "start",
    "end",
    "position"
  ]
}

出力スキーマ

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "xte": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "nm": {
          "type": "number"
        },
        "mi": {
          "type": "number"
        },
        "km": {
          "type": "number"
        },
        "m": {
          "type": "number"
        },
        "ft": {
          "type": "number"
        }
      },
      "required": [
        "nm",
        "mi",
        "km",
        "m",
        "ft"
      ],
      "description": "Cross track error magnitude — perpendicular distance from position to track."
    },
    "side": {
      "type": "string",
      "enum": [
        "port",
        "starboard",
        "on-track"
      ],
      "description": "Side of the track the position lies on, travelling start → end."
    },
    "alongTrack": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "nm": {
          "type": "number"
        },
        "mi": {
          "type": "number"
        },
        "km": {
          "type": "number"
        },
        "m": {
          "type": "number"
        },
        "ft": {
          "type": "number"
        }
      },
      "required": [
        "nm",
        "mi",
        "km",
        "m",
        "ft"
      ],
      "description": "Distance from start along the track to the point abeam of the position. Negative when the position is abeam a point behind the start."
    },
    "remaining": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "nm": {
          "type": "number"
        },
        "mi": {
          "type": "number"
        },
        "km": {
          "type": "number"
        },
        "m": {
          "type": "number"
        },
        "ft": {
          "type": "number"
        }
      },
      "required": [
        "nm",
        "mi",
        "km",
        "m",
        "ft"
      ],
      "description": "Distance remaining along the track from the abeam point to the end waypoint."
    },
    "nearestPoint": {
      "type": "object",
      "additionalProperties": false,
      "description": "Nearest point on the track (foot of the perpendicular), decimal degrees.",
      "properties": {
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        }
      },
      "required": [
        "lat",
        "lng"
      ]
    },
    "beforeStart": {
      "type": "boolean",
      "description": "True when the abeam point falls before the start waypoint."
    },
    "beyondEnd": {
      "type": "boolean",
      "description": "True when the abeam point falls beyond the end waypoint."
    }
  },
  "required": [
    "xte",
    "side",
    "alongTrack",
    "remaining",
    "nearestPoint",
    "beforeStart",
    "beyondEnd"
  ]
}

MCP ベンチマーク結果

このツールについて、Mariner GPS Tools MCP サーバーを接続した場合と接続しない場合で測定しました。

96%モデル生成トークンを削減比較に十分な正しいベースライン結果が得られた全9モデル中7モデルについて、このツールの中央値を算出しています。
11×ベンチマークで高速化比較に十分な正しいベースライン結果が得られた全9モデル中7モデルについて、このツールの中央値を算出しています。
100%MCP 使用時の正答率、ツールなしでは 78.5%このツールの MCP 観測 135 件中 135 件が許容誤差内。

2026年9月測定 · 9 モデル · 航法ケース 5 件 · 3 回反復 · 観測 270 件 · 本番 MCP

API および MCP ドキュメント