Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_projectile_with_drag

Calculate realistic projectile trajectories by modeling air resistance, spin effects, wind, and altitude-based air density changes for sports balls and other objects.

Instructions

Calculate projectile motion including air resistance (drag).

Uses numerical integration (RK4) to solve motion equations with:
- Quadratic drag force: F_drag = 0.5 * ρ * v² * Cd * A
- Magnus force (spin effects): F_magnus = 0.5 * ρ * Cl * A * ω * r * v
- Wind effects (constant wind vector)
- Variable air density (altitude and temperature effects)

This provides REALISTIC trajectories for sports balls, projectiles,
and other objects moving through air or water. Compare with
calculate_projectile_motion (no drag) to see dramatic differences!

Common drag coefficients (Cd):
    - Sphere: 0.47 (default)
    - Baseball: 0.4
    - Golf ball: 0.25 (dimples reduce drag)
    - Football (American): 0.05-0.15 (orientation-dependent)
    - Basketball: 0.55
    - Soccer ball: 0.25
    - Skydiver (belly-down): 1.0-1.3
    - Streamlined car: 0.25-0.35

Args:
    initial_velocity: Launch velocity in m/s
    angle_degrees: Launch angle in degrees (0-90)
    mass: Object mass in kg
    cross_sectional_area: Cross-section perpendicular to motion in m²
    initial_height: Launch height in meters (default 0)
    drag_coefficient: Drag coefficient Cd (default 0.47 for sphere)
    fluid_density: Fluid density in kg/m³ (air=1.225, water=1000)
    gravity: Gravitational acceleration m/s² (default 9.81)
    time_step: Integration time step in seconds (default 0.01)
    max_time: Maximum simulation time in seconds (default 30)
    spin_rate: Spin rate in rad/s for Magnus force (default 0, no spin)
    spin_axis: Spin axis unit vector [x, y, z] (default [0, 0, 1] = vertical)
    wind_velocity: Wind velocity [vx, vy] in m/s (default [0, 0], no wind)
    altitude: Altitude above sea level in meters (default 0, affects air density)
    temperature: Air temperature in Celsius (default 15, affects air density)

Returns:
    Dict containing:
        - max_height: Maximum altitude reached (m)
        - range: Horizontal distance traveled (m)
        - time_of_flight: Total flight time (s)
        - impact_velocity: Speed at landing (m/s)
        - impact_angle: Angle at landing (degrees below horizontal)
        - trajectory_points: [[x, y], ...] for plotting
        - energy_lost_to_drag: Energy dissipated by drag (J)
        - initial_kinetic_energy: Initial KE (J)
        - final_kinetic_energy: Final KE (J)
        - lateral_deflection: Lateral deflection from spin/wind (m)
        - magnus_force_max: Maximum Magnus force magnitude (N)
        - wind_drift: Total wind drift (m)
        - effective_air_density: Effective air density used (kg/m³)

Example - Baseball curveball (2500 rpm backspin):
    result = await calculate_projectile_with_drag(
        initial_velocity=40.23,  # 90 mph
        angle_degrees=10,
        mass=0.145,
        cross_sectional_area=0.0043,
        drag_coefficient=0.4,
        spin_rate=261.8,  # 2500 rpm = 261.8 rad/s
        spin_axis=[0, 0, 1]  # Backspin (vertical axis)
    )
    # Backspin increases range and height!

Example - Golf ball at altitude (Denver, 1600m):
    result = await calculate_projectile_with_drag(
        initial_velocity=70,
        angle_degrees=12,
        mass=0.0459,
        cross_sectional_area=0.00143,
        drag_coefficient=0.25,
        altitude=1600,  # Denver elevation
        temperature=20  # Summer day
    )
    # Less air resistance = longer drive!

Example - Soccer free kick with wind:
    result = await calculate_projectile_with_drag(
        initial_velocity=25,
        angle_degrees=15,
        mass=0.43,
        cross_sectional_area=0.0388,
        drag_coefficient=0.25,
        wind_velocity=[5, 0],  # 5 m/s tailwind
        spin_rate=50,  # Sidespin for curve
        spin_axis=[0, 1, 0]  # Horizontal axis
    )
    # Wind drift + Magnus curve!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initial_velocityYes
angle_degreesYes
massYes
cross_sectional_areaYes
initial_heightNo
drag_coefficientNo
fluid_densityNo
gravityNo
time_stepNo
max_timeNo
spin_rateNo
spin_axisNo[0, 0, 1]
wind_velocityNo[0, 0]
altitudeNo
temperatureNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so well by detailing the numerical method (RK4), force equations (drag, Magnus), effects (wind, altitude, temperature), and realistic applications. It lacks explicit rate limits or error handling, but covers behavioral aspects thoroughly for a simulation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with key information (purpose, method, forces), followed by parameter details and examples. Some sections like the drag coefficient list are lengthy but informative, and the structure is logical, though it could be slightly more condensed in parts.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (15 parameters, no annotations, no output schema), the description is highly complete. It explains the tool's purpose, usage, behavioral traits, all parameters with semantics, and includes a detailed returns section with output values, plus multiple practical examples, leaving no significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description compensates fully by listing all 15 parameters with detailed explanations, units, default values, and practical examples. It adds significant meaning beyond the schema, such as common drag coefficients and example values, making parameters well-understood.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool calculates projectile motion with air resistance using numerical integration (RK4), specifying it includes drag, Magnus force, wind effects, and variable air density. It distinguishes from sibling 'calculate_projectile_motion' by emphasizing realistic trajectories with drag, making the purpose specific and differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool vs alternatives: 'Compare with calculate_projectile_motion (no drag) to see dramatic differences!' and provides context for realistic trajectories in sports balls, projectiles, and fluids. It offers clear guidance on usage scenarios with examples, making it highly effective for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IBM/chuk-mcp-physics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server