1 Introduction

A star tracker is one of the most accurate sensors for spacecraft attitude determination [7, 8]. Its typical accuracy ranges from 10 arcsec to sub-arcsec, depending on its size and purpose. Since the star tracker is an optical sensor that estimates geometric star vectors from the images captured by a star camera, the geometric defection called camera parameters, such as lens distortion and misalignment, can affect the sensor measurements. Thus, the calibration for the camera parameters is one of the most important aspects that dictate the star tracker’s performance.

The star tracker calibration is a process of identifying the factors that make measured star positions different from their actual position. The types of calibration are divided into ‘on-ground’ and ‘on-orbit’ calibration according to the purpose, and also can be categorized as attitude dependent (ADC) and attitude independent (AIC) calibration according to the principle [4, 16]. The ADC methods generally define the star measurements as the pixel points for star centroids on the detector coordinate. ADC technique needs the sensor’s attitude information to compare the measurements with the actual star vector on the different coordinate system. On the other hand, The AIC method eliminates the necessity of attitude information by defining the angle between two stars as the measurements [4].

Several star tracker calibration methods have been proposed in recent decades. The on-ground calibrations typically have been performed by using the ADC methods. A fair number of the on-ground calibration uses some devices such as a gimbal or collimated beam in a laboratory-based on the estimated misalignment of the devices [9, 14, 19]. Wei et al. used a nonlinear least-squares algorithm to obtain optimal solutions for 14 parameters in a star sensor calibration process [18]. However, a coupling issue occurred between the intrinsic and extrinsic calibration parameters, including correlations between calibration parameters and misalignment of the rotary stage [11]. Although some papers proposed decoupling approaches [3, 20], these are not free from coupling issues when using a gimbal mount for calibration. Instead of the artificial experimental setup, the natural starlight can also be used for ground star tracker calibration [5], which has advantages in costs as this does not require expensive equipment.

These approaches are also used in on-orbit calibrations with star images; however, obtaining an accurate attitude becomes an issue in this case. This is a “Chicken or the egg” problem: good attitude estimates are needed for accurate star tracker calibration, but accurate calibration parameters are needed to precisely estimate the attitude. As star trackers are the most accurate attitude sensors on most satellites, it is practically difficult to obtain an accurate attitude without them. Several studies address this issue and many use two or more steps to estimate the attitude and parameters separately. Pal and Bhat first estimated the attitude with some of the parameters before estimating the others [13], with a similar approach taken by Geng et al. [22]. Li et al. used the QUEST algorithm to obtain the attitude and calibrate the other parameters separately in multiple steps [6]. These multi-step approaches have been used in practice, but their convergence and optimality have not yet been proven.

The AIC method is another approach to tackle the “Chicken or the egg” problem. It has been widely used in the literature as well as in practice, especially for on-orbit star tracker calibrations [2, 10, 12, 23]. As this is free from the spacecraft attitude, the attitude determination error does not affect the convergence of the calibration parameters, and the algorithm becomes simple and convenient. However, this raises a new question concerning its optimality. As mentioned in [2], the AIC performance depends on the star-pair selection. It may be possible to find an optimal way of selecting pairs, but this has not been reported.

This paper presents a low-cost and straightforward on-ground star tracker calibration method as the ADC. Unlike other ADC methods, Not using any device to control or give the attitude, a star tracker which takes the night sky alone is assumed. We derive a complete set of derivative equations for the measurements with respect to the calibration parameters and the attitude quaternions. For the full-state estimation, the measurement is defined as the star-centroid coordinates in detector space. Then, the weighted least-squares algorithm is applied to estimate the attitude quaternions of each star image as well as the camera parameters at once. As it uses the full-state estimation, the optimality of the estimates is guaranteed in the linear-estimation point of view. The standard deviations of the calibration parameters are compared with the reference study, which can be told a typical AIC method. The attitude determination performance of the calibrated star tracker is discussed with the results from simulations and outdoor experiments.

2 Notation

This section briefly defines the mathematical notation for quaternion and vector operations used in the subsequent sections. A 3-dimensional vector \(\mathbf {v}\) is defined as

$$\begin{aligned} \mathbf {v} = \begin{bmatrix} v_1&v_2&v_3 \end{bmatrix}^\mathrm{T}, \end{aligned}$$
(1)

and a quaternion \(\bar{q}\) is defined as

