In this section we will discuss the general features that characterize an effective sampling strategy. Complementary in the next section a simulation evaluation of the available trade-offs will be performed.
This section discusses the general features that characterize an
effective sampling strategy and describes the one we advocate using.
\subsection{The dynamics}
The model discussed in section~\ref{sec:gps} points out two dynamics that characterize the sensor: the availability of the ephemeris data and the availability of ranging data. The two are caracterized by very different time scales, both in terms of acquisition time and validity.
The ephemeris data live in the time scale of minutes requiring betwen 30 to 59 seconds to be aquired and being valid for 30 minutes. This poses two main constraints. First at the startup a delay equivalent to the acquisition time of the ephemeris data will be present -- this is the so called \emph{Time To First Fix} TTFF. Second during regular working conditions every 30 minutes the ephemeris data must be updated, requiring the antenna to be turned on for enough time and affecting the battery drain of the sensor.
The ranging data are instead caracterized by a time scale of the order of milliseconds. They require from 2 to 10 milliseconds to be acquired and they have istantaneous validitiy since they are the ones used to compute the present position. This means that there is a lower bound the sampling period of the sensor under which the sampling will be equivalent to keep the sensor always turned on. Also for some applications with real time constraints the varying delay for the acquisition could be critical.
Another important consequence of the sampling policy is the observability of the event \texttt{lost\_visibility}. This is in fact observable only when the antenna is on and is listening to the visible satellites. When a satellite disappears, if the antenna is turned off the device wont observe this and at the next sampling it will have to acquire new ephemeris data before being available of providing new positioning (assuming that enough satellites are visible).
The model presented in Section~\ref{sec:gps} highlights two dynamics
that characterize the sensor. The first one is the availability of the
ephemeris data and the second one is the availability of ranging
data. The two occur at very different time scales, both in terms of
acquisition time and in terms of data validity.
\textbf{Ephemeris data:} The ephemeris data live in the time scale of
\emph{minutes}, requiring betwen 30 and 59 seconds to be aquired and
having a validity of 30 minutes from the aquisition. There are two
implications of these facts. First, this induces a startup delay
equivalent to the aquisition time of the ephemeris data. This is
referred to as \emph{Time To First Fix} (TTFF). Second, an effective
sampling strategy refreshes the ephemeris data at least every 30
minutes. This requires the antenna to be turned on for enough time to
capture the data and affects the sensor battery consumption.
\textbf{Ranging data:} The ranging data are caracterized by a time
scale of the order of milliseconds. They require from 2 to 10
milliseconds to be acquired. This could be critical for real-time
applications. The data validitiy is instantaneous, since they are used
as soon as they are received to compute the current position (and
moving will invalidate them). The time scale allows us to derive a
bound in the sensor sampling period. Sampling as frequently as the
this (lower) bound is equivalent to keeping the sensor always on.
Another important consequence of the sampling policy is the
observability of the event \texttt{lost\_visibility}. The occurrence
event is in fact detectable only when the antenna is turned on and the
sensor is listening to the visible satellites. When a satellite
disappears, if the antenna is turned off the device wont observe this
and at the next sampling it will have to acquire new ephemeris data
before being available of providing new positioning (assuming that
enough satellites are visible).
\subsection{Sampling Strategy}
Given these considerations we designed a simple sampling stategy that tries to keep the ephemeris data updated and samples the GPS sensor according to the uncertainty of the state estimation of the Kalman filter. To do this we use the trace of the covariance matrix $P$ which represents the estimation variance of the position. When this quantity overcomes a defined threshold the position is requested to the sensor. This is formally encoded in the state machine represented in figure~\ref{fig:controller}.