Calculate waypoints for a moving plane with a radar
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Miguel Albuquerque
el 6 de Mayo de 2022
Comentada: Miguel Albuquerque
el 10 de Mayo de 2022
Hey guys, thanks in advance for reading this.
Probably this is very basic, but im having troubles
I have a surveillance are, defined by AoI( 400 by 400) matrix, so a 2D scenario. A binary matrix, where 1= target, 0= non target. I select the position of the targets.
I want to imagine that a plane is going from AoI(310 0) to AoI(310 400). This plane is at 250m/s and has a radar mounted in it, and imagine this receives the waves at waypoints AoI(310,0),AoI(310,40) ,AoI(310,80),AoI(310,150) and AoI(310,400), taking 20 second in each distance between waypoints.
How sould I define a loop where in each waypoint the radar on the plane, gets the detection of targets and the incident and reflective angles calculated by this:
This cycle is just reading the matrix, identifying the targets( position =1 in matrix) and calculating the angles between the transmitter(8,5) and the receiver(8,15) to the normals to the targets. I want to calculate this cycle for each waypoint of the trajectory where the plane passes.
for xx=1:400
for yy=1:400
if AoI(xx,yy) ~= 0 % Target detection
X_target= xx*Lp;
Y_target= yy*Lp;
VTransmitter_target=[X_target-X_transmitter Y_target-Y_transmitter]; % Vector transmitter-target
Vectors_product=dot( VTransmitter_target,normal_ntarget1);
angle_transmitter =180-acosd(Vectors_product/(norm(VTransmitter_target)*norm(normal_ntarget1)));
VTarget_receiver=[X_receiver-X_target Y_receiver-Y_target]; % Vector Target-receiver
Vectors_product=dot( VTarget_receiver,normal_ntarget1);
angle_receiver =acosd(Vectors_product/(norm(VTarget_receiver)*norm(normal_ntarget1)));
4 comentarios
Jeffrey Clark
el 7 de Mayo de 2022
For 2D, straight line, no acceleration a single track P = P0+V.*t, where P0 is initial x,y position, V is constant x,y velocity,and t is time after P0. Or add constant acceleration or higher terms. Or just make up each 20sec data point for each track and store into P.
P, P0 and V could represent all tracks by adding one more dimension as in P(track,x,y), which can be computed all at once:
P = P0 + V.*t;
Respuesta aceptada
Matt J
el 8 de Mayo de 2022
Isn't it just
waypoints=[1,40,80,150,400]
X_transmitter = 310;
for i=1:numel(waypoints)
Y_transmitter = waypoints(i);
....
our code from yesterday
https://www.mathworks.com/matlabcentral/answers/1711710-calculate-2d-normal-vectors-to-a-plane?s_tid=srchtitle
....
end
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Automated Driving Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!