使用Mission Planner下载并分析日志

闪存日志存储在飞控上的数据闪存器(或者TF卡中)中,飞行后可下载。默认情况下,它们第一次配置飞控时候创建的。以下介绍如何配置和访问闪存日志。

注意:


日志记录参数

一些常用的参数有:


通过MAVLink下载日志

然后,选择要下载的日志。这些日志保存到你的MissionPlanner/logs目录中,该文件夹以飞行器类型命名,例如QUADCOPTER。


自动分析日志

 

Mission Planner:开始日志分析


最简单的分析是自动生成一个基本的报告,该报告将突出显示常见问题区域。点击“日志分析”,并选择一个你已经保存到MissionPlanner/logs目录的日志。
它们将被放在以飞行器类型命名的文件夹中,比如QUADCOPTER或ROVER。
一旦你选择了你想要的日志,它将生成一个像这样的报告:


手工回顾日志

要获得更详细的分析,点击“回顾日志”,并选择一个你已经保存到MissionPlanner/logs目录下的日志。同样,它们将被放在以飞行器类型命名的文件夹中,比如QUADCOPTER或ROVER。


从互联网或飞控下载的日志进行回顾的步骤

闪存日志的文件名后缀是 .bin 或者 .log 。


查看日志数据

一旦选择了你想要的日志,将得到如下所示的图表。闪存日志的基本格式为:


首先单击所需要的行,以图形化方式显示飞行数据,你应该会看到列标题会同步更新。接下来找到你要绘制图形的列,单击它,然后按“绘制此数据”按钮。在上面的示例中,已绘制了ATT的Roll-In和Roll数据。鼠标的滚轮可用于放大或缩小。你也可以选择图表的一个区域以放大它。通过单击鼠标右键并选择“将比例设置为默认值”来缩小。这是有关使用此功能的简单教程。你也可以通过单击第一列并从下拉列表中选择消息类型,只对第一列(飞行数据消息类型)进行筛选。这是非常有用的,特别是查看不同的飞行模式(称为“模式”信息)期间使用的任务。再次单击第一列,然后按“取消”以清除过滤器。


设置要记录的数据

在数据闪存中记录哪些消息由LOG_BITMASK参数控制。


消息详细信息(限于直升机)

注意:许多消息在每类飞行器的Wiki部分的“板载信息日志消息”页面中进行了详细说明。

DesRollThe pilot’s desired roll angle in degrees (roll left is negative, right is positive)
RollThe vehicle’s actual roll in degrees (roll left is negative, right is positive)
DesPitchThe pilot’s desired pitch angle in degrees (pitch forward is negative, pitch back is positive)
PitchThe vehicle’s actual pitch angle in degrees (pitch forward is negative, pitch back is positive)
DesYawThe pilot’s desired heading in degrees with 0 = north
YawThe vehicle’s actual heading in degrees with 0 = north
ErrRPThe average size of the roll/pitch error estimate (values between 0 and 1)
ErrYawThe average size of the yaw error estimate (values between 0 and 1)

ATUN (auto tune overview):

 Axis: 0 = Roll, 1 = Pitch
TuneStep0 = Returning towards Level (before or after a test), 1 = Testing (i.e. performing a twitch to test response), 2 = Updating gains (twitch completed and gains adjusted)
RateMinMinimum recorded rate during this test
RateMaxMaximum recorded rate during this test
RPGainRate P gain value being tested
RDGainRate D gain value being tested
SPGainStabilize P gain being tested

ATDE (auto tune step details):

AngleAngle of the copter in centi-degrees for the axis being testedx
RateRate of rotation of the copter for the axis being tested

CAM (time and position when camera shutter was activated):

GPSTimeThe GPS reported time since epoch in milliseconds
LatThe accelerometer + GPS latitude estimate
LngThe accelerometer + GPS longitude estimate
AltThe accelerometer + barometer estimated altitude in cm above ground
RollThe vehicle roll angle in centi-degrees
PitchThe vehicle pitch angle in centi-degrees
YawThe vehicle’s heading in centi-degrees

CMD (commands received from the ground station or executed as part of a mission):

CTotThe total number of commands in the mission
CNumThis command’s number in the mission (0 is always home, 1 is the first command, etc)
CIdThe MAVLink message id
CoptThe option parameter (used for many different purposes)
Prm1The command’s parameter (used for many different purposes)
AltThe command’s altitude in meters
LatThe command’s latitude position
LngThe command’s longitude position

COMPASS (raw compass, offset and compassmot compensation values):

FieldDescription
MagX, MagY. MagZRaw magnetic field values for x, y and z axis
OfsX, OfsY, OfsZRaw magnetic offsets (will only change if COMPASS_LEARN parameter is 1)
MOfsX, MOfsY, MOfsZCompassmot compensation for throttle or current

CURRENT (battery voltage, current and board voltage information):

