Main Content

gimbal

Add gimbal to satellite or ground station

Description

example

gimbal(parent) adds a default Gimbal object to parent, which can be a satellite, ground station, or gimbal. A gimbal can dynamically change orientation independent of the parent. Transmitters, receivers, and conical sensors can be mounted on the gimbals.

gimbal(parent,Name,Value) specifies options using one or more name-value arguments.

gim = gimbal(___) returns a handle to the added gimbal. Specify any input argument combination from previous syntaxes.

Examples

expand all

Create a satellite scenario with a start time of 15-June-2021 8:55:00 AM UTC and a stop time of five days later. Set the simulation sample time to 60 seconds.

startTime = datetime(2021,6,21,8,55,0);
stopTime = startTime + days(5);
sampleTime = 60;                                      % seconds
sc = satelliteScenario(startTime,stopTime,sampleTime)
sc = 
  satelliteScenario with properties:

         StartTime: 21-Jun-2021 08:55:00
          StopTime: 26-Jun-2021 08:55:00
        SampleTime: 60
           Viewers: [0x0 matlabshared.satellitescenario.Viewer]
        Satellites: [1x0 matlabshared.satellitescenario.Satellite]
    GroundStations: [1x0 matlabshared.satellitescenario.GroundStation]
          AutoShow: 1

Add a satellite to the scenario using Keplerian orbital elements.

semiMajorAxis = 7878137;                                                                    % meters
eccentricity = 0;
inclination = 50;                                                                           % degrees
rightAscensionOfAscendingNode = 0;                                                          % degrees
argumentOfPeriapsis = 0;                                                                    % degrees
trueAnomaly = 50;                                                                           % degrees
sat = satellite(sc,semiMajorAxis,eccentricity,inclination,rightAscensionOfAscendingNode, ...
    argumentOfPeriapsis,trueAnomaly)
sat = 
  Satellite with properties:

               Name:  Satellite 1
                 ID:  1
     ConicalSensors:  [1x0 matlabshared.satellitescenario.ConicalSensor]
            Gimbals:  [1x0 matlabshared.satellitescenario.Gimbal]
       Transmitters:  [1x0 satcom.satellitescenario.Transmitter]
          Receivers:  [1x0 satcom.satellitescenario.Receiver]
           Accesses:  [1x0 matlabshared.satellitescenario.Access]
        GroundTrack:  [1x1 matlabshared.satellitescenario.GroundTrack]
              Orbit:  [1x1 matlabshared.satellitescenario.Orbit]
    OrbitPropagator:  sgp4
        MarkerColor:  [1 0 0]
         MarkerSize:  10
          ShowLabel:  true
     LabelFontColor:  [1 0 0]
      LabelFontSize:  15

Add a ground station which represents the location to be photographed, to the scenario.

gs = groundStation(sc,"Name","Location To Photograph", ...
    "Latitude",42.3001,"Longitude",-71.3504)               % degrees
gs = 
  GroundStation with properties:

                 Name:  Location To Photograph
                   ID:  2
             Latitude:  42.3 degrees
            Longitude:  -71.35 degrees
             Altitude:  0 meters
    MinElevationAngle:  0 degrees
       ConicalSensors:  [1x0 matlabshared.satellitescenario.ConicalSensor]
              Gimbals:  [1x0 matlabshared.satellitescenario.Gimbal]
         Transmitters:  [1x0 satcom.satellitescenario.Transmitter]
            Receivers:  [1x0 satcom.satellitescenario.Receiver]
             Accesses:  [1x0 matlabshared.satellitescenario.Access]
          MarkerColor:  [0 1 1]
           MarkerSize:  10
            ShowLabel:  true
       LabelFontColor:  [0 1 1]
        LabelFontSize:  15

Add a gimbal to the satellite. You can steer this gimbal independently of the satellite.

g = gimbal(sat)
g = 
  Gimbal with properties:

                Name:  Gimbal 3
                  ID:  3
    MountingLocation:  [0; 0; 0] meters
      MountingAngles:  [0; 0; 0] degrees
      ConicalSensors:  [1x0 matlabshared.satellitescenario.ConicalSensor]
        Transmitters:  [1x0 satcom.satellitescenario.Transmitter]
           Receivers:  [1x0 satcom.satellitescenario.Receiver]

Track the location to be photographed using the gimbal.

pointAt(g,gs);

Add a conical sensor to the gimbal. This sensor represents the camera. Set the field of view to 60 degrees.

camSensor = conicalSensor(g,"MaxViewAngle",60)
camSensor = 
  ConicalSensor with properties:

                Name:  Conical sensor 4
                  ID:  4
    MountingLocation:  [0; 0; 0] meters
      MountingAngles:  [0; 0; 0] degrees
        MaxViewAngle:  60 degrees
            Accesses:  [1x0 matlabshared.satellitescenario.Access]
         FieldOfView:  [0x0 matlabshared.satellitescenario.FieldOfView]

Add access analysis between the camera and the location to be photographed. The access is added to the conical sensor.