$$\begin{aligned} \bar{q} = \begin{bmatrix} q_1&q_2&q_3&q_4 \end{bmatrix}^\mathrm{T} = \begin{bmatrix} \mathbf {q} \\ q_4 \end{bmatrix}, \end{aligned}$$
(2)

where \(\mathbf {q}\) is called the vector part, and \(q_4\) is called the scalar term. Here the attitude is represented by the quaternion, which is defined as (2) where

$$\begin{aligned} \mathbf {q} = \hat{e}\sin (\theta /2),\qquad q_4 = \cos (\theta /2). \end{aligned}$$
(3)

The unit vector \(\hat{e}\) is the axis of rotation, and \(\theta \) is the angle of rotation. So, the attitude quaternion always satisfies the unity norm constraint

$$\begin{aligned} \bar{q}^\mathrm{T} \bar{q} = 1. \end{aligned}$$
(4)

An overbar is used to denote quaternions in this paper. Let \(\bar{p}\), \(\bar{q}\), and \(\bar{r}\) be quaternions and let \(T_p\), \(T_q\), and \(T_r\) be the corresponding direction cosine matrices (DCM). The quaternion product operator \(\otimes \) is defined such that \(\bar{r} = \bar{p} \otimes \bar{q}\) corresponds to the product \(T_r = T_p T_q\).

The skew-symmetric matrix that satisfies the cross product \(\mathbf {v} \times \mathbf {b} = [\mathbf {v}\times ]\mathbf {b}\) is given by

$$\begin{aligned}{}[\mathbf {v}\times ] = \begin{bmatrix} 0 &{} -v_3 &{} v_2 \\ v_3 &{} 0 &{} -v_1 \\ -v_2 &{} v_1 &{} 0 \end{bmatrix}, \end{aligned}$$
(5)

for a given 3-dimensional vector \(\mathbf {v}\). Using the notation defined above, a DCM corresponding to an attitude quaternion \(\bar{q}\) can be calculated as

$$\begin{aligned} A( \bar{q} ) = \left( |q_4 |^2 - |\mathbf {q} |^2 \right) I_{3 \times 3} + 2 \mathbf {q} \mathbf {q}^\mathrm{T} - 2 q_4 [ \mathbf {q} \times ]. \end{aligned}$$
(6)

The \(A(\bar{q})\) denotes the DCM corresponding to \(\bar{q}\). From (6), it is inferred that both \(\bar{q}\) and \(-\bar{q}\) represent the same DCM. This means \(\bar{q} = -\bar{q}\) in the sense of rotations.

The inverse quaternion \(\bar{q}^{-1}\) of \(\bar{q}\) is defined as a quaternion that satisfies

$$\begin{aligned} \bar{q}^{-1} \otimes \bar{q} = \bar{q} \otimes \bar{q}^{-1} = \begin{bmatrix}0&0&0&1\end{bmatrix}^\mathrm{T}. \end{aligned}$$
(7)

From (2), (6), and (7), the inverse quaternion \(\bar{q}^{-1}\) is obtained as

$$\begin{aligned} \bar{q}^{-1} = \begin{bmatrix} -\mathbf {q}\\ q_4 \end{bmatrix} \mathrm {or} \begin{bmatrix} \mathbf {q}\\ -q_4 \end{bmatrix}. \end{aligned}$$
(8)

In addition, the estimate of a state x is denoted by the hat symbol as \(\hat{x}\).

3 Camera and Star Measurement Model

The camera model is an eight-parameter inverted version of the model proposed by Wang et al. [17] and used by Enright et al. [2]. Unlike [22], this model does not include tangential distortions, but its effectiveness was empirically verified in [1, 2]. The eight-parameter model is well-described in [2, 17], so this paper only defines the notation and presents the equations, which are nearly identical to [2] with minimal comments for the readers’ convenience.

A star measurement from a star tracker is the coordinate of a star centroid on the detector which is denoted as

$$\begin{aligned} \mathbf {m} = \begin{bmatrix} m_c \\ n_c \end{bmatrix}, \end{aligned}$$
(9)

where \(m_c\) is the column coordinate and \(n_c\) is the row coordinate. The units of \(m_c\) and \(n_c\) are in pixels. The camera model has eight parameters to correct for lens distortion and alignments, which are \(m_0\), \(n_0\), f, \(b_2\), \(b_4\), \(a_1\), \(a_2\), and \(g_y\). The \(m_0\) and \(n_0\) define the optical center in vector form as

