# Ionospheric Error Models for Satellite-Based Navigation--Paving the Road towards LEO-PNT Solutions
## 3 Methodology
### IAMM Calculation Strategy  
The proposed Interpolated and Averaged Memory Model (IAMM) model uses the averaged data from the \(Y\) matrix to generate TEC values. To obtain a TEC value for a specific user at a given date, time, and longitude-latitude location \((\lambda,\varphi^{{}^{\prime}})\), the IAMM works by first mapping the year of the user into its corresponding solar year. To do that, the year of the user is divided by 11, and then the remainder \(R\) of the division is used to map the user's year to the solar year according to Table 2.  
The next step is to interpolate the VTEC values from the \(T_{i}\) matrix. Bilinear interpolation is often used to interpolate values in 2D grids, so we chose bilinear interpolation for our model. It can be performed as follows [7]:  
\[\begin{split} VTEC_{i}(\lambda,\varphi^{{}^{\prime}})=(1-p)(1-q) VTEC_{i,j,k}+p(1-q)VTEC_{i,j+1,k}\\ +q(1-p)VTEC_{i,j,k+1}+pqVTEC_{i,j+1,k+1}\end{split} \tag{8}\]  
\[\begin{split}\text{with weighting coefficients:}\quad p=\frac{ \varphi^{{}^{\prime}}-\varphi^{{}^{\prime}}_{j}}{\varphi^{{}^{\prime}}_{j+1}- \varphi^{{}^{\prime}}_{j}}\quad\text{and}\quad q=\frac{\lambda-\lambda_{k}}{ \lambda_{k+1}-\lambda_{k}}\end{split}\]  
where \(i\) is the time index and \(j\) and \(k\) are the latitude and longitude indices, respectively. The coefficients \(p\) and \(q\) are calculated across the intervals \(\varphi^{{}^{\prime}}_{j}\leq\varphi^{{}^{\prime}}<\varphi^{{}^{\prime}}_{j+1}\) and \(\lambda_{k}\leq\lambda<\lambda_{k+1}\), where \(\varphi^{{}^{\prime}}\), being the user's latitude, is bounded by \(\varphi^{{}^{\prime}}_{j}\) and \(\varphi^{{}^{\prime}}_{j+1}\), which are the surrounding grid points. Similarly, the user's longitude \(\lambda\) is bounded by the surrounding grid points \(\lambda_{k}\) and \(\lambda_{k+1}\).  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \(R\) & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline Solar Year & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 1 & 2 & 3 & 4 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Solar year mapping table.  
Figure 4: The process of collecting and organizing data from IONEX files.  
Figure 5 gives a step-by-step example of how the VTEC value of a user is calculated using IAMM. Step 1 tells us that the user is located at Tampere University on 20 June 2023 at 01:30 AM. In step 2, we calculate the solar year based on the user's year and Table 2, and we calculate other matrix indices corresponding to the user's date and time. Step 2 tells us that the VTEC value is located in matrix \(M_{4,6}\) and sub-matrix \(T_{1}\). To interpolate the VTEC value from the \(71\times 73\) latitude-longitude matrix, we calculate indices \(j\) and \(k\) based on linear interpolation from the latitude-longitude grid that is defined in the IONEX format datasheet in [7, 48]. Finally, in step 4, we use Equation (8) to interpolate the VTEC value for user A from the \(T_{1}\) sub-matrix.  
After the IAMM generates a VTEC value, this value is converted to STEC using the mapping function in Equation (5). Finally, the ionospheric delay is calculated by applying the formula in Equation (6).