# Pico-Sat to Ground Control: Optimizing Download Link via Laser Communication
## 2 Physical Components and Methods
### FSO Communication--The Ground Station's Side
#### 2.3.3 Prediction  
The prediction phase of the communication occurs when a direct LOS is not available. Direct LOS can be broken, for example, due to local weather conditions that obscure the satellite for the entire duration of its passing or parts of it. Using the image from the ground station's wide FOV camera, we can predict the expected break duration. Image processing on these images can detect possible obstacles in the satellite trajectory. Using the data on these obstacles, the system can predict location and time of the LOS breakage. When small breaks are expected, the system is able to continue the accurate tracking process using motion prediction. The motion prediction can be obtained by fusion of two parameters over time--(i) the satellite position in the image and (ii) the satellite's predicted trajectory computed using the previous frames' measurements. Kalman filter, named after [PERSON] [28], is a method used for stochastic estimation from noisy sensor measurements. It describes a recursive solution to the discrete-data linear filtering problem. This filter uses a set of mathematical equations that implements a trajectory predictor corrector that minimizes the estimated error covariance. Kalman filter has been the subject of many studies and applications in the area of navigation and tracking. In this study, we implement a simple version of the Kalman filter method for predicting the satellite location throughout the tracking. The Kalman filter method has two steps: prediction and update. In the prediction step, the system calculates the predicted location  
Figure 6: Satellite detection demonstration via video processing: (**a**) tracking the ISS at its rise; (**b**) tracking the ISS via video processing using the Kalman filter algorithm (note that the video was shot in low resolution, causing tracking breaks in several places); and (**c**) the final phase of the tracking (credit to [PERSON] for the raw video). of the satellite in time \(t\), given the last measurements in \(t-\Delta T\). The update step calculates the position using two parameters: the estimated position of the satellite in time \(t\) based on the new measurements (the satellite detection in the image) and the predicted position calculated in the first step. The updated position is then calculated using a covariance matrix that measures the estimated uncertainty of the prediction. The covariance matrix determines the weight of the predicted location in the final estimation. Next, we present the required equations for each step \(k\). **The prediction equations:** Let \(X_{k-1}=[x_{k-1},y_{k-1},vx_{k-1},vy_{k-1}]\) be the predicted position and velocity vector. Let \(P_{k-1}\) be the covariance matrix calculated in step \(k-1\). Let \(A_{k-1}\) be the matrix that represents the motion equation of the satellite in the image by which the prediction is calculated. In this model, we also assume a constant velocity for each \(\Delta t\):  
\[A= \begin{bmatrix}1&0&\Delta t&0\\ 0&1&0&\Delta t\\ 0&0&1&0\\ 0&0&0&1\end{bmatrix} \]  
The satellite prediction equations:  
\[X_{k}^{p}=AX_{k-1}+Q \tag{6}\]  
The predicted state is calculated from the previous state update and the estimated satellite motion that is given by the matrix \(A\). \(Q\) are used as tuning parameters that can be adjusted to achieve the desired performance. \(P\) represents the estimated accuracy of the state measurement:  
\[P_{k}^{p}=AP_{k-1}A^{T} \tag{7}\]  
The matrix \(P\) in the initial state is the zero matrix, since we know the satellite's initial location with high accuracy. **The update equations:** Let \(Z=[x_{m},y_{m},vx_{m},vy_{m}]\) be the measured location and velocity vector of the satellite in the image. The Kalman gain matrix is denoted as \(K\). Let \(R_{k}\) be the matrix representing the noise in the measurements \(R_{1}=I_{4\times 4}\).