tolto log troppo verboso sulle posizioni

This commit is contained in:
VALLONGOL 2025-10-27 12:28:51 +01:00
parent ed17b6b9b9
commit 93fc9bba7f
3 changed files with 180 additions and 140 deletions

View File

@ -1,126 +1,166 @@
{ {
"scenario1": { "scenario1": {
"name": "scenario1", "name": "scenario1",
"targets": [ "targets": [
{ {
"target_id": 0, "target_id": 0,
"active": true, "active": true,
"traceable": true, "traceable": true,
"trajectory": [ "trajectory": [
{ {
"maneuver_type": "Fly to Point", "maneuver_type": "Fly to Point",
"duration_s": 10.0, "duration_s": 10.0,
"target_altitude_ft": 10000.0, "target_altitude_ft": 10000.0,
"target_range_nm": 20.0, "target_range_nm": 20.0,
"target_azimuth_deg": 0.0 "target_azimuth_deg": 0.0
}, },
{ {
"maneuver_type": "Fly for Duration", "maneuver_type": "Fly for Duration",
"target_velocity_fps": 1670.9318999999994, "target_velocity_fps": 1670.9318999999994,
"target_heading_deg": 10.0, "target_heading_deg": 10.0,
"duration_s": 300.0, "duration_s": 300.0,
"target_altitude_ft": 10000.0 "target_altitude_ft": 10000.0
}, },
{ {
"maneuver_type": "Fly to Point", "maneuver_type": "Fly to Point",
"duration_s": 400.0, "duration_s": 400.0,
"target_altitude_ft": 10000.0, "target_altitude_ft": 10000.0,
"target_range_nm": 25.0, "target_range_nm": 25.0,
"target_azimuth_deg": -20.0 "target_azimuth_deg": -20.0
} }
] ]
} }
] ]
}, },
"scenario2": { "scenario2": {
"name": "scenario2", "name": "scenario2",
"targets": [ "targets": [
{ {
"target_id": 0, "target_id": 0,
"active": true, "active": true,
"traceable": true, "traceable": true,
"trajectory": [ "trajectory": [
{ {
"maneuver_type": "Fly to Point", "maneuver_type": "Fly to Point",
"duration_s": 10.0, "duration_s": 10.0,
"target_altitude_ft": 10000.0, "target_range_nm": 10.0,
"target_range_nm": 10.0, "target_azimuth_deg": 1.0,
"target_azimuth_deg": 1.0 "target_altitude_ft": 10000.0,
}, "longitudinal_acceleration_g": 0.0,
{ "lateral_acceleration_g": 0.0,
"maneuver_type": "Fly to Point", "vertical_acceleration_g": 0.0,
"duration_s": 200.0, "turn_direction": "Right"
"target_altitude_ft": 10000.0, },
"target_range_nm": 20.0, {
"target_azimuth_deg": 10.0 "maneuver_type": "Fly to Point",
}, "duration_s": 200.0,
{ "target_range_nm": 20.0,
"maneuver_type": "Fly to Point", "target_azimuth_deg": 10.0,
"duration_s": 200.0, "target_altitude_ft": 10000.0,
"target_altitude_ft": 10000.0, "longitudinal_acceleration_g": 0.0,
"target_range_nm": 30.0, "lateral_acceleration_g": 0.0,
"target_azimuth_deg": -10.0 "vertical_acceleration_g": 0.0,
}, "turn_direction": "Right"
{ },
"maneuver_type": "Fly to Point", {
"duration_s": 200.0, "maneuver_type": "Fly to Point",
"target_altitude_ft": 10000.0, "duration_s": 200.0,
"target_range_nm": 35.0, "target_range_nm": 30.0,
"target_azimuth_deg": 10.0 "target_azimuth_deg": -10.0,
}, "target_altitude_ft": 10000.0,
{ "longitudinal_acceleration_g": 0.0,
"maneuver_type": "Fly to Point", "lateral_acceleration_g": 0.0,
"duration_s": 200.0, "vertical_acceleration_g": 0.0,
"target_altitude_ft": 10000.0, "turn_direction": "Right"
"target_range_nm": 35.0, },
"target_azimuth_deg": 30.0 {
}, "maneuver_type": "Fly to Point",
{ "duration_s": 200.0,
"maneuver_type": "Fly to Point", "target_range_nm": 35.0,
"duration_s": 200.0, "target_azimuth_deg": 10.0,
"target_altitude_ft": 10000.0, "target_altitude_ft": 10000.0,
"target_range_nm": 20.0, "longitudinal_acceleration_g": 0.0,
"target_azimuth_deg": 45.0 "lateral_acceleration_g": 0.0,
} "vertical_acceleration_g": 0.0,
], "turn_direction": "Right"
"use_spline": true },
}, {
{ "maneuver_type": "Fly to Point",
"target_id": 1, "duration_s": 200.0,
"active": true, "target_range_nm": 35.0,
"traceable": true, "target_azimuth_deg": 30.0,
"trajectory": [ "target_altitude_ft": 10000.0,
{ "longitudinal_acceleration_g": 0.0,
"maneuver_type": "Fly to Point", "lateral_acceleration_g": 0.0,
"duration_s": 10.0, "vertical_acceleration_g": 0.0,
"target_altitude_ft": 10000.0, "turn_direction": "Right"
"target_range_nm": 10.0, },
"target_azimuth_deg": 10.0 {
}, "maneuver_type": "Fly to Point",
{ "duration_s": 200.0,
"maneuver_type": "Fly to Point", "target_range_nm": 20.0,
"duration_s": 10.0, "target_azimuth_deg": 45.0,
"target_altitude_ft": 10000.0, "target_altitude_ft": 10000.0,
"target_range_nm": 20.0, "longitudinal_acceleration_g": 0.0,
"target_azimuth_deg": 20.0 "lateral_acceleration_g": 0.0,
}, "vertical_acceleration_g": 0.0,
{ "turn_direction": "Right"
"maneuver_type": "Fly to Point", }
"duration_s": 30.0, ],
"target_altitude_ft": 10000.0, "use_spline": true
"target_range_nm": 30.0, },
"target_azimuth_deg": 30.0 {
}, "target_id": 1,
{ "active": true,
"maneuver_type": "Fly to Point", "traceable": true,
"duration_s": 30.0, "trajectory": [
"target_altitude_ft": 10000.0, {
"target_range_nm": 35.0, "maneuver_type": "Fly to Point",
"target_azimuth_deg": -10.0 "duration_s": 10.0,
} "target_range_nm": 10.0,
], "target_azimuth_deg": 10.0,
"use_spline": false "target_altitude_ft": 10000.0,
} "longitudinal_acceleration_g": 0.0,
] "lateral_acceleration_g": 0.0,
} "vertical_acceleration_g": 0.0,
"turn_direction": "Right"
},
{
"maneuver_type": "Fly to Point",
"duration_s": 10.0,
"target_range_nm": 20.0,
"target_azimuth_deg": 20.0,
"target_altitude_ft": 10000.0,
"longitudinal_acceleration_g": 0.0,
"lateral_acceleration_g": 0.0,
"vertical_acceleration_g": 0.0,
"turn_direction": "Right"
},
{
"maneuver_type": "Fly to Point",
"duration_s": 30.0,
"target_range_nm": 30.0,
"target_azimuth_deg": 30.0,
"target_altitude_ft": 10000.0,
"longitudinal_acceleration_g": 0.0,
"lateral_acceleration_g": 0.0,
"vertical_acceleration_g": 0.0,
"turn_direction": "Right"
},
{
"maneuver_type": "Fly to Point",
"duration_s": 30.0,
"target_range_nm": 35.0,
"target_azimuth_deg": -10.0,
"target_altitude_ft": 10000.0,
"longitudinal_acceleration_g": 0.0,
"lateral_acceleration_g": 0.0,
"vertical_acceleration_g": 0.0,
"turn_direction": "Right"
}
],
"use_spline": false
}
]
}
} }