FIELDDESCRIPTION
ThrPilot input throttle from 0 ~ 1000
ThrIntIntegrated throttle (i.e. sum of total throttle output for this flight)
VoltBattery voltage in volts * 100
CurrCurrent drawn from the battery in amps * 100
VccBoard voltage
CurrTotTotal current drawn from battery

CTUN (Control, Throttle and altitude information):

FIELDDESCRIPTION
TimeUSTime stamp for messages in microseconds (can be ignored)
ThIThe pilot’s throttle in as a number from 0 to 1000
ABstAngle Boost: throttle increase (from 0 ~ 1000) as a result of the copter leaning over (automatically added to all pilot and autopilot throttle to reduce altitude loss while leaning)
ThOFinal throttle output sent to the motors (from 0 ~ 1000). Normally equal to ThrI+ABst while in stabilize mode.
ThHEstimated throttle required to hover throttle in the range 0 ~ 1
DAltThe Desired Altitude while in AltHold, Loiter, RTL or Auto flight modes. It is influenced by EKF origin, which in 3.5.X is corrected by GPS altitude. This behaviour is turned off in 3.6.X and can be turned on with EKF_OGN_HGT_MASK.
AltThe current EKF Altitude
BAltBarometer Altitude: The altitude above ground according to the barometer
DSAltDesired distance in cm from ground or ceiling (only visible if Sonar is available)
SAltSonar Altitude: the altitude above ground according to the sonar (Only visible of Sonar is available)
TAltTerrain altitude (not used by default)
DCRtDesired Climb Rate in cm/s
CRtClimb Rate in cm/s
NHarmonic notch current center frequency for gyro in Hz

D32, DU32 (single data values which are either signed 32bit integers or unsigned 32bit integers):

FIELDDESCRIPTION
id