$$\begin{aligned} \mathbf {o} = \begin{bmatrix} m_o \\ n_o \end{bmatrix}. \end{aligned}$$
(10)

The f is the focal length of the lens illustrated in Fig. 1a. The \(b_2\) and \(b_4\) are the radial distortion coefficients in vector form as

$$\begin{aligned} \mathbf {b} = \begin{bmatrix} b_2 \\ b_4 \end{bmatrix}. \end{aligned}$$
(11)

These correspond to the radial distortion effect as in Fig. 1c. The linearized rotation of the optical axis, shown in Fig. 1b, is represented by \(a_1\) and \(a_2\) as

$$\begin{aligned} \mathbf {a} = \begin{bmatrix} a_1 \\ a_2 \end{bmatrix}. \end{aligned}$$
(12)

Fig. 1d shows \(g_y\), which is a relative skew factor between the pixel spacing in the column and row directions.

Fig. 1
figure 1

Camera model of the considered eight-parameter star tracker

The inverted camera model reconstructs the 3-dimensional unit star vector in the detector frame \(\mathbf {s}_D\) from the measurement \(\mathbf {m}\) with the eight parameters as follows. For a given measurement \(\mathbf {m}\), the displacement from the optical center can be calculated as

$$\begin{aligned}&\mathbf {u} = \begin{bmatrix} u \\ v \end{bmatrix} \nonumber \\&\quad = \begin{bmatrix} \Delta \left( m_c - m_o\right) \\ g_y\Delta \left( n_c - n_o\right) \end{bmatrix}, \end{aligned}$$
(13)

where \(\Delta \) is the pixel pitch of the detector. Applying an optical-axis rotation correction with \(a_1\) and \(a_2\) gives the displacement from the optical center as

$$\begin{aligned} \mathbf {U} = \begin{bmatrix} U \\ V \end{bmatrix}, \end{aligned}$$
(14)

where

$$\begin{aligned} U = {}&\frac{uf}{a_1v+a_2u+f}, \end{aligned}$$
(15)
$$\begin{aligned} V = {}&\frac{vf}{a_1v+a_2u+f}. \end{aligned}$$
(16)

Then, the radial correction factor B is calculated as

$$\begin{aligned} B = 1+b_2\rho ^2 + b_4\rho ^4, \end{aligned}$$
(17)

where

$$\begin{aligned} \rho ^2 = U^2+V^2. \end{aligned}$$
(18)

With the radial correction factor and the rotation-corrected coordinate, we construct the star vector in a pin-hole camera model with a focal length f as

$$\begin{aligned} \mathbf {r}_D = \begin{bmatrix} \mathrm{BU} \\ \mathrm{BV} \\ f \end{bmatrix}. \end{aligned}$$
(19)

The unit star vector is obtained by normalizing \(\mathbf {r}_D\) as

$$\begin{aligned} \mathbf {s}_D = \frac{\mathbf {r}_D}{|\mathbf {r}_D|}. \end{aligned}$$
(20)

The star measurement model, which is the inverse of (13)–(20), is a star centroid coordinate on a detector as calculated from a unit star vector. For a given unit star vector in a reference frame \(\mathbf {s}_r\), the star vector in the detector frame is calculated as

$$\begin{aligned} \mathbf {s}_D=A(\bar{q})\mathbf {s_r}, \end{aligned}$$
(21)

where \(\bar{q}\) is the attitude quaternion from the reference frame to the detector frame. Then, \(\mathbf {r}_D\) is calculated with a given focal length f as

$$\begin{aligned} \mathbf {r}_D=\frac{f}{s_{D,3}} \mathbf {s}_D. \end{aligned}$$
(22)

With \(r_2\) defined by

$$\begin{aligned} r^2_2 = r^2_{D,1} + r^2_{D,2} = B^2\left( U^2+V^2\right) , \end{aligned}$$
(23)

(17) becomes

$$\begin{aligned} B=1+b_2\frac{r^2_2}{B^2}+b_4\frac{r^4_2}{B^4}. \end{aligned}$$
(24)

We determine B by solving the equation

$$\begin{aligned} B^5-B^4-b_2r^2_2B^2-b_4r^4_2=0, \end{aligned}$$
(25)

where B is numerically calculated using the simple Newton–Raphson method. With B, the parameters of U and V are obtained as

$$\begin{aligned}&U = r_{D,1} / B, \end{aligned}$$
(26)
$$\begin{aligned}&V = r_{D,2} / B. \end{aligned}$$
(27)

