calculate_banking_angle
Compute the ideal banking angle for a curve given speed and radius, ensuring no friction is needed to maintain the turn.
Instructions
Calculate ideal banking angle: θ = arctan(v² / (rg)).
For a banked curve, the ideal angle where no friction is needed
to maintain the turn at a given speed.
Args:
velocity: Speed in m/s
radius: Turn radius in meters
gravity: Gravitational acceleration in m/s² (default 9.81)
Returns:
Dict containing:
- angle_radians: Banking angle in radians
- angle_degrees: Banking angle in degrees
Tips for LLMs:
- Faster speed → steeper banking angle
- Tighter turn → steeper banking angle
- NASCAR tracks banked ~30° for high-speed turns
- At ideal angle, normal force provides all centripetal force
Example - Highway exit ramp:
result = await calculate_banking_angle(
velocity=25, # m/s (90 km/h)
radius=100 # meter radius turn
)
# θ ≈ 32.5°
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| velocity | Yes | ||
| radius | Yes | ||
| gravity | No |
Implementation Reference
- MCP tool-decorated async wrapper for calculate_banking_angle. Acts as the public endpoint, validates via BankingAngleRequest, delegates to core calculate_banking_angle, and returns dict.
@tool # type: ignore[arg-type] async def calculate_banking_angle( velocity: float, radius: float, gravity: float = 9.81, ) -> dict: """Calculate ideal banking angle: θ = arctan(v² / (rg)). For a banked curve, the ideal angle where no friction is needed to maintain the turn at a given speed. Args: velocity: Speed in m/s radius: Turn radius in meters gravity: Gravitational acceleration in m/s² (default 9.81) Returns: Dict containing: - angle_radians: Banking angle in radians - angle_degrees: Banking angle in degrees Tips for LLMs: - Faster speed → steeper banking angle - Tighter turn → steeper banking angle - NASCAR tracks banked ~30° for high-speed turns - At ideal angle, normal force provides all centripetal force Example - Highway exit ramp: result = await calculate_banking_angle( velocity=25, # m/s (90 km/h) radius=100 # meter radius turn ) # θ ≈ 32.5° """ from ..circular_motion import BankingAngleRequest, calculate_banking_angle as calc_bank request = BankingAngleRequest( velocity=velocity, radius=radius, gravity=gravity, ) response = calc_bank(request) return response.model_dump()