How to represent two airport locations in a grid in Matlab and plot the flight path between the two airports ? I am trying to write a code for Aircraft flight path optimisation.

1 view (last 30 days)
I am writing a code for aircraft flight optimisation. I need to represent the Delhi Airport (28.556210, 77.099561) and Kolkata airport(22°39'07.8"N 88°26'43.7"E) in a grid and show the flight bath between the 2 points. I need to form a grid of 300-by-200. Each small box in the grid will be 1kmx1km.
How do I show the 2 airports and make a grid in matlab.
I know basics of Matlab but I am not able to think how to do this. Please help me. I am in desperate need.

Answers (1)

KSSV
KSSV on 17 Feb 2017
D = [2 3] ; % be your Delhi coordinates
K = [5 6] ; % be your Kolkata coordinates
m = 300 ; n = 200 ;
x=linspace(D(1),K(1),m) ;
y=linspace(D(2),K(2),n) ;
[X,Y] = meshgrid(x,y) ;
mesh(X,Y)
view(2)

Categories

Find more on Guidance, Navigation, and Control (GNC) 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!