From (15) and (16),

$$\begin{aligned} \mathbf {u} = - f \begin{bmatrix} Ua_2 - f &{} Ua_1 \\ Va_2 &{} Va_1-f \end{bmatrix}^{-1} \begin{bmatrix} U \\ V \end{bmatrix}. \end{aligned}$$
(28)

Finally, the star measurement \(\mathbf {m}\) is written as

$$\begin{aligned} \mathbf {m} = \frac{1}{\Delta } \begin{bmatrix} 1 &{} 0 \\ 0 &{} \frac{1}{g_y}\end{bmatrix} \mathbf {u} + \mathbf {o} + \varvec{\nu }_{ij}, \end{aligned}$$
(29)

where \(\varvec{\nu }_{ij}\) is the additive measurement of the j-th star in the i-th image noise given as

$$\begin{aligned} \varvec{\nu }_{ij} \sim {}&N(0,R_{ij}), \nonumber \\ R_{ij} = {}&\mathrm {diag}\left( \sigma _{ijx}^2,\sigma _{ijy}^2\right) . \end{aligned}$$
(30)

The partial derivatives of \(\mathbf {m}\) with respect to the eight parameters and attitude is derived to apply a nonlinear least-squares method. Though complicated, it is possible to derive the derivatives in the form of

$$\begin{aligned} \mathrm{d}\mathbf {m}&=\frac{\partial \mathbf {m}}{\partial \mathbf {q}} \mathrm{d}\mathbf {q}+ \frac{\partial \mathbf {m}}{\partial \mathbf {o}} \mathrm{d}\mathbf {o} + \frac{\partial \mathbf {m}}{\partial f} \mathrm{d}f + \frac{\partial \mathbf {m}}{\partial \mathbf {b}} \mathrm{d}\mathbf {b}+ \frac{\partial \mathbf {m}}{\partial \mathbf {a}} \mathrm{d}\mathbf {a} \nonumber \\&\quad + \frac{\partial \mathbf {m}}{\partial g_y} {\mathrm{d}g_y} \nonumber \\&=M_q \mathrm{d}\mathbf {q} + M_o \mathrm{d}\mathbf {o} + M_f \mathrm{d}f + M_b \mathrm{d}\mathbf {b} + M_a \mathrm{d}\mathbf {a} \nonumber \\&\quad + M_{g_y} \mathrm{d}g_y, \end{aligned}$$
(31)

which are derived in Appendix A.1. Equations (49)–(76) give the partial derivatives of \(M_q, M_o, M_f, M_b, M_a\), and \(M_{g_y}\).

4 Camera Parameter Calibration with Attitude Estimation

Camera parameter calibration is accomplished using a nonlinear weighted least-squares approach with iterations. We assume that we have m star images and each image has \(n_i\) stars where \(i=1,2,\ldots ,m\). For each iteration, we calculate the measurement error \(\delta \mathbf {m}_{ij}\) for the j-th star in the i-th image as

$$\begin{aligned} \delta \mathbf {m}_{ij} = \mathbf {m}_{ij} - \hat{\mathbf {m}}_{ij}, \end{aligned}$$
(32)

where \(\mathbf {m}_{ij}\) is the measured star centroid and \(\hat{\mathbf {m}}_{ij}\) is the expected value on the detector, which is calculated from (21) to (29) using the current state estimates of \((\hat{\bar{q}}_i, \hat{\mathbf {o}}, \hat{f}, \hat{\mathbf {b}}, \hat{\mathbf {a}}, \hat{g}_y)\). The derivatives of the measurement error of (31) allows formulating a linearized measurement error system as

