\item We have studied and modeled the GPS protocol to aid the sensor
fusion process, and optimize for battery consumption (which is
crucial in some circumstances, for example if the tracking system is
mounted on drones). \textcolor{red}{The proposed model can find usage also in trajectory-based services, in which the device is supposed to sample the position in order to allow a-posteriori reconstruction of the followed path.}
mounted on drones). \textcolor{red}{The proposed model can find usage also in trajectory-based services, in which the device is supposed to sample the position in order to allow a-posteriori reconstruction of the followed path.\\ It must be noted also that the sensor presents dynamical behavior, in the sense that it can take different times from the position request to the measurement, this requires dynamical modeling.}
\item This paper makes the following contributions: (1) it provides a
model of the GPS stack behavior, identifying how it is possible to
In this section we will discuss two implementations of the model specified above: one in the modeling language Modelica\footnote{www.modelica.org} and a second one in the Matlab language. The purpose of the first one is to show how the model captures the relevant dynamics of a GPS sensor and the object-oriented nature of the Modelica language makes it ready to use for other applications. The second implementation is instead used to present how the model can be combined with the sensor fusion algorithm discussed in section~\ref{sec:fusion} to evaluate the possible accuracy-over-battery-consumption trade-offs. The two implementations also correspond to the two parts in which this section is organized.
\subsection{GPS sensor dynamics}
\label{sec:res:gps}
%simulations: time to first fix, loss of ephemeris data, loss of visibility
The phenomena we will show in this section are: the TTFF, the loss of ephemeris data and the loss of visibility.
Figure~\ref{fig:control1} shows the command signal used to show the time that passes at the start up beofore the position bcomes available. As we can see, first the sensor is kept turned on for one minute and then it is sampled at regular intervals. The resulting position availability of the sensor is then shown in figure~\ref{fig:position1}.
\caption{Availability of the position measure in TTFF simulation.
\label{fig:position1}
}
\end{center}
\end{figure}
Some previous works cited in section~\ref{sec:related} discuss the TTFF but none of them does it by looking in detail at the technology of the GPS~\cite{bib:entracked-datadriven-modeling}~\cite{bib:feasibility-duty-cycling}~\cite{bib:accuracy-adaptation}. The performances are evaluated for smartphones looking at how much time it takes for an application to get a position measure after the API request \textcolor{red}{??}. An important remark is that GPS sensors in smartphones implement the so called Assisted-GPS that allows the retrieval of the ephemeris data from the internet instead of listening to the satellites. The model presented in this paper can be adapted to reprent this allowing for an external input that triggers the transition \texttt{get\_ephemeris}, possibly before the delay that represent the action of listening instead to the satellites.
Being aware of those differences -- the extra software layers included in the experiments and the fact that are used Assisted-GPS sensors -- the results are coherent with what discussed here. Our model achieves on the other side more generality not being dependent on the specific implementation on the given device. Moreover it allows to look directly at what are the theoretical performances we should expect from a GPS sensor without the overhead that is introduced by the operative system of a smartphone.
-----------
Our modeling approach is instead at a much lower level and avoids the software layers that alterate what could be the real performances of the sensor. Another difference that arises from previous works is that those discuss Assisted-GPS where the device using the GPS can retrieve the ephemeris data from the network instead of having to listen to the signals broadcasted by the satellites. Our model is again more general with reprect to those since the
------------------------------------
First-principle analysis of GPS dynamics: \emph{time to first
fix}. Comparison with empirical analysis from the state of the art
(check that numbers match the python-nokia implementation or whatever
...
...
@@ -16,11 +52,11 @@ equivalent to a worst case in losing visibility of the satellites. If
you want to distinguish, you can have a finite state machine for each
satellite.
\textcolor{red}{In order to compare different sampling policies and GPS dynamics, traces with continuous sampling of GPS have been recorded and then different GPS sensor dynamics have been simulated.}
\subsection{Power Consumption Accuracy Trade Off}
\label{sec:res:tradeoff}
\textcolor{red}{In order to compare different sampling policies and GPS dynamics, traces with continuous sampling of GPS have been recorded and then different GPS sensor dynamics have been simulated.}
In this section, we use real traces from an IMU sensor and a GPS
receiver in two different conditions: car, and bicycle. In both cases,
we recorded measurements for the entire duration of the trace with