# An Effective Sensor Architecture for Full-Attitude Determination in the HERMES Nano-Satellites
## 2 Effective Sensor Architecture
#### Full-Attitude Determination with Sensor Measurements  
The proposed sensor architecture guarantees a continuous availability of measurements to estimate the attitude states. In fact, also in case of the failure of some sensors, the available redundant components can be exploited to continue with the nominal operations. The attitude determination section's algorithms use the calibrated Sun and magnetic sensor measurements:  
\[\mathbf{\hat{s}}_{C},\quad\mathbf{b}_{C}, \tag{1}\]  
Figure 3: Fine sun sensors’ mounting. Figure 2: Spacecraft configuration. to statistically solve [PERSON]'s problem with the QUEST implementation for quaternions [23]. The calibrated data were obtained from the raw measured ones as  
\[\mathbf{\hat{s}}_{\mathrm{C}}=\mathbf{\hat{s}}_{M}-\mathbf{\hat{s}}_{E} \tag{2}\]  
\[\mathbf{b}_{\mathrm{C}}=(\mathbf{I}_{3\times 3}+\mathbf{D}_{\mathbf{b}}) \mathbf{b}_{M}-\boldsymbol{\varepsilon}_{\mathbf{b}_{\mathbf{b}}}, \tag{3}\]  
where \(\mathbf{b}_{M}\) and \(\mathbf{\hat{s}}_{M}\) are, respectively, the measured geomagnetic field and Sun direction, \(\boldsymbol{\varepsilon}_{\mathbf{b}_{\mathbf{b}}}\) is the estimated bias of the magnetometer, \(\mathbf{D}_{\mathbf{b}}\) is the fully populated matrix of scale factors and non-orthogonality magnetometer errors, and \(\mathbf{\hat{s}}_{E}\) is the estimated error in the Sun direction due to the influence of the Earth's albedo. The magnetic calibration parameters are continuously estimated on-board with a sequential centered iterative algorithm [25]. The Sun sensors' correction for the albedo are computed knowing the position of the Earth and its irradiance and reflection models [26], the spectral response of the photodiodes, and the measurement functions of the Sun sensors. These algorithms are valid in sunlight, where it is assumed to exploit the Sun and magnetic field measurements, with the addition of the position vector estimate by the orbit determination algorithms, \(\mathbf{r}\), and the current time, \(t\). These last two quantities are used in the environment models in order to compute the geomagnetic field and the Sun direction in the inertial reference frame: \(\mathbf{b}^{I}\) and \(\mathbf{\hat{s}}^{I}\). The environment models are based on the Chebyshev ephemerides of the Sun and on the IGRF model of the Earth's magnetic field [27]. Moreover, the spacecraft position vector is also used to compute the Earth parameters used in the albedo correction functions. Whenever two independent vector measurements from the sensors are not available (e.g., during eclipses), a dead-reckoning attitude propagation is initialized from the last valid attitude state. The attitude kinematics is then propagated with the unbiased output of the gyroscopes. The gyroscope calibration function estimates the angular velocity biases, \(\boldsymbol{\varepsilon}_{\mathbf{b}_{\omega}}\), with a sequential complementary filter [28], whose bias dynamics is expressed as follows:  
\[\boldsymbol{\dot{\varepsilon}}_{\mathbf{b}_{\omega}}=-k_{\mathbf{b}_{\omega}} \mathrm{sign}(\tilde{q}_{\mathbf{\hat{q}}})\mathbf{\hat{q}}_{1:3}, \tag{4}\]  
where \(\mathbf{\tilde{q}}=[\mathbf{\hat{q}}_{1:3},\tilde{q}_{\mathbf{\hat{q}}}]\) is the estimated attitude quaternion with its vector and scalar parts. The angular velocity is then corrected with the current best estimate of the biases:  
\[\boldsymbol{\omega}_{\mathrm{C}}=\boldsymbol{\omega}_{M}-\boldsymbol{ \varepsilon}_{\mathbf{b}_{\omega}}, \tag{5}\]  
where \(\boldsymbol{\omega}_{M}\) is the spacecraft's measured angular rate vector. Note that the sensor calibration is not updated during the dead-reckoning propagation periods. The static attitude determination logic uses the calibrated sensor measurements to implement the QUEST algorithm.