在 MATLAB 中更改绘图中心或相机旋转点 - Earth_example

Change Plot Center or Camera Rotate Point in MATLAB - Earth_example

我正在使用这个 Earth_example 文件在 MATLAB 中围绕 3D 地球绘制飞行数据:

http://www.mathworks.com/matlabcentral/fileexchange/13823-3d-earth-example

为了检查飞行路径,我希望能够将旋转点移动到飞行路径上的某个位置或到达或离开点,但我找不到可以让我这样做。我已经尝试过 camtarget 和 campos,但都没有让我围绕绘图中的新点旋转,并且 campos 抛出警告并在 3D 地球绘图中失败。是否有一种功能可以让您更新场景中心以轻松围绕新点旋转?

这是我的代码片段:

%% Calculate & Plot Great Circle Trajectories

for flight = flight_struct
    % [lat,lon] = gcwaypts(lat1,lon1,lat2,lon2,nlegs) - (nlegs = # of waypts along path)
    [lat,lon] = gcwaypts(flight.DepartureLatitude,flight.DepartureLongitude,flight.ArrivalLatitude,flight.ArrivalLongitude,50);

    % 3D Trajectories
    alt = ones(length(lat),1)*cruise_alt;
    lla_pos = [lat,lon,alt];
    ecef_pos = lla2ecef(lla_pos);
    x = ecef_pos(:,1);
    y = ecef_pos(:,2);
    z = ecef_pos(:,3);
    plot3(x,y,z,'r','LineWidth',1)

感谢任何help/guidance。

我认为您正在寻找 camorbit,如下所示:

http://www.mathworks.com/help/matlab/views.html