# Road Bearing & Turn Angle Calculator AI Agent Connect

> Road Bearing & Turn Angle Calculator MCP handles the heavy math for road centerline analysis. Your AI client uses this to transform raw waypoint sequences into actionable geometric data like segment bearings, signed turn angles, and cumulative heading progression.

## Overview
- **Category:** mathematics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_PL2ZlpNZtMR0GzvhdakjJniq1iT3r90eGNKn7r29/ai-agent-connect
- **Tags:** geometry, road, bearings, waypoints, navigation

## Description

You can hand raw waypoint data to your AI client and let this MCP do the geometric heavy lifting. Instead of manually calculating vectors or angles, you provide a path and get back a full breakdown of how that road actually moves through space. It handles the trigonometry required to turn a list of coordinates into a coherent map of bearings and turns. 

If you need a granular look at each vertex, you can pull a full report that covers bearings, turns, and heading in one go. If you only care about the direction of a specific stretch, you can pull individual segment bearings. It also handles the directional math for turns, giving you signed angles so your agent knows exactly which way a road bends at any given point. This is built for anyone working with navigation data, GIS, or autonomous pathing who needs an AI agent to interpret road geometry without writing custom math scripts each time.

## Tools

### get_cumulative_heading
This tool tracks the total rotational progression of a road path. It helps your agent understand the overall direction changes over a sequence.

### get_road_analysis_report
This tool generates a complete per-vertex breakdown of road geometry. It provides bearings, turns, and heading for each point in the path.

### get_segment_bearings
This tool calculates the absolute bearing for each segment in a path. Use it to find the specific orientation of individual road stretches.

### get_turn_geometry
This tool determines signed turn angles and directions at each waypoint. It identifies whether a turn is left or right and by how many degrees.

## Prompt Examples

**Prompt:** 
```
Analyze these waypoints: [{'latitude': 40.7128, 'longitude': -74.0060}, {'latitude': 40.7138, 'longitude': -74.0070}, {'latitude': 40.7148, 'longitude': -74.0080}].
```

**Response:** 
```
The road analysis shows a consistent bearing with a cumulative heading of 0 degrees across the segments.
```

**Prompt:** 
```
What is the turn geometry for these bearings: [45.0, 90.0, 45.0]?
```

**Response:** 
```
The first turn is a right turn with an angle of 45.0 degrees, and the second turn is a left turn with an angle of -45.0 degrees.
```

**Prompt:** 
```
Calculate the cumulative heading for bearings [10.0, 20.0, 30.0].
```

**Response:** 
```
The cumulative headings for the segments are 0.0, 10.0, and 20.0 degrees.
```

## Capabilities

### Waypoint Analysis
Your agent processes coordinate sequences to derive movement data.

### Turn Direction Detection
The MCP identifies signed turn angles to distinguish between left and right turns.

### Heading Tracking
It calculates cumulative rotational progression along a path.

### Segment Orientation
The tool finds the absolute bearing for any individual road segment.

### Vertex Reporting
It provides a full geometric breakdown for each vertex in a sequence.

## Use Cases

### Road Path Validation
Check if a proposed centerline follows the expected bearing and turn patterns.

### Navigation Data Processing
Convert a list of GPS waypoints into a structured report of road turns and headings.

### Automated Geometry Audits
Run a full analysis report on a road segment to find specific turn angles at each vertex.

### Path Progression Tracking
Monitor how much a vehicle or path rotates by calculating cumulative heading.

## Benefits

- Replaces manual trigonometric calculations with direct tool calls.
- Provides signed turn angles to clearly define turn direction.
- Generates per-vertex reports for deep geometric inspection.
- Automates the conversion of waypoints into bearing data.

## How It Works

Connect your client to Vinkius and start sending waypoint data immediately.

1. Connect your MCP-compatible client to Vinkius.
2. Provide a sequence of waypoints or bearings to your agent.
3. Your agent calls the specific tool needed for the calculation.
4. The MCP returns the geometric data like bearings or turn angles.
5. Your agent uses the results to complete the analysis or task.

## Frequently Asked Questions

**What kind of data does this MCP need?**
The MCP primarily works with sequences of waypoints or lists of bearings to perform its calculations.

**Can I get a full report of the road geometry?**
Yes, you can use the get_road_analysis_report tool to get a complete per-vertex breakdown of bearings, turns, and heading.

**How does it handle turn directions?**
The get_turn_geometry tool provides signed turn angles, which allows your agent to know the specific direction of each turn.

**Does this work with any AI client?**
It works with any MCP-compatible client like Claude, Cursor, Windsurf, or VS Code.

**Can I calculate individual segment bearings?**
Yes, the get_segment_bearings tool is designed specifically to find the absolute bearing for each segment in a path.

**What kind of data can I analyze?**
You can analyze any sequence of waypoints representing a road centerline to get bearings, turn angles, and cumulative headings.

**How are turn angles calculated?**
Turn angles are the signed difference between the current segment bearing and the preceding segment bearing, provided via `get_turn_geometry`.

**Can I get a full report at once?**
Yes, the `get_road_analysis_report` tool provides a complete per-vertex breakdown including incoming/outgoing bearings and turn directions.
