Skip to content

Commit

Permalink
Remove thrust from altitude graph. Check if there is a valid altitude…
Browse files Browse the repository at this point in the history
… setpoint before plotting.
  • Loading branch information
AlexKlimaj authored and dagar committed Jul 11, 2024
1 parent 0c8589c commit eb7f733
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/plot_app/configured_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ def generate_plots(ulog, px4_ulog, db_data, vehicle_data, link_to_3d_page,
data_plot.add_graph(['baro_alt_meter'], colors8[1:2], ['Barometer Altitude'])
data_plot.change_dataset('vehicle_global_position')
data_plot.add_graph(['alt'], colors8[2:3], ['Fused Altitude Estimation'])
# If there is no altitude setpoint and we don't check, the Y axis always starts at 0.
data_plot.change_dataset('position_setpoint_triplet')
data_plot.add_circle(['current.alt'], [plot_config['mission_setpoint_color']],
['Altitude Setpoint'])
data_plot.change_dataset(actuator_controls_0.thrust_sp_topic)
if actuator_controls_0.thrust_z_neg is not None:
data_plot.add_graph([lambda data: ('thrust', actuator_controls_0.thrust_z_neg*100)],
colors8[6:7], ['Thrust [0, 100]'])
if 'position_setpoint_triplet' in data and 'current' in data['position_setpoint_triplet']:
current = data['position_setpoint_triplet']['current']
if 'alt' in current and current['alt'] is not None:
data_plot.add_circle(['current.alt'], [plot_config['mission_setpoint_color']],
['Altitude Setpoint'])
plot_flight_modes_background(data_plot, flight_mode_changes, vtol_states)

if data_plot.finalize() is not None: plots.append(data_plot)
Expand Down

0 comments on commit eb7f733

Please sign in to comment.