# A Simulation of Contact Graph Routing for Mars-Earth Data Communication
## 3 Algorithms of the Model
If route \(nxt2\to nxt3\) is open, or \(se[nxt2,nxt3]=1\), we save the size data \(dt[d,t]\) being sent in \(x[2,r[nxt2,nxt3],d,t]\). Note that it also means that \(x[1,r[nxt,nxt2],d,t-dy[nxt,nxt2]]=dt[d,t]\), where route \(nxt\to nxt2\) was traveled by the data \(dy[nxt,nxt2]\) minutes ago. In Step 25, the stored data are kept again for a longer time due to the nonexistence of open contact windows from a satellite to all antennas. ```
1:Input:\(M,mxd\) the numbers time intervals and the maximum length of data, resp. 2:if any \(se[j,k]>0,j\in intst,k\in interth0\)then
3:\([sr]\) is the index when \(storsats(:,t)>0)\)
4:if\(sr\) is not empty then
5: Put data into \(sumcp[ist]\) and count the additional set of data for inputting in \(addata\)
6:\(interth=interth0\)
7:\(linterth\) is the length of \(interth0\)
8:\(ik\gets 0\)
9:while\(ik<addata\)do
10:\(ik\gets ik+1\)
11:\(nd[ik]\leftarrow\) the number of data will be sent
12:\(nxt2\gets sr[ik]\)
13:\(acc=0\)
14:while\(acc=0\)do
15:if\(interth\
eq 0\)then
16:\(inxt3\leftarrow\) pick randomly an index from \(interth\)
17:\(nxt3\gets interth(inxt3)\)
18:if\(se[nxt2,nxt3]>0\)then
19:\(x[2,ids[nxt2]+nxt3-nxt2,nd[ik]]\gets dt[d,t]\)
20:\(acc\gets 1\)
21:else
22:\(interth[inxt3]\leftarrow[\;]\)
23:\(linterth\leftarrow\) the length of \(interth\)
24:endif
25:\(storsats[nxt2,t+1]\gets storsats[nxt2,t+1]+storsats[nxt2,t]\)
26:\(acc=1\)
27:endif
28:endwhile
29:endwhile
30:endif
31:endif
```

**Algorithm 3** Satellite-Antenna Routing

## 4 Simulation Results and Discussion

We simulate contact windows between Mars rovers and satellites and between satellites and DSN antennas on Earth. We simulate three cases to see the performance of the algorithm in the storing, carrying, and forwarding processes due to the timely changes of the contact windows. The simulated storage for each satellite is MRO (\(C_{3}=20\) GB), Odyssey (\(C_{4}=8\) MB), TGO (\(C_{5}=16\) GB), and Maven (\(C_{6}=16\) GB). We simulate the data delivery for one Martian day. For constructing contact windows of rovers-satellites and satellites-DSN antennas, we need information on the time when the satellite is above the rovers and is within reach of an antenna. Satellites MRO, Odyssey, and TGO typically have 2-6 contact windows per sol for each rover, and MAVEN has 5-6 contact windows per sol. However, the data are unavailable due to the fluctuation of the time interval. We use contact windows using the predicted time when each satellite most frequently overpasses each rover during a day, which is shown in Table 3. In this simulation, we set Table 4 as an example of the detailed contact windows. The DSN antennas are assumed to open to all satellites for certain intervals: 08:56-15:13 (USA), 00:00-04:50 and 22:43-24:00 (Spain), and 15:13-21:31 (Australia). The simulation results of data deliveries from rovers to satellites are shown in Figure 2. Figure 3 shows the data received by DSN antennas for one Martian day. We demonstrate the performance of our

**Case 1. ** We show the deliveries of data from a rover that are delayed by 12 min for their arrival on Earth. Based on Table 4, the first contact window of the day is from 00:25 to 00:34 between the Perseverance Rover (PR) and MAVEN (MVN). In Table 5 and Figure 4a, a data delivery starts at 00:25, containing nine packets with a size of 2304 KBytes. The data are received by the Spain antenna (SPN) at 00:37 due to a delayed time; see Figure 4b. Some data are sent consecutively and received with the same delay. In other contact windows in a whole day, the data can be sent in the expected time based on the expected delay time. **Case 2**. Based on the simulated contact windows in Table 4, it is very rare to have data delivery from one rover to two or more satellites at once, because it is very rare that two or more satellites have overlapping contact windows. Neither do the DSN antennas. In this case, the contact windows of Odyssey and TGO overlap. PR has a contact window with ODY during 03:41-03:50. Additionally, CR already has a contact window with TGO during 03:34-03:48.