Skip to content

Commit

Permalink
Remove filtered voltage. Add open circuit voltage and internal resist…
Browse files Browse the repository at this point in the history
…ance if available.
  • Loading branch information
AlexKlimaj authored and bkueng committed Jul 15, 2024
1 parent eb7f733 commit 6336718
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/plot_app/configured_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,21 +857,24 @@ def generate_plots(ulog, px4_ulog, db_data, vehicle_data, link_to_3d_page,
y_start=0, title='Power',
plot_height='small', changed_params=changed_params,
x_range=x_range)
data_plot.add_graph(['voltage_v', 'voltage_filtered_v',
data_plot.add_graph(['voltage_v',
'current_a', lambda data: ('discharged_mah', data['discharged_mah']/100),
lambda data: ('remaining', data['remaining']*10)],
colors8[::2]+colors8[1:2],
['Battery Voltage [V]', 'Battery Voltage filtered [V]',
colors8[0:4],
['Battery Voltage [V]',
'Battery Current [A]', 'Discharged Amount [mAh / 100]',
'Battery remaining [0=empty, 10=full]'])
data_plot.add_graph(['ocv_estimate', lambda data: ('internal_resistance_estimate',
data['internal_resistance_estimate']*1000)],
colors8[4:6], ['OCV Estimate [V]', 'Internal Resistance Estimate [mOhm]'])
data_plot.change_dataset('system_power')
if data_plot.dataset:
if 'voltage5v_v' in data_plot.dataset.data and \
np.amax(data_plot.dataset.data['voltage5v_v']) > 0.0001:
data_plot.add_graph(['voltage5v_v'], colors8[7:8], ['5 V'])
if 'sensors3v3[0]' in data_plot.dataset.data and \
np.amax(data_plot.dataset.data['sensors3v3[0]']) > 0.0001:
data_plot.add_graph(['sensors3v3[0]'], colors8[5:6], ['3.3 V'])
data_plot.add_graph(['sensors3v3[0]'], colors8[6:7], ['3.3 V'])
if data_plot.finalize() is not None: plots.append(data_plot)


Expand Down

0 comments on commit 6336718

Please sign in to comment.