MCPcopy Create free account
hub / github.com/Tong89/smartNode / _generate_random_leo

Method _generate_random_leo

backend/core.py:2359–2379  ·  view source on GitHub ↗

动态生成随机LEO卫星轨道

(self, index)

Source from the content-addressed store, hash-verified

2357# ==========================================
2358
2359 def _generate_random_leo(self, index):
2360 """动态生成随机LEO卫星轨道"""
2361 # 基础参数围绕典型LEO轨道波动
2362 base_alt = 6871 # 约500km高度
2363
2364 # 随机分布参数以避免重叠
2365 altitude = base_alt + self.rng.uniform(-50, 50)
2366 raan = self.rng.uniform(0, 360) # 升交点赤经随机
2367 mean_anomaly = self.rng.uniform(0, 360) # 平近点角随机
2368 inclination = 97.4 + self.rng.uniform(-1, 1) # 太阳同步轨道附近
2369
2370 return OrbitalElements(
2371 name=f"扩展卫星_{index}",
2372 sat_id=f"LEO_EXT_{index}",
2373 semi_major_axis=altitude,
2374 eccentricity=0.001,
2375 inclination=inclination,
2376 raan=raan,
2377 arg_perigee=0,
2378 mean_anomaly=mean_anomaly
2379 )
2380
2381def create_engine(seed=None, autostart=True):
2382 """工厂:创建引擎实例,可注入随机种子以保证可复现;autostart 控制是否启动后台线程。

Callers 1

Calls 1

OrbitalElementsClass · 0.90

Tested by

no test coverage detected