$$\begin{aligned}&\underbrace{ \begin{bmatrix} \delta \mathbf {m}_{11}\\ \vdots \\ \delta \mathbf {m}_{1n_1}\\ \vdots \\ \delta \mathbf {m}_{m1}\\ \vdots \\ \delta \mathbf {m}_{mn_m} \end{bmatrix} }_{\delta \mathbf {y}} = \underbrace{ \begin{bmatrix} M_{q11} &{} 0 &{} \cdots &{} M_{o11} &{} M_{f11} &{} M_{b11} &{} M_{a11} &{} M_{g_y11} \\ &{} &{} &{} \vdots &{} &{} &{} &{}\\ M_{q1n_1} &{} 0 &{} \cdots &{} M_{o1n_1} &{} M_{f1n_1} &{} M_{b1n_1} &{} M_{a1n_1} &{} M_{g_y1n_1} \\ &{} &{} &{} \vdots &{} &{} &{} &{}\\ 0 &{} \cdots &{} M_{qm1} &{} M_{om1} &{} M_{fm1} &{} M_{bm1} &{} M_{am1} &{} M_{g_ym1} \\ &{} &{} &{} \vdots &{} &{} &{} &{} &{}\\ 0 &{} \cdots &{} M_{qmn_m} &{} M_{omn_m} &{} M_{fmn_m} &{} M_{bmn_m} &{} M_{amn_m} &{} M_{g_ymn_m} \\ \end{bmatrix} }_{H} \underbrace{ \begin{bmatrix} \delta \mathbf {q}_1 \\ \vdots \\ \delta \mathbf {q}_m \\ \delta \mathbf {o} \\ \delta f \\ \delta \mathbf {b} \\ \delta \mathbf {a} \\ \delta g_y \end{bmatrix} }_{\delta \mathbf {x}} + \underbrace{ \begin{bmatrix} \varvec{\nu }_{11}\\ \vdots \\ \varvec{\nu }_{1n_1}\\ \vdots \\ \varvec{\nu }_{m1}\\ \vdots \\ \varvec{\nu }_{mn_m} \end{bmatrix} }_{\mathbf {N}}. \end{aligned}$$
(33)

Equation (33) is a typical linear system of equations \(\delta \mathbf {y} = H \delta \mathbf {x} + \mathbf {N}\); thus, \(\delta \mathbf {x}\) can be estimated optimally using a weighted least-squares as

$$\begin{aligned} \delta \mathbf {x} = \left( H^\mathrm{T} R^{-1} H\right) ^{-1}H^\mathrm{T} R^{-1} \delta \mathbf {y}, \end{aligned}$$
(34)

where

$$\begin{aligned} R = E\left[ \mathbf {N} \mathbf {N}^\mathrm{T}\right] = \begin{bmatrix} R_{11} &{} &{} 0 \\ &{} \ddots &{} \\ 0&{} &{} R_{mn_m} \end{bmatrix}. \end{aligned}$$
(35)

With \(\delta \mathbf {x}\) obtained from (34), the attitude estimates are updated as

$$\begin{aligned} \hat{\bar{q}}^+_i = \begin{bmatrix} \delta \mathbf {q}\\ 1 \end{bmatrix} \otimes \hat{\bar{q}}_i, \end{aligned}$$
(36)

for \(i=1,2,\ldots ,M\). The camera parameters are updated as

$$\begin{aligned} \hat{\mathbf {o}}^+ = {}&\delta \mathbf {o} + \hat{\mathbf {o}}, \nonumber \\ \hat{f}^+ = {}&\delta f + \hat{f}, \nonumber \\ \hat{\mathbf {b}}^+ = {}&\delta \mathbf {b} + \hat{\mathbf {b}}, \nonumber \\ \hat{\mathbf {a}}^+ = {}&\delta \mathbf {a} + \hat{\mathbf {a}}, \nonumber \\ \hat{g}^+_y = {}&\delta g_y + \hat{g}_y, \end{aligned}$$
(37)

The superscript + means the iterative estimate on the nonlinear least squares algorithm.

5 Application Note

5.1 Initial Guess of The States

The nonlinear least-squares presented in the previous section runs with the determined state estimates, which means that the first iteration requires an initial guess. For most star trackers, \(\hat{\mathbf {o}}_0 = [ N_\mathrm{column}/2 , N_\mathrm{row}/2]^\mathrm{T} \), \(\hat{\mathbf {b}}_0 = [0,0]^\mathrm{T}\), \(\hat{\mathbf {a}}_0 = [0,0]^\mathrm{T}\), and \(\hat{g}_{y0}=1\) may be the nominal design parameters, and it is convenient to use them as the initial guess. However, the weighted least-squares with \(\hat{\mathbf {b}}_0 = [0,0]^T\) causes the matrix inversion to be singular in (34). Without radial distortion, the shift in the optical center is identical to a shift in the attitude, which makes \(M_q\) and \(M_o\) linearly dependent. To prevent the singular matrix inverse, a non-zero \(\hat{\mathbf {b}}_0\) is required for the first iteration. This can be a problem if the lens is so well-made that the radial distortion is nearly zero, but this does not often occur in real applications. For the initial attitude guess, the q-method or the QUEST algorithm can be used with the initial camera parameters to determine the initial states for the first iteration [15].

