- 新增可选 boosters 字段:一级仍登记含助推器的合计值,芯级由减法推导, 助推器分离与一级关机时序不再互相顶牛;无该字段时物理完全退回旧模型 - 物理循环抽到 physics.ts / stageSplit.ts,可用脚本批量验证全部型号时序 - 阿丽亚娜6 的一级本就是 P120C 助推组、长征六号甲公开推力口径矛盾, 两者不登记拆分,避免芯级重复计算或分离后推重比不足 - 仪表台删掉左下角环境卡,发动机仪表按真实直径比例逐舱画在同一行 - 管理端菜单预置服务幂等补入「火箭发射事件」,新增对应只读页面 |
||
|---|---|---|
| .. | ||
| app | ||
| upload/assets | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| README.md | ||
| de421.bsp | ||
| pip.conf | ||
| requirements.txt | ||
README.md
Cosmo Backend
Backend API for the Cosmo deep space explorer visualization system.
Setup
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Copy environment file:
cp .env.example .env
Running
Start the development server:
cd backend
python -m app.main
Or using uvicorn directly:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
The API will be available at:
- API: http://localhost:8000/api
- Docs: http://localhost:8000/docs
- Health: http://localhost:8000/health
API Endpoints
Get Celestial Positions
GET /api/celestial/positions
Query parameters:
start_time: ISO 8601 datetime (optional)end_time: ISO 8601 datetime (optional)step: Time step, e.g., "1d", "12h" (default: "1d")
Example:
http://localhost:8000/api/celestial/positions?start_time=2025-01-01T00:00:00Z&end_time=2025-01-10T00:00:00Z&step=1d
Get Body Info
GET /api/celestial/info/{body_id}
Example:
http://localhost:8000/api/celestial/info/-31
List All Bodies
GET /api/celestial/list
Clear Cache
POST /api/celestial/cache/clear