dev v0.61

為了電池子計畫 硬加了一些東西 不太穩定 懶得詳述了
This commit is contained in:
2024-06-02 16:35:53 +08:00
parent f937f89e56
commit 3f9b2ab8e5
4 changed files with 150 additions and 144 deletions
+26 -15
View File
@@ -14,6 +14,17 @@ async def run():
print("123")
await drone.telemetry_server.publish_status_text(StatusText(StatusTextType.ALERT,"Check"))
# await drone.param_server.provide_param_int("CAL_ACC0_ID",1)
# await drone.param_server.provide_param_int("CAL_GYRO0_ID",1)
# await drone.param_server.provide_param_int("CAL_MAG0_ID",1)
# await drone.param_server.provide_param_int("SYS_HITL",0)
# await drone.param_server.provide_param_int("MIS_TAKEOFF_ALT",0)
a1 = drone.param_server.IntParam("CAL_ACC0_ID",1)
a2 = drone.param_server.IntParam("CAL_GYRO0_ID",1)
a3 = drone.param_server.IntParam("CAL_MAG0_ID",1)
a4 = drone.param_server.IntParam("SYS_HITL",0)
a5 = drone.param_server.IntParam("MIS_TAKEOFF_ALT",0)
while True:
@@ -30,21 +41,21 @@ async def run():
heading = Heading(heading_deg)
raw_gps = RawGps(
timestamp_us=123456789, # 当前时间戳,以微秒为单位
latitude_deg=47.3977418, # 纬度
longitude_deg=8.5455934, # 经度
absolute_altitude_m=500, # 绝对海拔高度(米)
hdop=1.0, # 水平精度因子
vdop=1.0, # 垂直精度因子
velocity_m_s=random.uniform(0.0,50.0), # 速度(米/秒)
cog_deg=90.0, # 航向(度)
altitude_ellipsoid_m=510.0, # 大地水准面上的高度(米)
horizontal_uncertainty_m=1.000000000000, # 水平准确性(米)
vertical_uncertainty_m=1.00000000,
velocity_uncertainty_m_s=0.0000000000000000 ,# 垂直准确性(米)
heading_uncertainty_deg=1.0000000, # 速度准确性(米/秒)
yaw_deg=180.5# 是否已定位的标志
)
timestamp_us=123456789, # 当前时间戳,以微秒为单位
latitude_deg=47.3977418, # 纬度
longitude_deg=8.5455934, # 经度
absolute_altitude_m=500, # 绝对海拔高度(米)
hdop=1.0, # 水平精度因子
vdop=1.0, # 垂直精度因子
velocity_m_s=random.uniform(0.0,50.0), # 速度(米/秒)
cog_deg=90.0, # 航向(度)
altitude_ellipsoid_m=510.0, # 大地水准面上的高度(米)
horizontal_uncertainty_m=1.000000000000, # 水平准确性(米)
vertical_uncertainty_m=1.00000000,
velocity_uncertainty_m_s=0.0000000000000000 ,# 垂直准确性(米)
heading_uncertainty_deg=1.0000000, # 速度准确性(米/秒)
yaw_deg=180.5# 是否已定位的标志
)
gps_info = GpsInfo(
num_satellites=10, # 卫星数量
fix_type=FixType.RTK_FIXED # GPS 修复类型