Main Content

gimbalAngles

Steering angles of gimbal

Description

az = gimbalAngles(gimbal) returns an array of gimbal azimuth az histories of the gimbals defined in the vector gimbal.

[az,el] = gimbalAngles(gimbal) returns an array of gimbal azimuth azand gimbal elevation el in the vector gimbal.

example

[___] = gimbalAngles(gimbal,timeIn) returns column vectors of gimbal azimuth and gimbal elevation of gimbals defined in the vector gimbal at the specified time timeIn, depending on the specified output arguments.

[az,el,timeOut] = gimbalAngles(gimbal) returns gimbal azimuth, gimbal elevation, and corresponding time in UTC.

Examples

expand all

Create a satellite scenario object.

startTime = datetime(2020,10,10);                     % 10 October 2020, 12:00 AM UTC
stopTime = datetime(2020,10,11);                      % 11 October 2020, 12:00 AM UTC
sampleTime = 60;                                      % seconds
sc = satelliteScenario(startTime,stopTime,sampleTime);

Add a satellite to the scenario.

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

Add a gimbal to the satellite.

g = gimbal(sat);

Point the gimbal at 0 degree latitude and longitude.

pointAt(g,[0; 0; 0]);

Get the gimbal azimuth and gimbal elevation corresponding to October 10, 2020, 20:54 PM UTC.

time = datetime(2020,10,10,20,54,0);
[az,el] = gimbalAngles(g,time)
az = -5.4268
el = 19.0368

Input Arguments

expand all

Gimbal object whose steering angle is being calculated, specified as either a scalar or a vector.

Time at which the output is calculated, specified as a datetime scalar. If no time zone is specified in timeIn, the time zone is assumed to be UTC.

Output Arguments

expand all

Gimbal azimuth histories of gimbals in degrees, returned as an array in the range [-180,180]. Each row corresponds to a gimbal in gimbal, and each column corresponds to a time sample. This represents the angle of rotation of the gimbal about its y-axis.

If AutoSimulate of the satellite scenario is true, az returns the gimbal azimuth history from StartTime to StopTime. Otherwise the gimbal azimuth history is returned from StartTime to SimulationStatus.

Gimbal elevation histories of gimbals in degree, returned as an array in the range [0,180]. This represents the angle of rotation of the gimbal about its y-axis. Each row corresponds to a gimbal in gimbal, and each column corresponds to a time sample. This represents the angle of rotation of the gimbal about its x-axis.

If AutoSimulate of the satellite scenario is true, el returns the gimbal elevation history from StartTime to StopTime. Otherwise the gimbal elevation history is returned from StartTime to SimulationStatus.

Time samples between start and stop time of the scenario, returned as a scalar or vector. If az and el histories are returned, timeOut is a row vector.

Version History

Introduced in R2021a