Skip to main content

星网(GW)卫星星座数据仪表盘

Project description

GW Dashboard

GW Dashboard logo

PyPI Version Python Version License Publish

星网(GW)卫星星座数据仪表盘

基于互联网公开信息,自动化收集星网/国网星座的运行与发射数据,提供可视化仪表盘和交互式地图展示。

GW Dashboard 示例

功能特性

  • 数据仪表盘 — 卫星与发射统计总览、制造商/火箭分布图表
  • 交互式地图 — 卫星实时位置与轨迹展示,支持 LEO 覆盖范围可视化
  • 轨道追踪 — 前端基于 SGP4/TLE 实时解算卫星轨道,近地点/远地点历史图表
  • 自动更新 — 后台守护进程定期爬取最新 TLE 数据,无需手动干预
  • 多数据库支持 — SQLite / MySQL / PostgreSQL 三种后端可选

快速开始

安装

# 从 PyPI 安装(推荐)
pip install gw-dashboard

# 或从源码安装
git clone https://github.com/NearlyHeadlessJack/gw-dashboard.git
cd gw-dashboard
uv sync

遇到安装问题?参见 安装指南,涵盖 Windows、Linux(虚拟环境 / pipx / uv)和 macOS 的详细说明。

运行

# PyPI 安装后直接运行
gw-dashboard

# 从源码运行
uv run -m gw

# 开发模式(启动前自动构建前端,需要 Node.js)
uv run -m gw -d

首次运行时,如果数据库不存在,程序会自动爬取数据并初始化,然后启动 Web 服务。控制台会打印访问 URL。

配置

默认无需配置文件即可运行(使用 SQLite)。如需自定义,复制示例配置:

cp config.example.yaml config.yaml

主要配置项:

database:
  type: sqlite3          # sqlite3 / mysql / postgresql
  connection: database/gw.sqlite3

backend:
  host: 127.0.0.1
  port: 8000
  cache_ttl_seconds: 30

daemon:
  update_check_interval_seconds: 3600   # 数据更新检查间隔
  data_valid_duration_seconds: 86400     # 数据有效时长

环境变量也可覆盖配置,如 GW_FRONTEND_DIST_DIR 可指定前端静态文件目录。

项目结构

gw-dashboard/
├── gw/                  # 后端源码
│   ├── __main__.py      # 入口程序
│   ├── config.py        # 配置加载
│   ├── startup.py       # 启动初始化
│   ├── scraper/         # 数据爬取
│   ├── database/        # 数据库操作
│   ├── web/             # API 与静态资源
│   ├── daemon/          # 守护进程(定时更新)
│   ├── orbit/           # 轨道计算
│   └── utils/           # 工具函数
├── frontend/            # 前端源码
│   └── src/
│       ├── App.tsx      # 主应用
│       ├── api.ts       # API 调用
│       ├── orbit.ts     # 轨道解算
│       └── types.ts     # 类型定义
├── tests/               # 后端测试
├── database/            # 数据库存储目录
└── pyproject.toml       # 项目配置

技术栈

层级 技术
前端 React 19 · TypeScript · Vite 8 · Leaflet · satellite.js
后端 Python ≥3.12 · FastAPI · SQLAlchemy · SGP4
包管理 uv (后端) / npm (前端)
测试 pytest / ESLint

开发

后端

# 安装依赖
uv sync

# 运行测试
uv run pytest

# 代码检查
uv run ruff check .

前端

cd frontend

# 安装依赖
npm install

# 开发服务器
npm run dev

# 构建
npm run build

# 代码检查
npm run lint

构建发布包

# 先构建前端
cd frontend && npm run build && cd ..

# 再构建 Python wheel
uv build

数据来源

所有数据均来自公开信息(CelesTrak、卫星百科 等),仅供学习参考。

Code with Codex (GPT5.5) & Claude Code (GLM5.1 / DeepSeek-V4-Pro)

许可证

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gw_dashboard-0.1.1.tar.gz (236.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gw_dashboard-0.1.1-py3-none-any.whl (217.7 kB view details)

Uploaded Python 3

File details

Details for the file gw_dashboard-0.1.1.tar.gz.

File metadata

  • Download URL: gw_dashboard-0.1.1.tar.gz
  • Upload date:
  • Size: 236.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gw_dashboard-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c89cab216ff2ac1fd4b6111d4efd543976140ecb80d8c0dfeae57a78065b449e
MD5 34440c4b1ed6e095acdecdb5820045d9
BLAKE2b-256 618277834238e8d1cf72a373930346f8bef1313437f3376dbb6d421001f7b0ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for gw_dashboard-0.1.1.tar.gz:

Publisher: publish.yml on NearlyHeadlessJack/gw-dashboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gw_dashboard-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gw_dashboard-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 217.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gw_dashboard-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72f015c5a27b3a76171da0f37a82bf4bb0a99100bc476a1189f1b5623f25165b
MD5 10c19a5c8130b7ee3d67f258da6eaa4f
BLAKE2b-256 75754250b4184e764d27508104eb77d7777730282bc266ef7a4a9fdeb636e456

See more details on using hashes here.

Provenance

The following attestation bundles were made for gw_dashboard-0.1.1-py3-none-any.whl:

Publisher: publish.yml on NearlyHeadlessJack/gw-dashboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page