5.2 Parameter Normalization

As the orders of magnitude for the parameter values can be different from each other, the \((H^\mathrm{T} R^{-1} H)\) in (34) can be numerically ill-conditioned, and the matrix inverse becomes unstable. Enright et al. proposed an effective method to overcome this issue using parameter normalization [2], which is used here.

6 Attitude Estimation Performance

The goal of a star tracker is to estimate the attitude, where the estimation accuracy is of interest to the users. With the proposed calibration method using a weighted least-squares, the covariance of the state estimates is given by

$$\begin{aligned} P = {}&\left( H^\mathrm{T} R^{-1} H\right) ^{-1} \nonumber \\ = {}&\begin{bmatrix} P_{q_1q_1} &{} \cdots &{} P_{q_1q_m} &{} P_{q_1o} &{} \cdots &{} P_{q_1g_y} \\ \vdots &{} \ddots &{} &{} &{} &{} \\ P_{q_mq_1} &{} &{} P_{q_mq_m} &{} &{} &{} \\ P_{oq_1} &{} &{} &{} P_{oo} &{} &{} \\ \vdots &{} &{} &{} &{} \ddots &{} \\ P_{g_yq_1} &{} &{} &{} &{} &{}P_{g_yg_y} \end{bmatrix}. \end{aligned}$$
(38)

where \(P_{q_1q_1},\ldots ,P_{q_mq_m}\) are the covariances of the attitude estimates from the calibration. However, these do not truly represent the attitude determination error of a star tracker in practice. Once a star tracker is installed on a spacecraft, the attitude determination performance is measured by comparing the attitude outputs to other sensors such as another star tracker, payload camera, or gyroscopes. Thus, the common, bias-like, slowly varying errors are blended into its misalignment, and only the high-frequency errors are measured on-orbit. Apart from \(P_{q_1q_1},\ldots ,P_{q_mq_m}\) in (38), a new metric that represents the measurable performance is derived here. We consider an approximated bias attitude quaternion vector of the attitude estimates in the calibration as

$$\begin{aligned} \delta \mathbf {q}_{b} = \frac{1}{m}\sum _{i}^m \delta \mathbf {q}_i = \frac{1}{m} \underbrace{ \begin{bmatrix} I&\cdots&I \end{bmatrix}}_{I_m} \begin{bmatrix} \delta \mathbf {q}_1 \\ \vdots \\ \delta \mathbf {q}_m \end{bmatrix}, \end{aligned}$$
(39)

with an assumption of a large m. Then, the covariance of the attitude bias can be approximated as

$$\begin{aligned} P_{q_bq_b} = {}&E\begin{bmatrix} \delta \mathbf {q}_{b} \delta \mathbf {q}_{b}^\mathrm{T} \end{bmatrix} \nonumber \\ = {}&\frac{1}{m^2}I_m \underbrace{\begin{bmatrix} P_{q_1q_1} &{} \cdots &{} P_{q_1q_m} \\ \vdots &{} \ddots &{} \\ P_{q_mq_1} &{} &{} P_{q_mq_m} \end{bmatrix}}_{P_{qq}} I_m^\mathrm{T}. \end{aligned}$$
(40)

The practically measurable attitude error without bias, \(\delta \mathbf {p}_{i}\), is calculated as

$$\begin{aligned} \delta \mathbf {p}_{i} = \delta \mathbf {q}_i- \delta \mathbf {q}_{b}, \end{aligned}$$
(41)

and its covariance is given by

$$\begin{aligned} P_{p_ip_i} = {}&E\begin{bmatrix} \left( \delta \mathbf {q}_i- \delta \mathbf {q}_{b}\right) \left( \delta \mathbf {q}_i- \delta \mathbf {q}_{b}\right) ^\mathrm{T} \end{bmatrix} \nonumber \\ = {}&P_{q_iq_i} - P_{q_iq_b} - P_{q_bq_i} + P_{q_bq_b}, \end{aligned}$$
(42)

where

$$\begin{aligned} P_{q_iq_b} = {}&E\begin{bmatrix} \delta \mathbf {q}_i (\frac{1}{m} \sum _{j}^m \delta \mathbf {q}_j)^\mathrm{T}\end{bmatrix} \nonumber \\ = {}&\frac{1}{m} \sum _{j}^m P_{q_iq_j}, \nonumber \\ P_{q_bq_i} = {}&\frac{1}{m} \sum _{j}^m P_{q_jq_i} = P_{q_iq_b}^\mathrm{T}. \end{aligned}$$
(43)