ac = access(camSensor,gs)
ac = 
  Access with properties:

    Sequence:  [4 2]
    LineWidth:  1
    LineColor:  [0.5 0 1]

Visualize the field of view of the camera by using the Satellite Scenario Viewer.

v = satelliteScenarioViewer(sc);
fieldOfView(camSensor);

Determine the intervals during which the camera can see the geographical site.

t = accessIntervals(ac)
t=35×8 table
          Source                   Target             IntervalNumber         StartTime                EndTime           Duration    StartOrbit    EndOrbit
    __________________    ________________________    ______________    ____________________    ____________________    ________    __________    ________

    "Conical sensor 4"    "Location To Photograph"           1          21-Jun-2021 10:38:00    21-Jun-2021 10:55:00      1020           1            2   
    "Conical sensor 4"    "Location To Photograph"           2          21-Jun-2021 12:36:00    21-Jun-2021 12:58:00      1320           2            3   
    "Conical sensor 4"    "Location To Photograph"           3          21-Jun-2021 14:37:00    21-Jun-2021 15:01:00      1440           3            4   
    "Conical sensor 4"    "Location To Photograph"           4          21-Jun-2021 16:41:00    21-Jun-2021 17:04:00      1380           5            5   
    "Conical sensor 4"    "Location To Photograph"           5          21-Jun-2021 18:44:00    21-Jun-2021 19:07:00      1380           6            6   
    "Conical sensor 4"    "Location To Photograph"           6          21-Jun-2021 20:46:00    21-Jun-2021 21:08:00      1320           7            7   
    "Conical sensor 4"    "Location To Photograph"           7          21-Jun-2021 22:50:00    21-Jun-2021 23:04:00       840           8            8   
    "Conical sensor 4"    "Location To Photograph"           8          22-Jun-2021 09:51:00    22-Jun-2021 10:02:00       660          13           13   
    "Conical sensor 4"    "Location To Photograph"           9          22-Jun-2021 11:46:00    22-Jun-2021 12:07:00      1260          14           15   
    "Conical sensor 4"    "Location To Photograph"          10          22-Jun-2021 13:46:00    22-Jun-2021 14:10:00      1440          15           16   
    "Conical sensor 4"    "Location To Photograph"          11          22-Jun-2021 15:50:00    22-Jun-2021 16:13:00      1380          16           17   
    "Conical sensor 4"    "Location To Photograph"          12          22-Jun-2021 17:53:00    22-Jun-2021 18:16:00      1380          18           18   
    "Conical sensor 4"    "Location To Photograph"          13          22-Jun-2021 19:55:00    22-Jun-2021 20:18:00      1380          19           19   
    "Conical sensor 4"    "Location To Photograph"          14          22-Jun-2021 21:58:00    22-Jun-2021 22:16:00      1080          20           20   
    "Conical sensor 4"    "Location To Photograph"          15          23-Jun-2021 10:56:00    23-Jun-2021 11:16:00      1200          26           27   
    "Conical sensor 4"    "Location To Photograph"          16          23-Jun-2021 12:56:00    23-Jun-2021 13:19:00      1380          27           28   
      ⋮

Calculate the maximum revisit time in hours.

startTimes = t.StartTime;
endTimes = t.EndTime;
revisitTimes = hours(startTimes(2:end) - endTimes(1:end-1));
maxRevisitTime = max(revisitTimes)                             % hours
maxRevisitTime = 12.6667

Visualize the revisit times that photographs the location.

play(sc);

Input Arguments

expand all

Element of scenario to which the gimbal is added, specified as a Satellite, GroundStation, or Gimbal object.

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'MountingAngle',[20; 35; 10] sets the yaw, pitch, and roll angles of gimbal to 20, 35, and 10 degrees, respectively.

You can set this property only when calling gimbal. After you call gimbal, this property is read-only.

gimbal name, specified as a comma-separated pair consisting of 'Name' and a string scalar, string vector, character vector or a cell array of character vectors.

  • If only one gimbal is added, specify Name as a string scalar or a character vector.

  • If multiple gimbals are added, specify Name as a string vector or a cell array of character vectors. The number of elements in the string vector or cell array must be equal to the number of satellites being added.

In the default value, idx is the count of the gimbal added by the gimbal object function. If another gimbal of the same name exists, a suffix _idx2 is added, where idx2 is an integer that is incremented by 1 starting from 1 until the name duplication is resolved.

Data Types: char | string

Mounting location with respect to the parent object, specified as a three-element row vector of positive numbers in meters. The position vector is specified in the body frame of the input parent.

Mounting orientation with respect to parent object, specified as a three-element row vector of positive numbers in degrees. The elements of the vector correspond to yaw, pitch, and roll in that order. Yaw, pitch, and roll are positive rotations about the parent's z - axis, intermediate y - axis and intermediate x - axis of the parent.

Example: [0; 30; 60]

Output Arguments

expand all

Gimbal attached to parent, returned as a Gimbal object.

Introduced in R2021a