Tracks

Tracks uses an Android App, a desktop server and an Arduino. I made this for my final year project during my degree and this project achieved a 1st.

Tracks collects GPS location data on an Android device, linking it to an Arduino  for extra sensory information which in this case is heart rate. It stores the data within a “sqlite3” database where the data is encrypted and then sent to the counterpart Java server securely.  Once on the Java server, it is stored, decrypted and converted to a KML file so that it can be displayed on a map for the user (in Google Earth); this shows the path that was travelled as well as any other information that has been gathered.

This project used technology that included:

  • Android Smartphones
  • Apps
  • Encryption
  • Arduino
  • A Heart Rate Sensor
  • Google Earth

Software Development Process:

  • Java
  • Android Studio & Eclipse IDE
  • SQLite3
  • KML
  • Agile Model (for all software development)
  • MoSCoW function table
  • Flow diagrams

Arduino

Heart rate strapSeeeduino ADK - grove shield - heart rateThe Arduino is a combination of three parts of hardware: a Seeediuno (main Arduino) , the Grove Shield extension (Shield) and the Grove Heart Rate Monitor (Sensor).

The heart rate sensor that goes around the user’s chest connects wirelessly to the Arduino via the Shield. This is then powered by a portable USB power bank and connects via USB to the phone.

The code of the Arduino was written in the Arduino Ide and the data is sent to the Android device via an adb connection.

The Android app

Mobile app GUI FlowThe Arduino application was written in Eclipse and the Android studio IDE. This app takes the information from the Arduino via the ADB connection and simultaneously logs time and location information.

6.aThe data that is recorded can be set to be recorded at specific time intervals, distance settings and with a maximum location inaccuracy and data is correlated together into an SQLite3 database.

Once the logging of the information has been concluded, the database is saved to the device ready for sending to the server. As this information was quite private, encryption of the information is necessary before sending it to the server

fyp_mobile_app FINALfyp_mobile_app_service FINALThe encryption is done with an AES 128 bit encryption,Which uses the user set password in the settings of the app. The encryption uses a “BKDF2WithHmacSHA1” password with the algorithm “AES/CBC/PKCS5PADDING”

Once encryption has been done, a connection is made to the awaiting server and the database in its encrypted form is sent.

Desktop Server

fyp_server_program FINALWhen the server initialises, it waits for a port number and a password to be given to it. Once this is done it waits for a connection from a client.

Once a client is connected, a thread is made to receive the encrypted information and close the connection. The data is then decrypted and saved and the data from the database is then transformed into a kml document.

This kml document would then finally be saved for use with Google Earth.

Final result

final output google eatch

With this final kml document the user is able to simply double click to view it in Google Earth.

This data shows a line that was the path the user has travelled as well as dropping place markers along the way which include all of the relevant information at that spot; in this case this heart rate and other information recorded at that location.

A copy of one of these KML documents that has been produced with this project can be downloaded HERE.