Main Content


Set camera target for satellite scenario viewer



camtarget(viewer,target) focuses the camera on the input satellite or ground station. The camera follows the object and can be unlocked by calling camtarget on another satellite or ground station or by double-clicking anywhere in the map.


collapse all

Create a satellite scenario object.

sc = satelliteScenario;

Add a satellite to the scenario;

semiMajorAxis = 10000000;                             % meters
eccentricity = 0;
inclination = 0;                                      % degrees
rightAscensionOfAscendingNode = 0;                    % degrees
argumentOfPeriapsis = 0;                              % degrees
trueAnomaly = 0;                                      % degrees
sat = satellite(sc,semiMajorAxis,eccentricity, ...
      inclination,rightAscensionOfAscendingNode, ...

Launch the Satellite Scenario Viewer.

v = satelliteScenarioViewer(sc);

Play the scenario in the viewer.


Set the camera target to the satellite.


Input Arguments

collapse all

Satellite scenario viewer, specified as a satelliteScenarioViewer object. viewer must be specified as a scalar satelliteScenarioViewer object.1

Target of the camera, specified as a scalar Satellite or GroundStation object.

Version History

Introduced in R2021a

1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.