Finally, the expected measurable error covariance is given as

$$\begin{aligned} P_{pp} = \frac{1}{m} \sum _{i}^m P_{p_ip_i}. \end{aligned}$$
(44)

This new metric that estimates the practical attitude performance of a star tracker, \(P_{pp}\), is numerically verified in the following section.

Fig. 2
figure 2

Standard deviation for the camera parameter calibration process using 1000 star images

7 Simulation Study

The following parameters are used for the simulations in this section. The nominal focal length and pixel pitch are \(\bar{f}=16 \text { mm}\) and \(\Delta = 3.75 \text { }\upmu \text {m}\), respectively. A \([1280 \times 960]\) resolution detector is assumed, which gives a field of view of \([17.1 \times 12.8] \text { deg}\) with a nominal optical center at \((\bar{m}_o,\bar{n}_o)=(640,480)\). The nominal values for the radial distortion coefficients \((\bar{b}_2,\bar{b}_4)\) and the linearized rotation coefficient \((\bar{a}_1,\bar{a}_2)\) are zeros, and the nominal skew factor \(\bar{g}_y\) is 1. For the calibration simulations, small perturbations are applied to the nominal values of the eight parameters whose standard deviations are assumed to be \(\sigma _{m_o}=20,\sigma _{n_o}=15 \text { pixels}\), \(\sigma _{f} = 10^{-3}\text { m}\), \(\sigma _{b2} = 10^3\), \(\sigma _{b4} = 10^8\), \(\sigma _{a_1} = \sigma _{a_2} =3\text { deg}\), and \(\sigma _{g_y} = 2\times 10^{-4}\) by referencing the Sinclair Interplanetary ST-16 star tracker data in [2]. For the additive measurement noise of \(\mathbf {\nu }_{ij}\) in (30), \(\sigma _{ijx}=\sigma _{ijy}=0.5 \text { pixels}\) is assumed as modern star trackers are capable of star centroid determination with sub-pixel accuracy.

7.1 Camera Parameter Calibration

This section presents the calibration performance of the proposed method. The camera parameters are estimated from simulated star images, whose star centroids are generated randomly instead of from a star catalog. Though the simulated approach may be different from actual star patterns, this gives a brief insight into the performance of the proposed calibration method with respect to the number of captured stars. One thousand images are used for each calibration, and additional stars are added gradually as the number of stars increases for consistency. For example, the image of 6 stars includes all the stars from the 5-star image plus one additional star.

Figure 2 shows the standard deviation of the camera parameter estimates to the number of captured stars in a given image, which is calculated from (38). For the reader’s convenience, the norms of \([\sigma _{m_o},\sigma _{n_o}]\) and \([\sigma _{a_1},\sigma _{a_2}]\) are plotted in Fig. 2a, e, respectively. To show the effectiveness of the full-state estimation approach, the results are compared to those from the AIC method proposed by Enright et al. [2], which uses the identical camera model. As seen in Fig. 2, the standard deviations from the proposed methods are approximately four times smaller than those from the AIC method. This shows that the proposed method outperforms AIC due to the optimality of the full-state estimations.

Figure 3 shows the average standard deviation of the quaternion estimates calculated from

$$\begin{aligned} P_{qi,avr} = {}&\frac{1}{m} \sum _{i}^m P_{q_iq_i}, \nonumber \\ \sigma _{qi,avr} = {}&\sqrt{\text {diag}(P_{qi,\mathrm{avr}})}. \end{aligned}$$
(45)

Some readers may think this is against common belief as the standard deviation is too large compared to actual star trackers. Generally, a modern star tracker gives about 10 arcsec and 100 arcsec accuracies in the cross-boresight and boresight directions, respectively. This issue is discussed in Sect. 6. The practically measurable attitude determination performance is different from the raw attitude covariance \(P_{q_iq_i}\). Thus, the value of \(\sigma _{qi,\mathrm{avr}}\) does not represent actual star tracker performance. The following section discusses the practical performance of the star tracker.

Fig. 3
figure 3

Average standard deviation of the attitude errors \(\delta \mathbf {q}_i\). x, y: cross boresight, z: boresight

Fig. 4
figure 4

