Skip to content

Commit

Permalink
Sub: log desired rangefinder alt (DSAlt) in metres not cm
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Dec 26, 2024
1 parent 6d62648 commit 6444d91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ArduSub/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct PACKED log_Control_Tuning {
float desired_alt;
float inav_alt;
float baro_alt;
int16_t desired_rangefinder_alt;
float desired_rangefinder_alt;
float rangefinder_alt;
float terr_alt;
int16_t target_climb_rate;
Expand Down Expand Up @@ -47,7 +47,7 @@ void Sub::Log_Write_Control_Tuning()
desired_alt : pos_control.get_pos_target_z_cm() / 100.0f,
inav_alt : inertial_nav.get_position_z_up_cm() * 0.01f,
baro_alt : barometer.get_altitude(),
desired_rangefinder_alt : (int16_t)mode_surftrak.get_rangefinder_target_cm(),
desired_rangefinder_alt : mode_surftrak.get_rangefinder_target_cm() * 0.01,
rangefinder_alt : rangefinder_state.alt,
terr_alt : terr_alt,
target_climb_rate : (int16_t)pos_control.get_vel_target_z_cms(),
Expand Down Expand Up @@ -264,7 +264,7 @@ void Sub::Log_Write_GuidedTarget(uint8_t target_type, const Vector3f& pos_target
const struct LogStructure Sub::log_structure[] = {
LOG_COMMON_STRUCTURES,
{ LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning),
"CTUN", "Qffffffffcfhh", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt", "s----mmmmmmnn", "F----00BB0BBB" },
"CTUN", "Qffffffffffhh", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt", "s----mmmmmmnn", "F----00B00BBB" },
{ LOG_DATA_INT16_MSG, sizeof(log_Data_Int16t),
"D16", "QBh", "TimeUS,Id,Value", "s--", "F--" },
{ LOG_DATA_UINT16_MSG, sizeof(log_Data_UInt16t),
Expand Down

0 comments on commit 6444d91

Please sign in to comment.