Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rover: Log_Write_Nav_Tuning should log wp_bearing and nav_bearing in degrees #13162

Merged
merged 1 commit into from
Mar 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions APMrover2/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ struct PACKED log_Nav_Tuning {
LOG_PACKET_HEADER;
uint64_t time_us;
float wp_distance;
uint16_t wp_bearing_cd;
uint16_t nav_bearing_cd;
float wp_bearing;
float nav_bearing;
uint16_t yaw;
float xtrack_error;
};
Expand All @@ -112,8 +112,8 @@ void Rover::Log_Write_Nav_Tuning()
LOG_PACKET_HEADER_INIT(LOG_NTUN_MSG),
time_us : AP_HAL::micros64(),
wp_distance : control_mode->get_distance_to_destination(),
wp_bearing_cd : (uint16_t)wrap_360_cd(control_mode->wp_bearing() * 100),
nav_bearing_cd : (uint16_t)wrap_360_cd(control_mode->nav_bearing() * 100),
wp_bearing : control_mode->wp_bearing(),
nav_bearing : control_mode->nav_bearing(),
yaw : (uint16_t)ahrs.yaw_sensor,
xtrack_error : control_mode->crosstrack_error()
};
Expand Down Expand Up @@ -252,7 +252,7 @@ const LogStructure Rover::log_structure[] = {
{ LOG_THR_MSG, sizeof(log_Throttle),
"THR", "Qhffff", "TimeUS,ThrIn,ThrOut,DesSpeed,Speed,AccY", "s--nno", "F--000" },
{ LOG_NTUN_MSG, sizeof(log_Nav_Tuning),
"NTUN", "QfHHHf", "TimeUS,WpDist,WpBrg,DesYaw,Yaw,XTrack", "smdddm", "F0BBB0" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need ot say "float" here.

"NTUN", "QfffHf", "TimeUS,WpDist,WpBrg,DesYaw,Yaw,XTrack", "smhhdm", "F000B0" },
{ LOG_STEERING_MSG, sizeof(log_Steering),
"STER", "Qhfffff", "TimeUS,SteerIn,SteerOut,DesLatAcc,LatAcc,DesTurnRate,TurnRate", "s--ookk", "F--0000" },
{ LOG_GUIDEDTARGET_MSG, sizeof(log_GuidedTarget),
Expand Down