How to get the aircraft location from a flight path plot?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have the below data (dummy data) of a aircraft flight path, with the time, latitude. longitude and heading of the aircraft in a table.
The actual data consists of more than 100k rows, and file is too big to be uploaded.
Based on the actual data, I am able to plot the flight path on a map. The flight path map has an x-axis of Longitude and y-axis of Latitude. Problem is if I want to know the location of the aircraft at a particular time (say at 7220sec), how can I get the latitude, longitude and heading of the aircraft from the plot?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/744844/image.jpeg)
0 commentaires
Réponse acceptée
Chunru
le 21 Sep 2021
% Generate some data
t = (7020:210:10080)';
lon = 102.915 - t/10080;
lat = 1.363 - t/20000;
heading = 153 + t/50040;
% Create an interpolant
F = griddedInterpolant(t, [lon lat heading]);
t = 8024;
F(t) % lat lon heading
13 commentaires
Chunru
le 22 Sep 2021
load data
whos
%T = table(t, lat, lon, heading)
% Create an interpolant
F = griddedInterpolant(t, [lon lat heading]);
tq = 8024;
F(tq) % lat lon heading
% If you have problem with griddedInterpolant on older version MATLAB
% you can try the following
z = interp1(t, [lon lat heading], tq)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Guidance, Navigation, and Control (GNC) dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!