DrawSCPlugIn:

Path: SC/GUIPlugIn

% Draw spacecraft in orbit about a planet. Includes a separate controls window.
 The controls window allows for zooming and orbiting the camera, adjusting 
 the ambient light, and changing renderer or camera target. Only
 external surfaces, as identified by the 'inside' component parameter,
 will be drawn. ]

 There are three calls you need to make when using this plugin.

 (1) Initialize:

   tag = DrawSCPlugIn( 'initialize', g, hFig, position, planet, jD )

   g        is the spacecraft CAD data structure. It must have the following 
            fields: 
               .rECI, ECI orbit position of the spacecraft (km). 
               .qLVLH, needed for camera pointing
            The inertial quaternion (body to ECI) should be stored with the first body.
            The spacecraft model must be in meters.
   hFig     is the handle to the figure window
   position is an array [left bottom width height] which gives the position
            of the plugin in the window
   planet   is the name of any planet in the toolbox, the default is 'earth'
   jD       is the Julian date; passed to SunV1 for solar lighting

   If hFig is not entered it will create a new window. You need to save tag
   to call the function in subsequent calls.

 (2) Update with new state or attitude information

   When passing new information to the plugin use

   DrawSCPlugIn( 'update spacecraft', tag, g, jD )

 (3) Close the windows

   To close the display type

   DrawSCPlugIn( 'quit', tag )

  The plugin will scale the spacecraft model up to 5% of the ECI position
  vector in order for the spacecraft to be rendered by MATLAB.

--------------------------------------------------------------------------
   Form:
   DrawSCPlugIn( action, modifier, hFig, position, planet, jD )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   action      (1,:)  Action
   modifier    (1,:)  Modifier to the action
   hFig        (1,1)  Handle to the figure or if 'update' is jD
   position    (1,4)  [left bottom width height]
   planet      (1,:)  Planet name (corresponding to a mat-file)
   jD          (1,1)  Julian Date
   
   -------
   Outputs
   -------
   tag         (1,:)  The tag that identifies the display   

--------------------------------------------------------------------------

Children:

ACPro: Help/HelpSystem
AerospaceUtils: CAD/BHinge
Common: General/CloseFigure
Common: General/GetListString
Common: Quaternion/QTForm
Common: Quaternion/QZero
Common: Time/Date2JD
Math: Linear/Cross
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/Unit
SC: BasicOrbit/El2RV
SC: Ephem/ECIToPlanet
SC: Ephem/SunV1
SC: SCMat/EarthMR
SC: SCModels/SCForImaging
SC: Visualization/PlotPlanet

Back to the SC Module page