eaglelandsonce commited on
Commit
ebab5b4
·
verified ·
1 Parent(s): e0317e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -145,7 +145,8 @@ if run_sim:
145
  x_vals = states[:frame+1, 1] / 1000 # convert m to km
146
  y_vals = states[:frame+1, 2] / 1000 # convert m to km
147
  trajectory_line.set_data(x_vals, y_vals)
148
- payload_marker.set_data(states[frame, 1] / 1000, states[frame, 2] / 1000)
 
149
  time_text.set_text(f"Time: {t_val:.1f} s")
150
  return trajectory_line, payload_marker, time_text
151
 
 
145
  x_vals = states[:frame+1, 1] / 1000 # convert m to km
146
  y_vals = states[:frame+1, 2] / 1000 # convert m to km
147
  trajectory_line.set_data(x_vals, y_vals)
148
+ # Wrap the current marker coordinates in a list so they are interpreted as sequences:
149
+ payload_marker.set_data([states[frame, 1] / 1000], [states[frame, 2] / 1000])
150
  time_text.set_text(f"Time: {t_val:.1f} s")
151
  return trajectory_line, payload_marker, time_text
152