# Design of Cislunar Navigation Constellation via Orbits with a Resonant Period
## 3 Design Methodology
### Resonant Combination Generation and Merging  
The generation of resonant constellations fundamentally requires two steps: (1) selecting a reference orbit and (2) determining whether orbits from other orbital families exhibit periods that form integer ratios with the reference orbit's period. The flowchart of the resonant combination generation algorithm is shown in Figure 4.  
The corresponding orbital family \(\mathbf{B}_{I_{i}}\) is retrieved using its orbital type identifier \(I_{i}\). Then, \(\mathbf{\hat{B}}_{I_{i}}\) is defined as the set of all orbital families excluding \(\mathbf{B}_{I_{i}}\):  
\[\mathbf{\tilde{B}}_{I_{i}}=\left\{\mathbf{B}_{I_{1}},\mathbf{B}_{I_{2}},\ldots,\mathbf{B}_{I_{ i-1}},\mathbf{B}_{I_{i+1}},\ldots,\mathbf{B}_{I_{N_{i}}}\right\} \tag{17}\]  
Special boundary conditions apply when \(i=1\) (first entry) or \(i=N_{t}\) (last entry). \[\mathbf{\tilde{B}}_{I_{1}}=\left\{\mathbf{B}_{I_{2}},\mathbf{B}_{I_{3}},\ldots,\mathbf{B}_{I_{ N_{t}}}\right\} \tag{18}\]  
\[\mathbf{\tilde{B}}_{I_{N_{t}}}=\left\{\mathbf{B}_{I_{1}},\mathbf{B}_{I_{2}},\ldots,\mathbf{B}_ {I_{N_{t}-1}}\right\} \tag{19}\]  
The row vector \(\mathbf{\tilde{p}}_{i}\) is removed from \(\mathbf{\tilde{P}}\) to obtain the characteristic period matrix \(\mathbf{P}^{\prime}\) of the remaining orbital families. The current orbital family \(\mathbf{B}_{I_{i}}\) is iterated through each row (orbit) indexed by \(j=1,2,\ldots,N_{I_{i}}\), where \(N_{I_{i}}\) denotes the row count of \(\mathbf{B}_{I_{i}}\) (equivalent to the total number of orbits in this family). The \(j\)-th orbit is denoted as \(\mathbf{b}_{j}\). The period of orbit \(\mathbf{b}_{j}\) is considered the reference period \(p_{0}\). To identify all resonant orbits with periods proportional to \(p_{0}\), the following variables are initialized:  
* Resonance multiple \(f\). * Period ratio vector \(\mathbf{p}\) (storing periods proportional to \(p_{0}\)). * Orbit combination matrix \(\mathbf{C}\) (recording parameters and type identifiers of resonant orbits). Each row vector \(\mathbf{c}\) in \(\mathbf{C}\) represents a resonant orbit. \[\mathbf{c}=\left[ \begin{array}{cccc}x_{0}&y_{0}&z_{0}&\dot{x}_{0}&\dot{y}_{0}& \dot{z}_{0}&p&o\end{array} \right]\] (20) where \(o\) denotes the type index of the orbit. The procedure for searching all resonant orbits associated with the current baseline orbit is as follows:  
Figure 4: The flowchart of the resonant combination generation algorithm. Initialize the resonance multiple by setting \(f=1\). Initialize the period ratio vector \(\mathbf{p}\), with its first element as \(p_{0}\). Initialize the orbital combination matrix \(\mathbf{C}\). Let \(m\) represent the row index of \(\mathbf{C}\). When \(m=1\), the first row vector records the baseline orbit; then, \(\mathbf{c}_{1}=\left[ \begin{array}{cc}\mathbf{b}_{j}&\mathbf{l}_{i}\end{array} \right]\). 2. Extract the last element \(p_{f}\) from the period ratio vector \(\mathbf{p}\) and compare it with the maximum period \(P_{m}\) in the working orbit library. If \(p_{f}<P_{m}\), increment the resonance multiple \(f\) by 1 and append a new element \(\mathbf{p}=f\times p_{0}\) to \(\mathbf{p}\). 3. Repeat 2 until \(p_{f}>P_{m}\). Remove the last element \(p_{f}\) from \(\mathbf{p}\), thereby obtaining all resonant periods in \(\mathbf{\tilde{B}}_{l_{i}}\) that are proportional to \(p_{0}\), and record them in the vector \(\mathbf{p}\). 4. To search for all resonant orbits, iterate through \(\mathbf{\tilde{B}}_{l_{i}}\). Denote the orbit family index within \(s=1\). 5. Retrieve the current orbit family \(\mathbf{B}_{s}\). Extract the period column vector \(\mathbf{P}_{s}\) from the last column of \(\mathbf{B}_{s}\). From \(\tilde{P}^{\prime}\), obtain the \(s\)-th row vector \(\tilde{p}_{s}\), which represents the characteristic period vector of the current orbit family. 6. Iterate through \(\mathbf{p}\). Let the resonance period index be \(k=1\), such that the current resonance period is \(p_{k}\). 7. Determine if \(p_{k}\) lies within the range specified by \(\mathbf{\tilde{p}}_{s}\).