%PHYSICALPROPERTIES   Retrieve/modify physical properties of satellite
%   PROP = physicalProperties(SAT) returns a vector of
%   Aero.satellitescenario.satellite.PhysicalProperties objects PROPS that
%   contain the currently used physical properties for each satellite in
%   the input vector of matlabshared.satellitescenario.Satellite objects
%   SAT.
%
%   PROP = physicalProperties(SAT, NAME=VALUE) updates the physical
%   properties of each satellite in SAT specified by optional name-value
%   arguments and returns the updated
%   Aero.satellitescenario.satellite.PhysicalProperties objects in the
%   vector PROP. The physical properties corresponding to the unspecified
%   name-value arguments remain unchanged. When <a href="matlab:help('satelliteScenario.AutoSimulate')">AutoSimulate</a> of the
%   satellite scenario is false, you can specify the optional name-value
%   arguments only when <a href="matlab:help('satelliteScenario.SimulationStatus')">SimulationStatus</a> is NotStarted.
%
%   Inputs:
% 
%   SAT :Satellite objects, specified as a vector of
%        matlabshared.satellitescenario.Satellite objects.
% 
% 
%   Name-Value arguments:
% 
%   Mass                    :Satellite mass in kg, specified as a positive
%                            scalar or vector double. When specified as a
%                            scalar, the value is applied to all satellites
%                            in SAT. When specified as a vector, the number
%                            of elements must equal that of SAT. Each value
%                            in Mass is applied to the corresponding
%                            element in SAT. The default value is current
%                            value of <a href="matlab:help('Aero.satellitescenario.satellite.PhysicalProperties.Mass')">Mass</a> property of <a href="matlab:help('matlabshared.satellitescenario.satellite.PhysicalProperties')">PhysicalProperties</a>
%                            property of SAT.
% 
%   DragCoefficient         :Satellite drag coefficient, specified as a
%                            nonnegative scalar or vector double. When
%                            specified as a scalar, the value is applied to
%                            all satellites in SAT. When specified as a
%                            vector, the number of elements must equal that
%                            of SAT. Each value in DragCoefficient is
%                            applied to the corresponding element in SAT.
%                            The default value is current value of
%                            <a href="matlab:help('Aero.satellitescenario.satellite.PhysicalProperties.DragCoefficient')">DragCoefficient</a> property of <a href="matlab:help('matlabshared.satellitescenario.satellite.PhysicalProperties')">PhysicalProperties</a>
%                            property of SAT.
% 
%   DragArea                :Satellite drag area in m^2, specified as a
%                            nonnegative scalar or vector double. When
%                            specified as a scalar, the value is applied to
%                            all satellites in SAT. When specified as a
%                            vector, the number of elements must equal that
%                            of SAT. Each value in DragArea is applied to
%                            the corresponding element in SAT. The default
%                            value is current value of <a href="matlab:help('Aero.satellitescenario.satellite.PhysicalProperties.DragArea')">DragArea</a> property of
%                            <a href="matlab:help('matlabshared.satellitescenario.Satellite.PhysicalProperties')">PhysicalProperties</a> property of SAT.
% 
%   ReflectivityCoefficient :Reflectivity coefficient of the satellite,
%                            specified as a nonnegative scalar double. When
%                            specified as a scalar, the value is applied to
%                            all satellites in SAT. When specified as a
%                            vector, the number of elements must equal that
%                            of SAT. Each value in ReflectivityCoefficient
%                            is applied to the corresponding element in
%                            SAT. The default value is current value of
%                            <a href="matlab:help('Aero.satellitescenario.satellite.PhysicalProperties.ReflectivityCoefficient')">ReflectivityCoefficient</a> property of
%                            <a href="matlab:help('matlabshared.satellitescenario.Satellite.PhysicalProperties')">PhysicalProperties</a> property of SAT.
% 
%   SRPArea                 :Solar radiation pressure area of the
%                            satellite, specified in m^2 as a nonnegative
%                            scalar or vector double. When specified as a
%                            scalar, the value is applied to all satellites
%                            in SAT. When specified as a vector, the number
%                            of elements must equal that of SAT. Each value
%                            in SRPArea is applied to the corresponding
%                            element in SAT. The default value is current
%                            value of <a href="matlab:help('Aero.satellitescenario.satellite.PhysicalProperties.SRPArea')">SRPArea</a> property of
%                            <a href="matlab:help('matlabshared.satellitescenario.Satellite.PhysicalProperties')">PhysicalProperties</a> property of SAT.
% 
%   Outputs:
% 
%   PROP :Physical properties of satellite, specified as a scalar
%         Aero.satellitescenario.satellite.PhysicalProperties object. The
%         object properties correspond to the name-value arguments
%         described above.
%
%   % Example
%   
%   % Visualize the effect of atmospheric drag and solar radiation pressure
%   % on a satellite.
%
%   % Create a satellite scenario object.
%   startTime = datetime(2022,11,17,14,40,0);
%   stopTime = startTime + days(1);
%   sampleTime = 60; % s
%   sc = satelliteScenario(startTime,stopTime,sampleTime)
%   
%   % Add a numerical propagator to the scenario. Enable atmospheric drag
%   % and solar radiation pressure and set the gravitational potential
%   % model to oblate-Earth (J2 perturbation).
%   numericalPropagator(sc, ...
%       IncludeAtmosDrag=true, ...
%       IncludeSRP=true, ...
%       GravitationalPotentialModel="oblate-ellipsoid")
%   
%   % Create two satellites with identical orbital parameters. Assign the
%   % numerical propagator to them.
%   sat = satellite(sc, ...
%       [6578137  6578137], ...
%       [0 0], ...
%       [50 50], ...
%       [0 0], ...
%       [0 0], ...
%       [0 0], ...
%       OrbitPropagator="numerical", ...
%       Name=["Without drag and SRP" "With drag and SRP"]);
%   
%   % Set the mass of both satellites to 500 kg. Set the drag and reflectivity
%   % coefficients for the first satellite to 0. This ensures the first
%   % satellite does not encounter any atmospheric drag or solar radiation
%   % pressure. Set the drag area and SRP area to 0.8 m^2.
%   prop = physicalProperties(sat, ...
%       Mass = 500, ...   % kg
%       DragCoefficient=[0 2.179], ...
%       DragArea=0.8, ... % m^2
%       ReflectivityCoefficient=[0 1.8], ...
%       SRPArea=0.8);     % m^2
%   prop(1)
%   prop(2)
%   
%   % Launch a satellite scenario viewer.
%   v = satelliteScenarioViewer(sc);
%   hide(sat.Orbit);
%   
%   % Play the scenario. Set the camera target to the second satellite. Observe
%   % the divergence of the trajectory of the two satellites.
%   play(sc);
%   camtarget(v,sat(1));
%
%   See also satelliteScenario, <a href="matlab:help('satelliteScenario.satellite')">satellite</a>, <a href="matlab:help('satelliteScenario.numericalPropagator')">numericalPropagator</a>

 
%   Copyright 2023 The MathWorks, Inc.

