# A Simulation of Contact Graph Routing for Mars-Earth Data Communication
## 2 Model of CGR
### Arrangement of the Contact Graph
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \(\mathbf{r}\) & **Route** & \(\mathbf{r}\) & **Route** & \(\cdots\) & \(\mathbf{r}\) & **Route** & \(\mathbf{r}\) & **Route** & \(\mathbf{r}\) & **Route** \\ \hline
1 & \(1\to 2\) & \(k_{1}+1\) & \(2\to 3\) & \(\cdots\) & \(k_{-4}+1\) & \((n-3)\to(n-2)\) & \(k_{-3}+1\) & \((n-2)\to(n-1)\) & \(k_{-2}+1:=k_{-1}\) & \((n-1)\to n\) \\
2 & \(1\to 3\) & \(k_{1}+2\) & \(2\to 4\) & \(\cdots\) & \(k_{-4}+2\) & \((n-3)\to(n-1)\) & \(k_{-3}+2:=k_{-2}\) & \((n-2)\to n\) & & \\
3 & \(1\to 4\) & \(k_{1}+3\) & \(2\to 5\) & \(\cdots\) & \(k_{-4}+3:=k_{-3}\) & \((n-3)\to n\) & & & & \\
4 & \(1\to 5\) & \(k_{1}+4\) & \(2\to 6\) & \(\cdots\) & & & & & & \\ \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\cdots\) & \(\cdots\) & & & & & \\ \(\vdots\) & \(\vdots\) & \(\frac{k_{1}+(n-2)}{n-2}\) & \(2\to n\) & & & & & & & \\ \((n-1):=k_{1}\) & \(1\to n\) & & & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: All combinations of every two of \(n\) nodes. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & **PR** & **CR** & **MRO** & **ODY** & **TGO** & **MVN** & **USA** & **SPN** & **AUS** \\ \hline PR & - & - & \(c_{13}\) & \(c_{14}\) & \(c_{15}\) & \(c_{16}\) & - & - & - \\ CR & - & - & \(c_{23}\) & \(c_{24}\) & \(c_{25}\) & \(c_{26}\) & - & - & - \\ MRO & - & - & - & - & - & - & \(c_{37}\) & \(c_{38}\) & \(c_{39}\) \\ ODY & - & - & - & - & - & - & \(c_{47}\) & \(c_{48}\) & \(c_{49}\) \\ TGO & - & - & - & - & - & - & \(c_{57}\) & \(c_{58}\) & \(c_{59}\) \\ MVN & - & - & - & - & - & - & \(c_{67}\) & \(c_{68}\) & \(c_{69}\) \\ USA & - & - & - & - & - & - & - & - & - \\ SPN & - & - & - & - & - & - & - & - & - \\ AUS & - & - & - & - & - & - & - & - & - \\ \hline \hline \end{tabular}  
* PR = Perseverance Rover, CR = Curiosity Rover, TGO = Trace Gas Orbiter, MRO = Mars Reconnaissance Orbiter, ODY = Odyssey, MVN/MAVEN = Mars Atmosphere and Volatile Evolution, USA = United States, SPN = Spain, AUS = Australia.  
\end{table} 
Table 2: Access matrix among rovers, satellites, and DSN antennas. DSN antenna in Group 3. Due to the very far distance between satellite and DSN antenna, step 1 and step 2 occur at different times (minutes). If \(n=9\), then \(\mathit{ids}=(0,8,7,\ldots,35)\). The vector \(x\) will be very helpful for identifying the satellite that collects the stored data from the previous time intervals in Section 2.4. Values \(d=1,2,\ldots,n_{d}(t)\), where \(n_{d}(t)\) is the number of data packets at time \(t\). The value of \(n_{d}(t)\) depends on the randomly chosen data size, which is explained in Section 2.2. Parameter \(t\) in Equation (4) is the time in a Martian day, or a sol. The time is in 24 h, so \(t=1,2,\ldots,M\), where \(M=1440\). If \(t=1\), the time interval is 00:00 to 00:01. For another example, if \(t=120\), the time interval is 01:59 to 02:00, and so on. Define \(C_{j}(t)\) the storage capacity of satellite \(j\) at time \(t\) as follows:  
\[C_{j}(t)=\Sigma_{i=1}^{2}c_{ij}(t). \tag{5}\]  
where \(j=3,4,5,6\) is the index number of MRO, Odyssey, TGO, and MAVEN, respectively. Consequently, we also have \(j=3,4,5,6\)  
\[C_{j}(t)=\Sigma_{k=7}^{9}c_{jk}(t). \tag{6}\]  
The contact windows of satellites are not always open and depend on the positions of satellites, whether they happen to close to Mars, Earth, or neither of them. As the input of our algorithm, we need to have the schedule of contact windows, which can be updated based on historical data, or from a preceding approximation of the distances from a rover to a satellite and from a satellite to a DSN antenna. For rover-\(i\) and satellite \(j\), we define  
\[rs_{ij}(t)=\left\{ \begin{array}{ll}1,&\text{if rover-$i$ and satellite $j$ can connect at $t$,}\\ 0,&\text{if not.}\end{array} \right. \tag{7}\]  
Examples of the frequencies and the schedule of contact windows, which are used in the simulation section later, from rovers to satellites are shown in Table 3 and 4.