From 11bd66a12a7d7d2cf046ebd16ce792dff78e4b94 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Thu, 13 Jun 2024 12:39:52 -0600 Subject: [PATCH] Updated documentation --- .../coarseSunSensor/coarseSunSensor.rst | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/simulation/sensors/coarseSunSensor/coarseSunSensor.rst b/src/simulation/sensors/coarseSunSensor/coarseSunSensor.rst index e69c70d778..0f430186e1 100644 --- a/src/simulation/sensors/coarseSunSensor/coarseSunSensor.rst +++ b/src/simulation/sensors/coarseSunSensor/coarseSunSensor.rst @@ -15,9 +15,27 @@ The corruption types are outlined in this .. warning:: Be careful when generating CSS objects in a loop or using a function! It is often convenient to initialize many CSS' with the same attributes using a loop with a function like ``setupCSS(CSS)`` where ``setupCSS`` initializes the field of view, sensor noise, min / max outputs, etc. If you do this, be sure to disown the memory in Python so the object doesn't get accidentally garbage collected or freed for use. You can disown the memory though ``cssObject.this.disown()``. -The coarse sun sensor module also supports user-enabled faulty behavior by assigning a values to the ``.faultState`` member of a given sensor. An example of such call would is ``cssSensor.faultState = coarse_sun_sensor.CSSFAULT_OFF`` where ``cssSensor`` is an instantiated sensor, and ``coarse_sun_sensor`` is the imported module. +It is possible to define an asymmetrical field of view for the CSS. This is useful when trying to simulate baffles that partially limit the field of view of the sensor in a certain direction, usually to avoid reflected sunlight fo enter the view of the CSS. This requires not only the definition of the CSS boresight vector :math:`\boldsymbol{\hat{n}}`, but also two additional unit vectors :math:`\boldsymbol{\hat{l}}` and :math:`\boldsymbol{\hat{m}}` that define a full CSS frame. This custom field of view is modeled as the combination of two pseudo-ellipses in the :math:`(l,m)` plane. The resulting planar, closed curve is projected onto the unit sphere surface in the positive :math:`\boldsymbol{\hat{n}}` direction. The custom field of view can be set up as follows:: -The module currently supports the following faults: + CSS = coarseSunSensor.CoarseSunSensor() + CSS.ModelTag = "coarseSunSensor" + CSS.scaleFactor = 1 + CSS.lHat_B = lHat_B + CSS.mHat_B = mHat_B + CSS.nHat_B = nHat_B + CSS.customFov = True + CSS.fovXi = xi + CSS.fovEta = eta + CSS.fovZeta = zeta + CSS.n1 = n1 + CSS.n2 = n2 + + +where :math:`\xi` indicates the half-angle field of view in the :math:`+\boldsymbol{\hat{m}}` direction, :math:`\eta` indicates the half-angle field of view in the :math:`-\boldsymbol{\hat{m}}` direction, and :math:`\zeta` indicates the half-angle field of view in the positive :math:`\pm \boldsymbol{\hat{l}}` direction. By design, the field of view is symmetric with respect to the :math:`(l,n)` plane. The coefficients :math:`n_1` and :math:`n_2` are warping coefficients that allow to obtain more rectangular shapes for the two half ellipsoids as :math:`n_1, n_2 >> 2`. Setting :math:`n_1 = n_2 = 2` ensures that the half ellipsoids are, in fact, half ellipses; setting :math:`\xi = \eta = \zeta` returns a regular conical field of view. + +The coarse sun sensor module also supports user-enabled faulty behavior by assigning a values to the ``.faultState`` member of a given sensor. An example of such call would is ``cssSensor.faultState = coarse_sun_sensor.CSSFAULT_OFF`` where ``cssSensor`` is an instantiated sensor, and ``coarse_sun_sensor`` is the imported module. + +The module currently supports the following faults: .. list-table:: ``CoarseSunSensor`` Fault Types :widths: 35 50 @@ -32,9 +50,9 @@ The module currently supports the following faults: * - ``CSSFAULT_STUCK_MAX`` - CSS signal is stuck on the maximum value * - ``CSSFAULT_STUCK_RAND`` - - CSS signal is stuck on a random value + - CSS signal is stuck on a random value * - ``CSSFAULT_RAND`` - - CSS produces random values + - CSS produces random values