how to project trajectories on a plane which is made from normal vector?

9 Ansichten (letzte 30 Tage)
Sierra
Sierra am 11 Jun. 2022
Beantwortet: SAI SRUJAN am 24 Jan. 2024
Hello Everyone, I have trouble projecting trajectories on a plane.
First, there are a lot of trajectories which is consist of data(longitude, latitude, altitude) and I calculated the mean of longitude data, latitude data and altitude data.
This is aircraft's data.
This is mean trajectory's data.
And Using this data, I want to project trajectories on a plane.
The blue lines are aircraft's trajectories and the black line is a mena trajectory. (I intentionally made this image 2D to explain this easily.)
The red line is a normal vector made on mean trajectory's line and from this vector, I want to make a plane like the image below.
this is an example plane which is projected.(this plane is 3D (longitude, latitude, altitude))
Please let me know how to project a trajectory on a plane using normal vector.
Thanks and Have a Good Day!
  3 Kommentare
Sierra
Sierra am 12 Jun. 2022
I want to do like this image. If you need more information and clarification, I will upload what i want to do by image.
Thanks for answering.
Sierra
Sierra am 12 Jun. 2022
This image is what i did before.
If i can project trajectories on a plane like this, I will make a boundary using 'percentile'.
But for this image, I didn't use the normal vector. So final result doesn't look good when viewing from top.
As you can see, since the y value is fixed, the boundary is not perpendicular to mean trajectory.(In this image, I didn't plot trajectories to see boundaries well)
To solve this problem, i thought i have to use 'normal vector'.
I think if i can use 'normal vector', it will be good. But I don't know how to do now.
And for clarification, I will explain about the boundary again.
The boundary is made using 'percentile'. That's why the boundary doesn't contain every trajectory. In my case, percentile was 97.5
Ex) if percentile is 100, the boundary will be bigger and contains every trajectory.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

SAI SRUJAN
SAI SRUJAN am 24 Jan. 2024
Hi Sierra,
I understand that you are trying to plot a set of 3D aircraft trajectories onto a 2D plane defined by a normal vector that originates from a mean trajectory, which is calculated from the average longitude, latitude, and altitude of your data.
Construct a plane that contains the normal vector. To project your aircraft trajectories onto the desired plane using MATLAB, you'll need to perform an orthogonal projection for each point in your trajectory data.
Please follow the below code outline which constructs the desired plane, projects specified points onto it, and visualizes the results.
syms x y z;
normal_vector = [2, 3, 4];
mean_trajectory_point = [1, -1, 2];
plane_equation = normal_vector(1) * (x - mean_trajectory_point(1)) + ...
normal_vector(2) * (y - mean_trajectory_point(2)) + ...
normal_vector(3) * (z - mean_trajectory_point(3)) == 0;
plane_equation = simplify(plane_equation);
D = dot(normal_vector, mean_trajectory_point);
% Define two points of interest whose projections we want to find
intersection1 = [7/9, 7/9, 7/9];
intersection2 = [5, 43, -33];
[x, y] = meshgrid(0:5, 0:44);
% Solve for z using the plane equation
z = (-D - normal_vector(1) * x - normal_vector(2) * y) / normal_vector(3);
% Plot the plane
surf(x, y, z, 'FaceAlpha', 0.5, 'EdgeColor', 'none');
hold on;
% Plot the points of intersection
plot3(intersection1(1), intersection1(2), intersection1(3), 'ro', 'MarkerSize', 10, 'LineWidth', 2);
plot3(intersection2(1), intersection2(2), intersection2(3), 'bo', 'MarkerSize', 10, 'LineWidth', 2);
I hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by