%groundTrack   Visualize ground track
%   goundTrack(SAT) adds ground track visualization for each satellite in
%   the vector SAT based on their current positions. The ground track
%   begins at the satelliteScenario StartTime and ends at the
%   satelliteScenario StopTime. The resolution (the spacing between samples
%   that make up the ground track visualization) is determined by the
%   scenario sample time. If no viewer (Satellite Scenario Viewer) is open,
%   a new viewer is launched, and the ground track is displayed. If a 
%   viewer is already open, the ground track is added to that viewer.
%
%   groundTrack(SAT, NAME, VALUE) displays the ground track of each 
%   satellite in SAT using additional parameters specified by one or more 
%   name-value pairs.
%
%   groundTrack Name-Value pairs:
%
%   Viewer - Specify the Satellite Scenario Viewer on which to show the 
%       ground track. The default value is a vector that contains all 
%       Viewer objects associated with the satellite scenario object.
%
%   In addition to Viewer, the properties listed below except 
%   VisibilityMode can be specified as name-value pairs.
%
%   GroundTrack properties:
%      <a href="matlab:help('matlabshared.satellitescenario.GroundTrack.LeadTime')">LeadTime</a>       - Duration of future ground track to show in Satellite Scenario Viewer
%      <a href="matlab:help('matlabshared.satellitescenario.GroundTrack.TrailTime')">TrailTime</a>      - Duration of ground track history to show in Satellite Scenario Viewer
%      <a href="matlab:help('matlabshared.satellitescenario.GroundTrack.LineWidth')">LineWidth</a>      - Width of ground track
%      <a href="matlab:help('matlabshared.satellitescenario.GroundTrack.LeadLineColor')">LeadLineColor</a>  - Color of ground track future
%      <a href="matlab:help('matlabshared.satellitescenario.GroundTrack.TrailLineColor')">TrailLineColor</a> - Color of the ground track history
%      <a href="matlab:help('matlabshared.satellitescenario.Orbit.VisibilityMode')">VisibilityMode</a> - Visibility of graphic relative to satellite
%
%   GroundTrack methods:
%      <a href="matlab:help('matlabshared.satellitescenario.ScenarioGraphic.show')">show</a> - Show ground track in viewer
%      <a href="matlab:help('matlabshared.satellitescenario.ScenarioGraphic.hide')">hide</a> - Hide ground track in viewer
%
%   % Example
%
%   % Visualize the ground track of a satellite in geosynchronous orbit 
%   % over a period of 5 days and analyze the coverage area of the
%   % satellite using its ground track
%
%   % Create a satelliteScenario object.
%   startTime = datetime(2020,5,10);
%   stopTime = startTime + days(5);
%   sampleTime = 60;
%   sc = satelliteScenario(startTime,stopTime,sampleTime);
%
%   % Calculate the semi-major axis of the geostationary satellite that 
%   % will be added to the scenario.
%   earthAngularVelocity = 0.0000729211585530; % rad/s
%   orbitalPeriod = 2*pi/earthAngularVelocity; % seconds
%   earthStandardGravitationalParameter = 398600.4418e9; % m^3/s^2
%   semiMajorAxis = (earthStandardGravitationalParameter*((orbitalPeriod/(2*pi))^2))^(1/3);
%
%   % Define the remaining orbital elements of the geostationary satellite 
%   % that will be added to the scenario.
%   eccentricity = 0;
%   inclination = 60; % degrees
%   rightAscensionOfAscendingNode = 0; % degrees
%   argumentOfPeriapsis = 0; % degrees
%   trueAnomaly = 0; % degrees
%
%   % Add the geostationary satellite to the scenario.
%   sat = satellite(sc,semiMajorAxis, ...
%       eccentricity, ...
%       inclination, ...
%       rightAscensionOfAscendingNode, ...
%       argumentOfPeriapsis, ...
%       trueAnomaly, ...
%       "OrbitPropagator","two-body-keplerian", ...
%       "Name","GEO Sat");
%
%   % Visualize the scenario.
%   v = satelliteScenarioViewer(sc);
%
%   % Add a ground track of the satellite to the visualization and adjust 
%   % how much future and history of the ground track must be displayed.
%   leadTime = 2*24*3600; % seconds
%   trailTime = leadTime;
%   gt = groundTrack(sat,"LeadTime",leadTime, ...
%       "TrailTime",trailTime)
%
%   % Animate the scenario to visualize the satellite movement and its 
%   % trace on the ground. The satellite covers the area around Japan 
%   % during one half of the day and Australia during the other.
%   play(sc);
%
%   See also <a href="matlab:help('satelliteScenario.satellite')">satellite</a>, show, fieldOfView

 
%   Copyright 2020 The MathWorks, Inc.

