修改重定位的相机高度
This commit is contained in:
@@ -101,17 +101,17 @@ mcp = FastMCP("map-mcp", lifespan=lifespan)
|
|||||||
# ─── MCP 工具定义 ─────────────────────────────────────────────────────────────
|
# ─── MCP 工具定义 ─────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@mcp.tool()
|
@mcp.tool()
|
||||||
async def map_zoom_to(lon: float, lat: float, altitude: float = 500000.0) -> str:
|
async def map_zoom_to(lon: float, lat: float, altitude: float = 20000_000) -> str:
|
||||||
"""飞行到指定火星坐标位置。
|
"""飞行到指定火星坐标位置。
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
lon: 经度 (火星坐标, -180 ~ 180)
|
lon: 经度 (火星坐标, -180 ~ 180)
|
||||||
lat: 纬度 (火星坐标, -90 ~ 90)
|
lat: 纬度 (火星坐标, -90 ~ 90)
|
||||||
altitude: 相机高度,单位米 (默认 500km,适合查看区域全貌。近距离查看可用 50000~100000)
|
altitude: 相机高度,单位米 (默认 20000km,适合查看区域全貌。近距离查看可用 10000km)
|
||||||
"""
|
"""
|
||||||
result = await _send_cmd("zoom_to", {"lon": lon, "lat": lat, "altitude": altitude})
|
result = await _send_cmd("zoom_to", {"lon": lon, "lat": lat, "altitude": altitude})
|
||||||
if result.get("ok"):
|
if result.get("ok"):
|
||||||
return f"已飞行到 经度{lon}°, 纬度{lat}°, 高度{altitude/1000:.0f}km"
|
return f"已飞行到 经度{lon}°, 纬度{lat}°, 相机高度{altitude/1000:.0f}km"
|
||||||
return f"操作失败: {result.get('error', '未知错误')}"
|
return f"操作失败: {result.get('error', '未知错误')}"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user