Identification number for the variable. There are only two possible values:

  • 7 = bit mask of internal state (The meaning of individual bits can be found in the def’n of theap structure

  • 9 = simple mode’s initial heading in centi-degrees

EKF (Extended Kalman Filter):

Log information here(Dev Wiki). Overview here.

ERR (an error message):

SubSystem and Error codes listed below

SubsysECode and Description
2 = Radio
  • 0 = Errors Resolved

  • 2 = Late Frame : no updates received from receiver for two seconds

3 = Compass
  • 0 = Errors Resolved

  • 1 = Failed to initialise (probably a hardware issue)

  • 4 = Unhealthy : failed to read from the sensor

5 = Radio Failsafe
  • 0 = Failsafe Resolved

  • 1 = Failsafe Triggered

6 = Battery Failsafe
  • 0 = Failsafe Resolved

  • 1 = Failsafe Triggered

8 = GCS Failsafe
  • 0 = Failsafe Resolved

  • 1 = Failsafe Triggered

9 = Fence Failsafe
  • 0 = Failsafe Resolved

  • 1 = Altitude fence breach, Failsafe Triggered

  • 2 = Circular fence breach, Failsafe Triggered

  • 3 = Both Alt and Circular fence breached, Failsafe Triggered

  • 4 = Polygon fence breached, Failsafe Triggered

10 = Flight mode Change failure

Vehicle was unable to enter the desired flight mode normally because of a bad position estimate

See flight mode numbers here

11 = GPS
  • 0 = Glitch cleared

  • 2 = GPS Glitch occurred

12 = Crash Check
  • 1 = Crash into ground detected.  Normally vehicle is disarmed soon after

  • 2 = Loss of control detected.  Normally parachute is released soon after

13 = Flip mode2 = Flip abandoned (not armed, pilot input or timeout)
15 = Parachute
  • 2 = Not Deployed, vehicle too low

  • 3 = Not Deployed, vehicle landed

16 = EKF Check
  • 0 = Variance cleared (position estimate OK)

  • 2 = Bad Variance (position estimate bad)

17 = EKF Failsafe
  • 0 = Failsafe Resolved

  • 1 = Failsafe Triggered

18 = Barometer
  • 0 = Errors Resolved

  • 4 = Unhealthy : failed to read from the sensor

19 = CPU Load Watchdog
  • 0 = Failsafe Resolved

  • 1 = Failsafe Triggered (normally vehicle disarms)

20 = ADSB Failsafe
  • 0 = Failsafe Resolved

  • 1 = No action just report to Pilot

  • 2 = Vehicle avoids by climbing or descending

  • 3 = Vehicle avoids by moving horizontally

  • 4 = Vehicle avoids by moving perpendicular to other vehicle

  • 5 = RTL invoked

21 = Terrain Data2 = missing terrain data
22 = Navigation
  • 2 = Failed to set destination

  • 3 = RTL restarted

  • 4 = Circle initialisation failed

  • 5 = Destination outside fence

23 = Terrain Failsafe
  • 0 = Failsafe Resolved

  • 1 = Failsafe Triggered (normally vehicle RTLs)

24 = EKF Primary changed
  • 0 = 1st EKF has become primary

  • 1 = 2nd EKF has become primary

25 = Thrust Loss Check
  • 0 = Thrust Restored

  • 1 = Thrust Loss Detected (altitude may be prioritised over yaw control)

26 = Sensor Failsafe (Sub)
  • 0 = Sensor Failsafe Cleared

  • 1 = Sensor Failsafe Triggered

27 = Leak Failsafe (Sub)
  • 0 = Leak Failsafe Cleared

  • 1 = Leak Detector Failsafe Triggered

28 = Pilot Input Timeout Failsafe (Sub only)
  • 0 = Pilot Input Failsafe Cleared

  • 1 = Pilot Input Failsafe Triggered

29 = Vibration Failsafe
  • 0 = Excessive Vibration Compensation De-activated

  • 1 = Excessive Vibration Compenstaion Activated

EV: (an event number). The full list of possible events can be found in AP_Logger.hbut the most common are:

Event NoDESCRIPTION
10Armed
11Disarmed
15Auto Armed (pilot has raised throttle above zero and autopilot is free to take control of throttle)
18Land Complete
25Set Home (home location coordinates have been capture)
28Not Landed (aka Takeoff complete)

GPA: (Global Position Accuracy)

FIELDDESCRIPTION
VDopVertical dilution of precision, a unitless measure of precisionhttps://en.wikipedia.org/wiki/Dilution_of_precision
HAccHorizontal Accuracy as reported by the GPS module, in meters
VAccVertical Accuracy as reported by the GPS module, in meters
SAccSpeed accuracy as reported by the GPS, in m/s/s
VV
  • Flag to indicate if the GPS is reporting vertical velocity

  • 0 No vertical velocity data 1 GPS has vertical velocity data

SMSThe autopilot time in milliseconds that the accuracy/GPS position data is associated with.
DeltaThe time between when the previous GPS message and the current GPS message was parsed by the autopilot, in milliseconds

GPS:

FIELDDESCRIPTION
Status0 = no GPS, 1 = GPS but no fix, 2 = GPS with 2D fix, 3 = GPS with 3D fix
TimeThe GPS reported time since epoch in milliseconds
NSatsThe number of satellites current being used
HDopA measure of gps precision (1.5 is good, >2.0 is not so good)https://en.wikipedia.org/wiki/Dilution_of_precision
LatLattitude according to the GPS
LngLongitude according to the GPS
RelAltAccelerometer + Baro altitude in meters
AltGPS reported altitude (not used by the autopilot)
SPDHorizontal ground speed in m/s
GCrsGround course in degrees (0 = north)

IMU (accelerometer and gyro information):

FIELDDESCRIPTION
GyrX, GyrY, GyrZThe raw gyro rotation rates in radians/second
AccX, AccY, AccZThe raw accelerometer values in m/s/s

Mode (flight mode):

FIELDDESCRIPTION
ModeThe flight mode displayed as a string (i.e. STABILIZE, LOITER, etc)
ThrCrsThrottle cruise (from 0 ~ 1000) which is the autopilot’s best guess as to what throttle is required to maintain a stable hover
RsnReason for mode change (TX command, failsafe, etc) . The meaning of code values can be found in your vehicle’s define.h file (under the mode_reason_t enum). For instance for ArduCopter the file is Arducopter/define.h

NTUN (navigation information):

FIELDDESCRIPTION
WPDstDistance to the next waypoint (or loiter target) in cm. Only updated while in Loiter, RTL, Auto.
WPBrgBearing to the next waypoint in degrees
PErXDistance to intermediate target between copter and the next waypoint in the latitude direction
PErYDistance to intermediate target between copter and the next waypoint in the longitude direction
DVelXDesired velocity in cm/s in the latitude direction
DVelYDesired velocity in cm/s in the longitude direction
VelXActual accelerometer + gps velocity estimate in the latitude direction
VelYActual accelerometer + gps velocity estimate in the longitude direction
DAcXDesired acceleration in cm/s/s in the latitude direction
DAcYDesired acceleration in cm/s/s in the longitude direction
DRolDesired roll angle in centi-degrees
DPitDesired pitch angle in centi-degrees

PM (performance monitoring):

FIELDDESCRIPTION
NLonNumber of long running main loops (i.e. loops that take more than 20% longer than they should according to SCHED_LOOP_RATE - ex. 3ms for 400Hz rate)
NLoopThe total number of loops since the last PM message was displayed. This allows you to calculate the percentage of slow running loops (which should never be higher than 15%). Note that the value will depend on the autopilot clock speed
MaxTThe maximum time that any loop took since the last PM message. This shouldn’t exceed 120% of scheduler loop period, but will be much higher during the interval where the motors are armed
MemAvailable memory, in bytes
LoadPercentage (times 10) of the scheduler loop period when CPU is used


登录后回复