Browse Source

AP_Logger: Log D gain limit cycle gain scaler

Used by Plane roll and pitch loops in APM_Control
zr-v5.1
Paul Riseborough 5 years ago committed by Andrew Tridgell
parent
commit
0cf70fe961
  1. 1
      libraries/AP_Logger/AP_Logger.h
  2. 3
      libraries/AP_Logger/LogFile.cpp
  3. 10
      libraries/AP_Logger/LogStructure.h

1
libraries/AP_Logger/AP_Logger.h

@ -305,6 +305,7 @@ public:
float I; float I;
float D; float D;
float FF; float FF;
float Dmod;
}; };
void Write_PID(uint8_t msg_type, const PID_Info &info); void Write_PID(uint8_t msg_type, const PID_Info &info);

3
libraries/AP_Logger/LogFile.cpp

@ -831,7 +831,8 @@ void AP_Logger::Write_PID(uint8_t msg_type, const PID_Info &info)
P : info.P, P : info.P,
I : info.I, I : info.I,
D : info.D, D : info.D,
FF : info.FF FF : info.FF,
Dmod : info.Dmod
}; };
WriteBlock(&pkt, sizeof(pkt)); WriteBlock(&pkt, sizeof(pkt));
} }

10
libraries/AP_Logger/LogStructure.h

@ -756,6 +756,7 @@ struct PACKED log_PID {
float I; float I;
float D; float D;
float FF; float FF;
float Dmod;
}; };
struct PACKED log_Current { struct PACKED log_Current {
@ -1275,10 +1276,10 @@ struct PACKED log_Arm_Disarm {
#define MAG_UNITS "sGGGGGGGGG-s" #define MAG_UNITS "sGGGGGGGGG-s"
#define MAG_MULTS "FCCCCCCCCC-F" #define MAG_MULTS "FCCCCCCCCC-F"
#define PID_LABELS "TimeUS,Tar,Act,Err,P,I,D,FF" #define PID_LABELS "TimeUS,Tar,Act,Err,P,I,D,FF,Dmod"
#define PID_FMT "Qfffffff" #define PID_FMT "Qffffffff"
#define PID_UNITS "s-------" #define PID_UNITS "s--------"
#define PID_MULTS "F-------" #define PID_MULTS "F--------"
#define QUAT_LABELS "TimeUS,C,Q1,Q2,Q3,Q4" #define QUAT_LABELS "TimeUS,C,Q1,Q2,Q3,Q4"
#define QUAT_FMT "QBffff" #define QUAT_FMT "QBffff"
@ -1897,6 +1898,7 @@ struct PACKED log_Arm_Disarm {
// @Field: I: integral part of PID // @Field: I: integral part of PID
// @Field: D: derivative part of PID // @Field: D: derivative part of PID
// @Field: FF: controller feed-forward portion of response // @Field: FF: controller feed-forward portion of response
// @Field: Dmod: scaler applied to D gain to reduce limit cycling
// @LoggerMessage: PM // @LoggerMessage: PM
// @Description: autopilot system performance and general data dumping ground // @Description: autopilot system performance and general data dumping ground

Loading…
Cancel
Save