Jérémy Gagnard  committed 792315d

Epoly v3

  • Participants
  • Parent commits 7ceaf39
  • Branches default

Comments (0)

Files changed (4)

File part3/camions/tracking.db

Binary file modified.

File part4/docs/LO53.tex

-\title{LO53 : Play with Google Maps API}
+\title{LO53 : Tracking device application}
 \author{Jérémy GAGNARD \& Rémy HUBSCHER}
-\section{Use the Google Maps API to include a map in a web page}
+\section{NMEA frames parsing}
-Google Maps has a wide array of APIs that let we embed the robust
-functionality and everyday usefulness of Google Maps into our own
-website and applications, and overlay our own data.
+\subsection{In Java}
-We used the Version 3 of Google Maps. This API is especially designed
-to be faster and more applicable to mobile devices, as well as
-traditional desktop browser applications.
-The API provides a number of utilities for manipulating maps (just
-like on the \url{} web page) and adding content to the
-map through a variety of services, allowing to create robust maps
-applications on our website.
-\subsection{Display the map}
-The fundamental element in any Google Maps V3 API application is the
-"\textit{map}" itself. This document discusses the usage of the fundamental
-\textit{google.maps.Map} object and the basics of map operations.
+The parser split the data from the file and build a RMC object.
-Here we have a few methods to display the map :
+The method \texttt{getList} returns an ArrayList of RMC objects which have the
+ structure of a GPRMC frame.
-  \item Loading the Google Maps API
-  \item Creating a map DOM elements : creating a named div element and
-    obtaining a reference to this element in the browser's document
-    object model (DOM).
-  \item Initialize a map : creating a map options variable : allowing
-    to choose the display options (like : zoom, lat/lng, mapType, ...)
-  \item The elementary object : finally, we create the map in giving
-    some arguments (map DOM element, display options)
-\subsection{Center the map and add controls}
-As we saw earlier, when we create the Google Map API, we can give it
-some options. One of these options corresponds to the latitude and
-longitude. We create an object latitude longitude with the
-float values (in this case, those of Belfort).
-Version 3 offers methods to interact directly on the display (such as
-zoom and Map Type).
+\subsection{In Python}
+\section{Displaying the geographic position of the device with Google Maps}
-\section{Display trajectories and positions (with a circle of precision)}
-\subsection{Draw the trajectories}
-We decided to set up a database to easily add trajectory. In our case,
-we used Django.
-Django is a web development framework in Python. It aims to make web
-development easy and fast. The project's slogan "The Web framework for
-perfectionists under pressure" \footnote{like us}.
+\section{Animate the mobile device}
-The database consists in several parts :
-  \item 

File part4/python/

 import simplejson
 def convlat(info):
-    """ Converti une latitude NMEA en latitude décimale
+    """ Converti une latitude NMEA en latitude decimale
     >>> convlat('4737.8953')
     return deg + min + sec
 def convlon(info):
-    """ Converti une longitude NMEA en latitude décimale
+    """ Converti une longitude NMEA en latitude decimale
     >>> convlon('04737.8953')

File part5/js/epoly.js

   var oddNodes = false;
   var x = point.lng();
   var y =;
-  for (var i=0; i < this.getVertexCount(); i++) {
+  for (var i=0; i < this.getPaths().getLength(); i++) {
-    if (j == this.getVertexCount()) {j = 0;}
-    if (((this.getVertex(i).lat() < y) && (this.getVertex(j).lat() >= y))
-    || ((this.getVertex(j).lat() < y) && (this.getVertex(i).lat() >= y))) {
+    if (j == this.getPaths().getLength()) {j = 0;}
+    if (((this.getPaths().getAt(j).lat() < y) && (this.getPaths().getAt(j).lat() >= y))
+    || ((this.getPaths().getAt(j).lat() < y) && (this.getVertex(i).lat() >= y))) {
       if ( this.getVertex(i).lng() + (y - this.getVertex(i).lat())
-      /  (this.getVertex(j).lat()-this.getVertex(i).lat())
-      *  (this.getVertex(j).lng() - this.getVertex(i).lng())<x ) {
+      /  (this.getPaths().getAt(j).lat()-this.getVertex(i).lat())
+      *  (this.getPaths().getAt(j).lng() - this.getVertex(i).lng())<x ) {
         oddNodes = !oddNodes