How to do vector projection?

33 visualizaciones (últimos 30 días)
Sierra
Sierra el 31 de Mayo de 2022
Comentada: Jan el 2 de Jun. de 2022
I have longitude, latitude data(aircraft's trajectory data).
and I want to use a vecotr projection to make a second image.
(for convenience, I only drawed one line. but I wanna do it for every red point.)
Is there a forumla or a fuction in Matlab?
Also, if you know how to do 3d(longitude, latitude, altitude) vector projection, please let me know.
(I asked 2d vector projection first for understanding.)
Thanks
  12 comentarios
Sierra
Sierra el 31 de Mayo de 2022
I have coordinates data(longitude, latitude). and the data is 30 x1 dobule like first image
the lines next to the red line are colored black, and they are also trajectory of aircraft.
the line which is projected onto is colored blue.
In short, I want to project trajectories(black line) to blue line.
and To do this, I have to use vector projection(orthogonal projection).
Tell me if you need more information!
Thanks, Matt.
Jan
Jan el 2 de Jun. de 2022
@Sierra: Screenshots are less useful to provide data, because they cannot be used by copy&paste to create an asnwer.

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 31 de Mayo de 2022
Editada: Matt J el 31 de Mayo de 2022
In 2D Euclidean space, to project a point P=[x,y] onto a straight line, you need
(1) a point on the line P0=[x0,y0]
(2) a direction vector parallel to the line D=[dx,dy]
The projected point is given by,
projectedPoint=dot(P-P0,D/norm(D))*D+P0
This is for projection in the Euclidean 2D plane. However, because you have lat,lon data, you presumably want to project over the surface of a sphere, which is more complicated. Either way though, you need a point on the blue line and something that defines its direction.

Más respuestas (0)

Categorías

Más información sobre 3-D Scene Control 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!

Translated by