Practically measurable standard deviation for the attitude estimates

7.2 Attitude Determination Performance

As discussed in Sect. 6, the practical attitude covariance can be calculated from (44). Monte-Carlo simulations are conducted to verify the new approach, and the results are compared to the standard deviation from (44). In each case, 100,000-star images are generated with perturbed parameters, and the QUEST algorithm estimates the attitude with the calibrated parameters as estimated from 1000 simulated star images. Then, the attitude bias is calculated by averaging the quaternion estimates, and the standard deviation of the 100,000 sample attitude is calculated with respect to the bias. Figure 4 shows the standard deviation from (44) as \(\sigma _{pp}\), and the Monte-Carlo simulations give \(\sigma \) from the simulation. In this result, the differences between \(\sigma \) from the simulation and \(\sigma _{pp}\) are less than 0.5\(\%\), which is negligible considering the nature of Monte-Carlo simulations. The authors believe that this bias-free error is what was observed with real hardware experiments.

Table 1 Star tracker parameters and initial values

8 Outdoor Experiment

Outdoor experiments are conducted to test the calibration performance of the proposed algorithm. The ArduCam, which is a low-cost, open-source camera module, and the Raspberry Pi 4 are used for the experiments. The main detector of ArduCam, AR0135AT, is CMOS image sensor, 1.2MP, 1/3”, global shutter. Table 1 gives the key specifications of AR0135AT, and the initial values of the calibration parameters.

Fig. 5
figure 5

Centroid coordinates of stars from 1000 star image frames for the outdoor experiments

The star images are taken every 3 s during the night, and 10 to 15 stars are captured in each image. The full-state parameter calibration is performed with 1000 images and 11,985 star measurements to estimate the eight calibration parameters and attitude. The centroid coordinates of the stars \(\mathbf {m}\) are calculated using the star identification algorithm. Figure 5 shows all centroid coordinates for the 11,985 stars as captured on the detector. As the star camera is fixed on the ground, the stars flow in one direction over time due to the Earth rotation. 3000 s was sufficient to obtain distributed measurements on most of the detector area.

To show the calibration performance, the angle between the restored star vectors in the detector frame, \(\mathbf {s}_D\), and the expected star vectors, \(A(\hat{\bar{q}}) \mathbf {s}_r\), is calculated as

$$\begin{aligned} \theta _{ij} = \mathrm{cos}^{-1}\left( \mathbf {s}_{D,ij} \cdot A\left( \hat{\bar{q}}_i\right) \mathbf {s}_{r,ij}\right) , \end{aligned}$$
(46)

for the j-th star in the i-th image where \(\mathbf {s}_r\) is the unit reference star vector in the inertial frame from the star catalog. Figure 6 shows the standard deviations \(\sigma _{\theta _{i}}\) calculated with

$$\begin{aligned} \sigma _{\theta _{i}}^2 = \frac{1}{n_i} \sum _{j}^{n_i} \theta _{ij}^2, \end{aligned}$$
(47)

where \(i=1,2,\ldots ,1000\). The maximum and minimum values are 8.3 and 2.7 arcsec, respectively. Despite using commercial off-the-shelf (COTS) star camera modules, the experimental results demonstrate the nominal performance shown in Sect. 7.2 and illustrate that the proposed method can be effectively applied to actual star tracker calibration procedures.

Fig. 6
figure 6

Standard deviation of the calibration error angles for each star image

9 Conclusions

A new star tracker parameter calibration method with star images is presented. The proposed approach is considered an attitude-dependent calibration (ADC) approach since it requires attitude estimates for the calibration. A complete set of partial derivative equations for the measurement errors is derived, which makes it possible to estimate full-states in a single step. The calibration performance of the proposed method is demonstrated using numerical simulations and compared with the result of the typical AIC method. Figure 2 indicates that the standard deviation of each parameter with the proposed method is under a fourth of that with the AIC method. Also, a practical approach for the evaluation of the calibrated star tracker’s attitude determination performance is proposed using the covariance matrix of parameter estimates. When the evaluation results are compared with real attitude errors from the Monte-Carlo simulations, the difference appears to be less than 0.5\(\%\). The outdoor experimental results demonstrate the feasibility of the proposed calibration method even with low-cost COTS hardware. Though not presented here, the derivative equations can be used for on-board star tracker calibration with recursive estimation approaches or even for spacecraft attitude determination with a Kalman filtering method directly.