## 2 Indoor Positioning System in 433 MHz ISM Band
### Algorithm for Indoor Position Estimation  
In an indoor environment, although the signal loss and GPS coverage problems can be overcome with the proposed repeaters, this solution requires additional algorithms that takes the non-line-of-sight propagation and repeater delay into account. The proposed technique introduces a new path in that the distance between satellite and the receiver becomes different from that of the normal operation of an off-the-shelf receiver during which there is a line-of-sight distance between the satellite and the receiver. The GPS signals in the proposed scheme come to the repeater first and, then, reach to the receiver as seen in Figure 2.  
As part of the indoor position estimation, an algorithm (run on MATLAB(r)) is designed and run on a remote computer that is connected to the system via Wi-Fi. The Wi-Fi link is established with a Wi-Fi module on the controller block of the receiver board. The raw data (such as pseudo-range, carrier-to-noise ratio, satellite azimuth, and elevation angles, etc.) obtained from the off-the-shelf receiver are transmitted to the remote computer through the Wi-Fi connection. The routine summarized in Figure 7 has the following four steps: raw data reception, satellite selection and satellite-to-repeater distance calculations, cleaning pseudo-range from satellite-to-repeater distances and satellite biases, and finally, running the least squares navigation (LSAAV) algorithm, which is a least squares solution that minimizes the sum of the square of the residual errors [48]. Figure 7: Flow of the algorithm. In the first part, we remove the biases from the GPS pseudo-range measurement using the models of the troposphere, ionosphere, GPS satellite clocks, GPS satellite movement during signal propagation, and Earth rotation. Navigation data are also collected as part of raw data from the off-the-shelf receiver, which contains GPS time of the week (ITOW) of the navigation epoch. ITOW field indicates the GPS time at which the navigation epoch occurred. Each navigation solution is triggered by the tick of the 1 kHz clock nearest to the desired navigation solution time. This tick is referred to as a navigation epoch. If the navigation solution attempt is successful, one of the results is an accurate measurement of time in the time base of the chosen GNSS system, called GNSS system time. The difference between the calculated GNSS system time and receiver local time is called the clock bias (and the clock drift is the rate at which this bias is changing). Navigation data also contain an Earth-centered Earth-fixed (ECEF) coordinates solution of the off-the-shelf receiver; however, this solution would not be correct in our system, since the satellite signals come from three different repeaters. This result in erroneous the off-the-shelf receiver position. The data of each satellite, received by the off-the-shelf receiver on the up-converting receiver, are recorded. The recorded data include GPS satellite ID numbers, satellite azimuth and elevation angles, carrier-to-noise ratios (CNR) related to each satellite signal, and the GPS time of the week. GPS satellites transmit ephemeris through which the receiver can estimate the position of the satellites in the Earth-centered Earth-fixed (ECEF) coordinates system. In addition to a GPS satellite's location (current and predicted), ephemeris includes the orbital parameters, clock bias, date, timing, health, and an almanac (a reduced subset of ephemeris of all satellites) exist. The ephemeris data can be collected using an online server to enable not start in the proposed system. Moreover, the ephemeris data are used to calculate the satellite's clock bias. Each of the collected pseudo-range is a sum of the following distance terms: satellite-to-repeater distance, the receiver clock bias, satellite clock bias, repeater delay, the indoor distance from the corresponding repeater to the indoor receiver position. The second step of the MATLAB(r) algorithm is designed for choosing the GPS satellites, which are seen from the repeaters.