Gyro:

Path: SC/Sensor

% Models a gyro. 
 Input is a data structure with, at a minimum,

   input.type  'hrg default'  (for a default Hemispherical Resonating Gyro)
   input.u     eye(3) (for three orthogonal gyros)

 You may fill in the rest of the data structure or use the built in defaults.
 
 Optical and other solid-state gyros have the equations

   dangle/dt = w + b      + d.angleRandomWalk1Sigma*randn 
     db/dt   =  -d.beta*b + d.biasRandomWalk1Sigma *randn
         y   = angle      + d.outputNoise1Sigma    *randn
         c   = fix(d.scaleFactor*y/d.lSB)

 Mechanical gyros have the equation terms in the output equation

         y   = (d.forwardGain/d.damping)(d.angularMomentum*angle
                                         - d.torqueRebalanceGain*z)
             + d.outputNoise1Sigma*randn

 and the additional state

     dz/dt   = y;

 where beta is the correlation time constant for the bias drift.

 On initialization, the scale factor and bias are set using

   d.scaleFactor = d.scaleFactor + d.scaleFactor1Sigma*randn
   d.bias        = d.bias1Sigma*randn

 Valid types are:

   hrg default
   fog default
   Mechanical RIG default
   Mechanical RG default

 For failures the input is the index of the failed gyro.
   
--------------------------------------------------------------------------
   Form:
   output = Gyro( action, input )
--------------------------------------------------------------------------

   ---------
   Arguments
   ---------
   action      (1,:)    Action

   action is 'initialize'
   input       (1,1)    Data structure
                        .type        (1,:) Same as input string described above
                        .u           (3,n) Unit vectors for the gyros
                        .lSB         (1)   LSB for the gyros (quantization)

--------------------------------------------------------------------------
	References: Farrenkopf, R.L., (1974). Generalized Results for
               Precision Attitude Reference Systems Using Gyros.
               AIAA Paper 74-903.
--------------------------------------------------------------------------

Children:

SC: Attitude/RW2SDev
SC: Sensor/Counter

Back to the SC Module page