\section{Methodology}

This section provides an overview of the methodology used during the thesis, divided according to the items in the problem formulation.

\subsection{Generating a Signal Map}
First a signal map of the designated area must be generated by collecting connection type, \gls{gps} data, \gls{rss} and measured data rate. Research on if there are any other relevant parameters to collect will also be done. The collection will be done on mobile devices running Android. 
 
In the designated area the mobile device has to experience diverse \gls{rss}, where above -70 dBm is considered good, -70 to -90 dBm moderate, -90 to -100 dBm poor and below -100 dBm very poor. All these intervals are to be present in the generated signal map. 

\gls{gps} data, \gls{rss} and data rate will be collected on multiple devices which collaborate to create the signal map. \gls{gps} data will be collected and later mapped to the corresponding \gls{rss} value. The data points are collected by running a application on the mobile device.

Data rates will be collected by uploading and downloading files of known size to a server. It makes the calculation easy since it will just be a matter of knowing the transmission time. Bigger files will provide higher accuracy but also take more time to measure.

For validating the signal map I will verify that the \gls{rss} is stable for three measurements over three days. By verifying I mean that I will repeat the process of collecting data until I get a stable result.

\subsection{Energy Estimation in the Signal Map}
Secondly, network traces are collected on the Android device, estimation of the base energy consumption with Energy Box and then apply scaling based on \gls{rss}. Some research and testing of what scaling works well in practice is needed.

I will compare the estimated energy consumption for a specific point in the signal map with an actual trace from that point to see how correct the signal map is.

\subsection{Data Filtering and Extraction}

Last, some heuristics are created to account for various differences in location accuracy and to reduce the exposed data since there can be many data points in a single location.


%\subsection{Algorithm}
%Last, if time allows, a simple application for toggling the energy mapping with \gls{rss} on and off will be created for Android. The application will contain at least one algorithm for doing energy-efficient mobile communication based on \gls{rss}. An alternative to doing an application is to just do bash scripts for testing. New traces will be collected with energy mapping on and off, these will then be compared with each other to provide an indication of how large energy savings could be expected.
