sistemato il verso dei target inviati dal server.
This commit is contained in:
parent
243dc5732b
commit
7c9135a652
@ -172,9 +172,13 @@ class PPIDisplay(ttk.Frame):
|
||||
# 2. Calculate vector displacement in Cartesian from heading
|
||||
# Heading is defined as degrees clockwise from North (0 = North),
|
||||
# so the unit vector in Cartesian (East, North) is (sin(h), cos(h)).
|
||||
hdg_rad = math.radians(target.current_heading_deg)
|
||||
dx_nm = vector_len_nm * math.sin(hdg_rad)
|
||||
dy_nm = vector_len_nm * math.cos(hdg_rad)
|
||||
# Invert the sign of the heading angle for plotting so the
|
||||
# drawn heading arrow follows the same angular convention used
|
||||
# for positions (theta_plot = -azimuth). Using -heading here
|
||||
# ensures left/right orientation matches the displayed azimuth.
|
||||
hdg_rad_plot = math.radians(-target.current_heading_deg)
|
||||
dx_nm = vector_len_nm * math.sin(hdg_rad_plot)
|
||||
dy_nm = vector_len_nm * math.cos(hdg_rad_plot)
|
||||
|
||||
# 3. Find end point in Cartesian
|
||||
x_end_nm = x_start_nm + dx_nm
|
||||
|
||||
Loading…
Reference in New Issue
Block a user