View File

@ -2,7 +2,7 @@
"general": { "general": {
"scan_limit": 60, "scan_limit": 60,
"max_range": 100, "max_range": 100,
"geometry": "1599x1024+481+287", "geometry": "1599x1024+501+84",
"last_selected_scenario": "scenario2", "last_selected_scenario": "scenario2",
"connection": { "connection": {
"target": { "target": {

View File

@ -191,21 +191,21 @@ class PPIDisplay(ttk.Frame):
(line,) = self.ax.plot([theta_rad_plot, theta_end_rad_plot], [r_nm, r_end_nm], color=color, linewidth=1.2) (line,) = self.ax.plot([theta_rad_plot, theta_end_rad_plot], [r_nm, r_end_nm], color=color, linewidth=1.2)
artist_list.append(line) artist_list.append(line)
# Debug log: useful to diagnose heading vs plotting coordinates # Debug log: useful to diagnose heading vs plotting coordinates
try: #try:
logger.debug( # logger.debug(
"PPIDisplay: TID %s az=%.6f hdg=%.6f theta0_deg=%.3f theta1_deg=%.3f x_start=%.3f y_start=%.3f x_end=%.3f y_end=%.3f", # "PPIDisplay: TID %s az=%.6f hdg=%.6f theta0_deg=%.3f theta1_deg=%.3f x_start=%.3f y_start=%.3f x_end=%.3f y_end=%.3f",
target.target_id, # target.target_id,
target.current_azimuth_deg, # target.current_azimuth_deg,
target.current_heading_deg, # target.current_heading_deg,
math.degrees(theta_rad_plot), # math.degrees(theta_rad_plot),
math.degrees(theta_end_rad_plot), # math.degrees(theta_end_rad_plot),
x_start_nm, # x_start_nm,
y_start_nm, # y_start_nm,
x_end_nm, # x_end_nm,
y_end_nm, # y_end_nm,
) # )
except Exception: #except Exception:
pass # pass
txt = self.ax.text(theta_rad_plot, r_nm + (vector_len_nm * 0.5), str(target.target_id), color="white", fontsize=8, ha="center", va="bottom") txt = self.ax.text(theta_rad_plot, r_nm + (vector_len_nm * 0.5), str(target.target_id), color="white", fontsize=8, ha="center", va="bottom")
self.target_label_artists.append(txt) self.target_label_artists.append(txt)