- Graph module plots live data from vehicle for monitoring vehicle state.
- Connect to the vehicle using
mavproxy.py --master=127.0.0.1:14550
. - After starting MAVProxy
module load graph
. graph MESSAGE_NAME.FIELD_NAME
is used to graph specific data field.- Multiple data can be plotted to the same graph as:
graph MESSAGE_NAME1.FIELD_NAME1 MESSAGE_NAME2.FIELD_NAME2 MESSAGE_NAME3.FIELD_NAME3
.
graph legend MESSAGE_NAME1.FIELD_NAME1 LEGEND_NAME
is used to add legend to graph.- Use
graph timespan X
to change the time space to X seconds on axis-x. - Use
graph tickresolution X
to change the tick resolution to X seconds on axis-x. - Mathematical operations are allowed in data.
- Multiple graphs are allowed.
- Let's plot altitude using VFR_HUD:
graph legend (VFR_HUD.alt-584) "Relative Altitude"
graph (VFR_HUD.alt-584)
- Let's plot relative altitude using GLOBAL_POSITION_INT
graph legend (GLOBAL_POSITION_INT.relative_alt/1000.0) "Relative Altitude"
graph (GLOBAL_POSITION_INT.relative_alt/1000.0)
- Let's plot VIBRATION on all axes:
graph legend VIBRATION.vibration_x "Vibration on X axis"
graph legend VIBRATION.vibration_y "Vibration on Y axis"
graph legend VIBRATION.vibration_z "Vibration on Z axis"
graph VIBRATION.vibration_x VIBRATION.vibration_y VIBRATION.vibration_z
- Homework:
- Takeoff to 10 meters.
- Fly to a location in GUIDED mode on 10 meters and observe the graphs.
- On different graphs plot:
- Desired roll vs. roll
- Desired pitch vs. pitch
- Desired yaw vs. yaw
- Each plots must be in float degrees.
- Add legend to all the graphs before plotting (like specified in 3rd step).
- Set time span to 10 seconds before plotting.
- Set tick resolution to 0.1 seconds before plotting.
- Hint: NAV_CONTROLLER_OUTPUT, ATTITUDE