Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
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 |
|