Main Content

camtarget

Set camera target for Satellite Scenario Viewer

Description

example

camtarget(viewer,target) focuses the camera on the input satellite or ground station. The camera follows target. You can reset the camera target by using camtarget with a different satellite or ground station or by double-clicking anywhere in the map.

Examples

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, ...
      argumentOfPeriapsis,trueAnomaly);

Launch the Satellite Scenario Viewer.

v = satelliteScenarioViewer(sc);

Play the scenario in the viewer.

play(sc,"Viewer",v);

Set the camera target to the satellite.

camtarget(v,sat);

Input Arguments

collapse all

Satellite Scenario Viewer, specified as a scalar satelliteScenarioViewer object.1

Camera target, 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®.