How to get the aircraft location from a flight path plot?

조회 수: 1 (최근 30일)
Jayden Yeo
Jayden Yeo 2021년 9월 21일
댓글: Jayden Yeo 2021년 9월 23일
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?

채택된 답변

Chunru
Chunru 2021년 9월 21일
% 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
ans = 1×3
102.1190 0.9618 153.1604
  댓글 수: 13
Chunru
Chunru 2021년 9월 22일
load data
whos
Name Size Bytes Class Attributes F 1x1 976 griddedInterpolant ans 1x3 24 double heading 15x1 120 double lat 15x1 120 double lon 15x1 120 double t 15x1 120 double
%T = table(t, lat, lon, heading)
% Create an interpolant
F = griddedInterpolant(t, [lon lat heading]);
tq = 8024;
F(tq) % lat lon heading
ans = 1×3
102.1190 0.9618 153.1604
% If you have problem with griddedInterpolant on older version MATLAB
% you can try the following
z = interp1(t, [lon lat heading], tq)
z = 1×3
102.1190 0.9618 153.1604
Jayden Yeo
Jayden Yeo 2021년 9월 23일
Thanks a lot. The command line "z = interp1(t, [lon lat heading], tq)" works.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Guidance, Navigation, and Control (GNC)에 대해 자세히 알아보기

태그

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by