|
|
||
|---|---|---|
| __pycache__ | ||
| README.md | ||
| main.py | ||
| openapi.yaml | ||
| radar_service.py | ||
| requirements.txt | ||
README.md
雷达预警服务
提供雷达设置和实时探测预警功能。
启动服务
pip install -r requirements.txt
python main.py
服务启动后访问:
- API:http://localhost:8000
- Swagger文档:http://localhost:8000/docs
- ReDoc文档:http://localhost:8000/redoc
API 接口
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /radar/config |
获取雷达配置(部署在北京,半径2km) |
使用示例
获取雷达配置
curl http://localhost:8000/radar/config
返回:
{
"latitude": 39.9042,
"longitude": 116.4074,
"range_km": 2
}