61 lines
3.0 KiB
Python
61 lines
3.0 KiB
Python
|
|
from dataclasses import dataclass
|
|||
|
|
|
|||
|
|
|
|||
|
|
@dataclass
|
|||
|
|
class SensorNoiseParams:
|
|||
|
|
"""
|
|||
|
|
传感器噪声参数配置。
|
|||
|
|
|
|||
|
|
所有噪声均建模为高斯白噪声(零均值正态分布)加固定偏置。
|
|||
|
|
偏置模拟传感器的系统误差(如气压计高度偏置、磁罗盘偏差)。
|
|||
|
|
|
|||
|
|
INS 漂移建模:
|
|||
|
|
INS 位置误差随时间积分累积,不可自动归零。
|
|||
|
|
每秒漂移量 = position_drift_rate (m/s),方向随机游走。
|
|||
|
|
这是 INS 导航误差的主要来源。
|
|||
|
|
"""
|
|||
|
|
# ── GPS ──────────────────────────────────────────────────────────
|
|||
|
|
# 水平位置噪声标准差 (m),典型民航 GPS:3~10m
|
|||
|
|
gps_horizontal_noise: float = 5.0
|
|||
|
|
# 垂直位置噪声标准差 (m),典型民航 GPS:8~15m
|
|||
|
|
gps_vertical_noise: float = 10.0
|
|||
|
|
# GPS 信号丢失概率 [0,1],丢失时使用 INS 推算
|
|||
|
|
gps_dropout_prob: float = 0.002
|
|||
|
|
# HDOP 因子(水平精度稀释),正常值 1.0~2.0
|
|||
|
|
gps_hdop: float = 1.2
|
|||
|
|
|
|||
|
|
# ── INS(惯性导航)────────────────────────────────────────────────
|
|||
|
|
# 位置漂移速率 (m/s),典型民航 INS:0.01~0.05 m/s
|
|||
|
|
ins_drift_rate: float = 0.02
|
|||
|
|
# 速度随机游走噪声标准差 (m/s)
|
|||
|
|
ins_velocity_noise: float = 0.05
|
|||
|
|
# 航向陀螺仪漂移 (°/s),典型 MEMS:0.001~0.01 °/s
|
|||
|
|
ins_heading_drift: float = 0.001
|
|||
|
|
|
|||
|
|
# ── 气压高度计 ────────────────────────────────────────────────────
|
|||
|
|
# 高度噪声标准差 (m)
|
|||
|
|
baro_altitude_noise: float = 3.0
|
|||
|
|
# 高度固定偏置 (m),模拟气压设定误差
|
|||
|
|
baro_altitude_bias: float = 5.0
|
|||
|
|
# 垂直速度噪声标准差 (m/s)
|
|||
|
|
baro_vs_noise: float = 0.2
|
|||
|
|
|
|||
|
|
# ── 空速管 ────────────────────────────────────────────────────────
|
|||
|
|
# 空速噪声标准差 (m/s)
|
|||
|
|
airspeed_noise: float = 0.8
|
|||
|
|
# 空速固定偏置 (m/s),模拟皮托管误差
|
|||
|
|
airspeed_bias: float = 0.0
|
|||
|
|
|
|||
|
|
# ── 磁罗盘/航向传感器 ─────────────────────────────────────────────
|
|||
|
|
# 航向噪声标准差 (°)
|
|||
|
|
heading_noise: float = 1.0
|
|||
|
|
# 磁差偏置 (°),模拟磁差未完全修正
|
|||
|
|
heading_bias: float = 0.0
|
|||
|
|
|
|||
|
|
# ── 导航融合权重 ──────────────────────────────────────────────────
|
|||
|
|
# GPS 与 INS 融合权重(简化卡尔曼增益)
|
|||
|
|
# 0.0 = 纯 INS,1.0 = 纯 GPS
|
|||
|
|
# 典型值:GPS 有效时 0.8,GPS 丢失时降为 0.0
|
|||
|
|
gps_ins_blend: float = 0.8
|
|||
|
|
|