Speed unit convert
speed-unit-convert · version 1.0.0 · Units & sizes · free, no key needed
Convert an exact decimal speed among metres per second, kilometres per hour, mph, knots, and feet per second.
Use when you need to: convert speed units · metres per second to kilometres per hour · kilometres per hour to miles per hour.
Decide before calling
Read the versioned contract and the supported scope below. Reuse speed-unit-convert@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use speed-unit-convert@1.0.0 for convert speed units. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- convert speed units
- metres per second to kilometres per hour
- kilometres per hour to miles per hour
- miles per hour to knots
- knots to metres per second
- feet per second speed conversion
- exact velocity unit conversion
Not supported
- convert acceleration units
- convert pace or travel duration
- convert non-standard nautical miles
Behavior
- Input value is a non-negative ASCII decimal in plain notation with at most 30 significant digits; signs, exponent notation, whitespace, and separators are rejected.
- Conversions use exact SI definitions: 1 kilometre = 1000 metres, 1 hour = 3600 seconds, 1 international mile = 1609.344 metres, 1 international nautical mile = 1852 metres, and 1 international foot = 0.3048 metres.
- exact_numerator/exact_denominator is the reduced exact rational result; value is rounded to decimal_places digits after the point using round-half-up, including trailing zeroes.
- Unit identity conversions still reduce the input decimal to an exact fraction. The input object is never mutated.
- More than 32 UTF-8 bytes in value is limit_exceeded before decimal syntax validation; decimal_places is an integer from 0 through 18.
Input
value(string, required): min length 1; max length 32; pattern^(0|[1-9][0-9]*)(\.[0-9]+)?$from_unit(one of "metres_per_second", "kilometres_per_hour", "miles_per_hour", "knots", "feet_per_second", required)to_unit(one of "metres_per_second", "kilometres_per_hour", "miles_per_hour", "knots", "feet_per_second", required)decimal_places(integer, required): min 0; max 18
Output
value(string, required): pattern^[0-9]+(\.[0-9]+)?$unit(one of "metres_per_second", "kilometres_per_hour", "miles_per_hour", "knots", "feet_per_second", required)exact_numerator(string, required): pattern^[0-9]+$exact_denominator(string, required): pattern^[1-9][0-9]*$decimal_places(integer, required): min 0; max 18
Limits
- max value bytes: 32
- max decimal places: 18
Example
Request input:
{
"value": "1",
"from_unit": "metres_per_second",
"to_unit": "kilometres_per_hour",
"decimal_places": 3
}
Response:
{
"result": {
"value": "3.600",
"unit": "kilometres_per_hour",
"exact_numerator": "18",
"exact_denominator": "5",
"decimal_places": 3
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "speed-unit-convert",
"version": "1.0.0",
"input": {
"value": "1",
"from_unit": "metres_per_second",
"to_unit": "kilometres_per_hour",
"decimal_places": 3
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/speed-unit-convert/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"value":"1","from_unit":"metres_per_second","to_unit":"kilometres_per_hour","decimal_places":3}'
The machine-readable contract is at /v1/tools/speed-unit-convert/versions/1.0.0.
CLI
node cli.mjs run speed-unit-convert 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Area unit convert: Convert an exact decimal area among ten SI, imperial, acre, and hectare units using pinned rational factors.
- Volume unit convert: Convert exact decimal volumes among SI, cubic, US liquid, and imperial units with explicit half-even rounding.
- Pressure unit convert: Convert exact decimal pressure values among seven units and return a reduced exact fraction.
- Byte size convert: Convert a non-negative integer byte size between IEC binary units as an exact rational.
- Length convert: Convert a canonical integer length between exact SI and international customary units.
- Mass convert: Convert a canonical integer mass amount between exact nanogram-based units as a reduced rational.