make a flight path on geoglobe with altitude, longitude and latitude data and make it not just plot in the air but fill it from ground in matlab

To create a flight path on GeoGlobe in MATLAB, you can use the geoplot3 function. This function allows you to plot 3D geographic data on a globe.

Here is an example of how you can create a flight path with altitude, longitude, and latitude data:

main.m
% Sample latitude, longitude, and altitude data
lat = [53.5461, 53.5470, 53.5479];
lon = [-113.498333, -113.498233, -113.498133];
alt = [800, 1000, 1200];

% Create a GeoGlobe
globe = geoglobe;

% Plot the flight path
geoplot3(globe, lat, lon, alt, 'LineWidth', 2);

% Add color to the flight path
c = colorGradient(size(lat, 2), 'red', 'blue');
geoscatter(globe, lat, lon, alt, 10, 'MarkerFaceColor', c);

% Fill the flight path from the ground
hold on;
surface([lat;lat],[lon;lon],[zeros(size(lat));zeros(size(lon));alt],...
        'facecolor','interp','edgecolor','none','facealpha',0.5);
hold off;

% Adjust the view
view(3);

% Add a colorbar
colormap(gca,c);
colorbar;

% Set title and labels
title('Flight Path on GeoGlobe');
xlabel('Latitude');
ylabel('Longitude');
zlabel('Altitude');
795 chars
34 lines

Make sure you have the Mapping Toolbox and the Aerospace Toolbox installed to use the geoglobe function.

This code will plot the flight path on the GeoGlobe and fill it from the ground with a color gradient. The altitude values will determine the height of the flight path. Adjust the latitude, longitude, and altitude values in the lat, lon, and alt variables to match your own data.

Note that the colorGradient function is a custom function used to create a gradient of colors for the flight path based on the number of data points.

gistlibby LogSnag