unit_conversion_lengthToRadians
Convert ground distance measurements to radians for spherical geometry calculations. This tool transforms miles, kilometers, meters, or other length units into angular distances based on Earth's radius, enabling accurate geographic computations.
Instructions
将长度转换为弧度距离。
此功能将地面距离转换为对应的弧度距离(基于地球半径)。
Args: distance: 距离值 - 类型: float - 描述: 要转换的距离数值 - 示例: 100.0
Returns: str: JSON 字符串格式的弧度结果 - 类型: 包含 value 和 units 的对象 - 格式: {"value": 弧度数值, "units": "radians"} - 示例: '{"value": 0.0157, "units": "radians"}'
Raises: Exception: 当 JavaScript 执行失败、超时或输入数据格式错误时抛出异常
Example: >>> import asyncio >>> result = asyncio.run(lengthToRadians(100.0, 'kilometers')) >>> print(result) '{"value": 0.0157, "units": "radians"}'
Notes: - 基于地球半径计算弧度距离 - 常用于球面几何计算 - 依赖于 Turf.js 库和 Node.js 环境
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| distance | Yes | ||
| units | No | kilometers |