How to do vector projection?

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

Jan
Jan el 31 de Mayo de 2022
Your question does not contain enough information to be answered. AS in fomrer questions, you do not mention, how your input data are represented. The image does not explain these details.
"(for convenience, I only drawed one line. but I wanna do it for every red point.)" - I count 6 lines.
In the past you did not answer questions for clarifications. This does not motivate to ask your again.
Sierra
Sierra el 31 de Mayo de 2022
Sorry for the not answering your question, Jan.
I found that my method what I used was totally wrong. So, I've been struggling to find other options.
But it was still my mistake for not answering. I'm so sorry again.
about the line, I was talking about the blue line.
First, I have longitude, latitude data.
Second, I want to 'plot' a vector projection of at red point(like second image).
In my image, there should be 4 vector projections.
Third, My second image indicates that the points which is orthodogonal to blue line
I'm trying to give enough information. but I don't know well which information is needed for this projection.
If you need more information, please tell me.
Thanks, Jan.
Matt J
Matt J el 31 de Mayo de 2022
Is the line you are projecting onto a rhumb line?
Sierra
Sierra el 31 de Mayo de 2022
Editada: Sierra el 31 de Mayo de 2022
Do you mean the blue line?
It's not a rhumb line. It(blue line) is a perpendicular to a red line.
In my image, every line is a trajectory of aircraft.
As far as I know, in doing vector projection, it is needed.
I just wanna plot like second image
Matt J
Matt J el 31 de Mayo de 2022
But if it is not a rhumb line, what is the mathematical formula for the blue line?
Sierra
Sierra el 31 de Mayo de 2022
the blue line is 90 degrees to the red point. even though the image seems not
sorry for confusing
Matt J
Matt J el 31 de Mayo de 2022
Editada: Matt J el 31 de Mayo de 2022
It is possible to measure the angle between two lines, but it is not possible to measure the angle between a point and a line, or between a point and a point. How would you define that?
You seem to be saying you are given only discrete points along either the red line, the blue line or both. You need some way of connecting the points continuously if you want to define an angle of intersection between them.
Sierra
Sierra el 31 de Mayo de 2022
Editada: Sierra el 31 de Mayo de 2022
I just drawed the blue line for clarfying what i wanna do.
I thought the blue line is automatically made when I projected the black line(trajectory) to a red point.
I don't have to know the angle myself.
I just wanna say that If i projected the trajectory onto red point, there will be blue line i think.
Sierra
Sierra el 31 de Mayo de 2022
just like this
Matt J
Matt J el 31 de Mayo de 2022
Like Jan, I cannot tell for certain what the input data is. What data do you start with? And how are the data represented as Matlab variables?
Also, your posted images are not very clear. It is hard to see what color each of the lines are, except for the red line. Is the blue line not the line you are projecting onto?
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

0 votos

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)

Preguntada:

el 31 de Mayo de 2022

Comentada:

Jan
el 2 de Jun. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by