diff --git a/ArduSub/Log.cpp b/ArduSub/Log.cpp index 7512ddd283..1ad00c2757 100644 --- a/ArduSub/Log.cpp +++ b/ArduSub/Log.cpp @@ -105,7 +105,7 @@ struct PACKED log_Control_Tuning { float throttle_hover; float desired_alt; float inav_alt; - int32_t baro_alt; + float baro_alt; int16_t desired_rangefinder_alt; int16_t rangefinder_alt; float terr_alt; @@ -131,7 +131,7 @@ void Sub::Log_Write_Control_Tuning() throttle_hover : motors.get_throttle_hover(), desired_alt : pos_control.get_alt_target() / 100.0f, inav_alt : inertial_nav.get_altitude() / 100.0f, - baro_alt : baro_alt, + baro_alt : barometer.get_altitude(), desired_rangefinder_alt : (int16_t)target_rangefinder_alt, rangefinder_alt : rangefinder_state.alt_cm, terr_alt : terr_alt, @@ -434,7 +434,7 @@ const struct LogStructure Sub::log_structure[] = { { LOG_NAV_TUNING_MSG, sizeof(log_Nav_Tuning), "NTUN", "Qffffffffff", "TimeUS,DPosX,DPosY,PosX,PosY,DVelX,DVelY,VelX,VelY,DAccX,DAccY" }, { LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning), - "CTUN", "Qffffffeccfhh", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt" }, + "CTUN", "Qfffffffccfhh", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt" }, { LOG_PERFORMANCE_MSG, sizeof(log_Performance), "PM", "QHHIhBHII", "TimeUS,NLon,NLoop,MaxT,PMT,I2CErr,INSErr,LogDrop,Mem" }, { LOG_MOTBATT_MSG, sizeof(log_MotBatt), diff --git a/ArduSub/Sub.cpp b/ArduSub/Sub.cpp index a0f2e140b6..2726057596 100644 --- a/ArduSub/Sub.cpp +++ b/ArduSub/Sub.cpp @@ -38,8 +38,6 @@ Sub::Sub(void) : loiter_time(0), climb_rate(0), target_rangefinder_alt(0.0f), - baro_alt(0), - baro_climbrate(0.0f), auto_yaw_mode(AUTO_YAW_LOOK_AT_NEXT_WP), yaw_look_at_WP_bearing(0.0f), yaw_look_at_heading(0), diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index aa3e2af98e..85e5ff1379 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -327,8 +327,6 @@ private: // The cm/s we are moving up or down based on filtered data - Positive = UP int16_t climb_rate; float target_rangefinder_alt; // desired altitude in cm above the ground - int32_t baro_alt; // barometer altitude in cm above home - float baro_climbrate; // barometer climbrate in cm/s // Turn counter int32_t quarter_turn_count; diff --git a/ArduSub/sensors.cpp b/ArduSub/sensors.cpp index bc93c4eef7..57dc7adde8 100644 --- a/ArduSub/sensors.cpp +++ b/ArduSub/sensors.cpp @@ -14,8 +14,6 @@ void Sub::read_barometer(void) if (should_log(MASK_LOG_IMU)) { Log_Write_Baro(); } - baro_alt = barometer.get_altitude() * 100.0f; - baro_climbrate = barometer.get_climb_rate() * 100.0f; sensor_health.depth = barometer.healthy(depth_sensor_idx); }