From 374b9fa5ed9d79c68113a686de5210d4618327c7 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 5 Oct 2024 11:06:24 +1000 Subject: [PATCH 1/4] AP_AHRS: DCM: log estimated wind --- libraries/AP_AHRS/AP_AHRS_DCM.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS_DCM.cpp b/libraries/AP_AHRS/AP_AHRS_DCM.cpp index fd0b8677561eb..d64dc1b628784 100644 --- a/libraries/AP_AHRS/AP_AHRS_DCM.cpp +++ b/libraries/AP_AHRS/AP_AHRS_DCM.cpp @@ -116,18 +116,24 @@ AP_AHRS_DCM::update() // @Field: Yaw: estimated yaw // @Field: ErrRP: lowest estimated gyro drift error // @Field: ErrYaw: difference between measured yaw and DCM yaw estimate +// @Field: VWN: wind velocity, to-the-North component +// @Field: VWE: wind velocity, to-the-East component +// @Field: VWD: wind velocity, Up-to-Down component AP::logger().WriteStreaming( "DCM", - "TimeUS," "Roll," "Pitch," "Yaw," "ErrRP," "ErrYaw", - "s" "d" "d" "d" "d" "h", - "F" "0" "0" "0" "0" "0", - "Q" "f" "f" "f" "f" "f", + "TimeUS," "Roll," "Pitch," "Yaw," "ErrRP," "ErrYaw," "VWN," "VWE," "VWD", + "s" "d" "d" "d" "d" "h" "n" "n" "n", + "F" "0" "0" "0" "0" "0" "0" "0" "0", + "Q" "f" "f" "f" "f" "f" "f" "f" "f", AP_HAL::micros64(), degrees(roll), degrees(pitch), wrap_360(degrees(yaw)), get_error_rp(), - get_error_yaw() + get_error_yaw(), + _wind.x, + _wind.y, + _wind.z ); } #endif // HAL_LOGGING_ENABLED From 64c07836dbaa742b6672b43358fc8cbb521e245b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 5 Oct 2024 11:06:54 +1000 Subject: [PATCH 2/4] AP_NavEKF3: clarify wind direction descriptions --- libraries/AP_NavEKF3/LogStructure.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_NavEKF3/LogStructure.h b/libraries/AP_NavEKF3/LogStructure.h index 9218c6d60bf84..53276e13d3c53 100644 --- a/libraries/AP_NavEKF3/LogStructure.h +++ b/libraries/AP_NavEKF3/LogStructure.h @@ -104,8 +104,8 @@ struct PACKED log_XKF1 { // @Field: AX: Estimated accelerometer X bias // @Field: AY: Estimated accelerometer Y bias // @Field: AZ: Estimated accelerometer Z bias -// @Field: VWN: Estimated wind velocity (North component) -// @Field: VWE: Estimated wind velocity (East component) +// @Field: VWN: Estimated wind velocity (moving-to-North component) +// @Field: VWE: Estimated wind velocity (moving-to-East component) // @Field: MN: Magnetic field strength (North component) // @Field: ME: Magnetic field strength (East component) // @Field: MD: Magnetic field strength (Down component) From c013d1f7db68604df8ee59edc5e2c32b497ca781 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 5 Oct 2024 11:07:25 +1000 Subject: [PATCH 3/4] SITL: clarify wind direction descriptions --- libraries/SITL/SITL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SITL/SITL.cpp b/libraries/SITL/SITL.cpp index 255b44ff4d3b9..970fdd6a52f41 100644 --- a/libraries/SITL/SITL.cpp +++ b/libraries/SITL/SITL.cpp @@ -86,7 +86,7 @@ const AP_Param::GroupInfo SIM::var_info[] = { // @User: Advanced AP_GROUPINFO("WIND_SPD", 9, SIM, wind_speed, 0), // @Param: WIND_DIR - // @DisplayName: Simulated Wind direction + // @DisplayName: Direction simulated wind is coming from // @Description: Allows you to set wind direction (true deg) in sim // @Units: deg // @User: Advanced From 308962238f4075b8b5470cf340c379c54bde6814 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 8 Oct 2024 09:06:34 +1100 Subject: [PATCH 4/4] AP_NavEKF2: clarify wind direction descriptions --- libraries/AP_NavEKF2/LogStructure.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_NavEKF2/LogStructure.h b/libraries/AP_NavEKF2/LogStructure.h index a7f1a8862557e..8d61f208c7a09 100644 --- a/libraries/AP_NavEKF2/LogStructure.h +++ b/libraries/AP_NavEKF2/LogStructure.h @@ -100,8 +100,8 @@ struct PACKED log_NKF1 { // @Field: GSX: Gyro Scale Factor (X-axis) // @Field: GSY: Gyro Scale Factor (Y-axis) // @Field: GSZ: Gyro Scale Factor (Z-axis) -// @Field: VWN: Estimated wind velocity (North component) -// @Field: VWE: Estimated wind velocity (East component) +// @Field: VWN: Estimated wind velocity (moving-to-North component) +// @Field: VWE: Estimated wind velocity (moving-to-East component) // @Field: MN: Magnetic field strength (North component) // @Field: ME: Magnetic field strength (East component) // @Field: MD: Magnetic field strength (Down component)