Skip to main content
Glama
chrishayuk

Physics MCP Server

by chrishayuk

calculate_average_speed

Calculate average speed from position and time data to analyze motion along a path, returning speed, distance, time, and displacement metrics.

Instructions

Calculate average speed along a path.

Average speed = total distance / total time
(Distance is path length, not displacement)

Args:
    positions: Position vectors [[x,y,z], ...] in meters (or JSON string)
    times: Time values in seconds (or JSON string)

Returns:
    Dict containing:
        - average_speed: Average speed in m/s
        - total_distance: Total path length in meters
        - total_time: Total elapsed time in seconds
        - displacement_magnitude: Straight-line displacement in meters
        - displacement: Displacement vector [x,y,z] in meters

Example - Car on winding road:
    result = await calculate_average_speed(
        positions=[[0,0,0], [10,5,0], [20,10,0], [15,20,0]],
        times=[0, 10, 20, 30]
    )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
positionsYes
timesYes

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/chrishayuk/chuk-mcp-physics'

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