Clear Filters
Clear Filters

Flight Simulator Flight Data

4 views (last 30 days)
Harrison Gibson
Harrison Gibson on 30 Oct 2018
Answered: Neelanshu on 2 Jan 2024
Sorry, I am new to MATLAB. I have the GPS coordinates (longitude,latitude) as well as the altitude data for several flights coming into land in a flight simulator. I am wondering if is it possible to see how far participants deviated off the glidepath (a 3 degree slope) as they came into land? E.g. plot the altitude as they come into land using the GPS coordinates and see how far they deviated off of the "perfect" landing/slope?

Answers (1)

Neelanshu
Neelanshu on 2 Jan 2024
Hi Harrison,
I understand from your query that you need assistance in determining the deviation of the flight's actual path from an ideal descent path, given the GPS coordinates and altitude of the flight.
Based on the example you mentioned, it seems there is a deviation in altitude only. I have created dummy data for the latitude, longitude, and altitude, assuming that the landing follows a non-linear descent profile, exponential decay. The altitude of the ideal trajectory is obtained by using tangent with the expected 2d trajectory. Kindly refer to the code snippet attached below:
format long
%Assumptions:
% 1. deviation is possible only in altitude
% Define the number of data points
numPoints = 100;
% Define the starting and ending altitudes in meters
% Assuming the starting altitude is 3000 meters and the plane lands at 0 meters
start_altitude = 3000; % in meters
end_altitude = 0; % touchdown
% Create a non-linear vector for altitude using an exponential decay
% The decay rate determines how quickly the altitude decreases
decay_rate = 2;
altitude = start_altitude * exp(-decay_rate * (0:numPoints-1));
altitude(end) = end_altitude;
% Generate dummy latitude and longitude values assuming a straight path
% Define the starting and ending coordinates for the approach
% Assuming the runway threshold is at latitude 40.0 and longitude -75.0
start_latitude = 40.1; % 0.1 degrees north of the runway
end_latitude = 40.0;
start_longitude = -75.05; % 0.05 degrees west of the runway
end_longitude = -75.0;
% Create linearly spaced vectors for latitude and longitude
latitude = linspace(start_latitude, end_latitude, numPoints);
longitude = linspace(start_longitude, end_longitude, numPoints);
% Combine the latitude, longitude, and altitude into a single array
% Each row of the array represents a point in the format [latitude, longitude, altitude]
planeLandingPath = [latitude', longitude', altitude'];
%Ideal landing path 3 degree slope
expectedAltitude = tan(3*pi/180)*sqrt((latitude - end_latitude).^2+(longitude - end_longitude).^2)
expectedAltitude = 1×100
0.005859367851334 0.005800182317482 0.005740996783631 0.005681811249779 0.005622625715927 0.005563440182075 0.005504254648223 0.005445069114371 0.005385883580519 0.005326698046668 0.005267512512816 0.005208326978964 0.005149141445112 0.005089955911260 0.005030770377408 0.004971584843556 0.004912399309704 0.004853213775852 0.004794028242001 0.004734842708149 0.004675657174297 0.004616471640445 0.004557286106593 0.004498100572742 0.004438915038890 0.004379729505038 0.004320543971186 0.004261358437334 0.004202172903482 0.004142987369630
deviation = abs(altitude-expectedAltitude)
deviation = 1×100
1.0e+03 * 2.999994140632149 0.406000049527521 0.054941175669419 0.007430574718749 0.001000765257992 0.000130636349105 0.000012928382412 0.000002950482957 0.000005048278056 0.000005281008107 0.000005261329052 0.000005207490139 0.000005149028191 0.000005089940584 0.000005030768303 0.000004971584563 0.000004912399272 0.000004853213771 0.000004794028241 0.000004734842708 0.000004675657174 0.000004616471640 0.000004557286107 0.000004498100573 0.000004438915039 0.000004379729505 0.000004320543971 0.000004261358437 0.000004202172903 0.000004142987370
plot3(latitude,longitude,altitude)
hold on;
plot3(latitude,longitude,expectedAltitude)
Here is the obtained altitude deviation:
Figure 1 Altitude deviation of the flight
Hope this helps,
Regards,
Neelanshu

Categories

Find more on Visualization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!