Commits

Rémy HUBSCHER  committed 8680fcd

Rapport 2

  • Participants
  • Parent commits 86e77e3

Comments (0)

Files changed (3)

File part5/docs/LO53.pdf

Binary file added.

File part5/docs/LO53.tex

 In this report, you will find the detail of how we resolve the problem
 you asked.
 
-We used the code of the 4^{th} practical work and create the
+We used the code of the $4^{th}$ practical work and create the
 geofencing overlays.
 
 \image{MPD}{0.4}
     blue.
 \end{enumerate}
 
+\newpage
 
+\section{The GeoFence}
+
+We choose to use the \texttt{Polygon} object to draw the Geofence on
+Google Maps.
+
+\subsection{Javascript}
+
+We add a new contains methods to the Polygon object to detect if a
+point is inside the polygon.
+
+\lstset{language=java,breaklines=true,xleftmargin=7mm,basicstyle=\scriptsize,frame=single,framexleftmargin=7mm,captionpos=b,tabsize=2,numbers=left,numberstyle=\scriptsize,escapechar={\%}{\_}}
+
+\lstinputlisting{../js/epoly.js}
+
+Then each time the marker moves, we detect if it is inside or outside
+the geofence and we display the appropriate marker.
+
+\lstinputlisting{../js/device.js}
+
+
+\subsection{HTML fIle}
+
+We draw the Polygon and the trajectory on the maps.
+
+\lstset{language=html,breaklines=true,xleftmargin=7mm,basicstyle=\scriptsize,frame=single,framexleftmargin=7mm,captionpos=b,tabsize=2,numbers=left,numberstyle=\scriptsize,escapechar={\%}{\_}}
+
+\lstinputlisting{../html/index.html}
 
 \end{document}

File part5/html/index.html

 
     <script type="text/javascript">
 
-      var positions = [{"lat": "47.6463853333", "lon": "6.84976866667", "hour": "06/06/10 12:43:41"}, 
-                       {"lat": "47.6453913333", "lon": "6.851052", "hour": "06/06/10 12:44:00"}, 
-
-{"lat": "47.6449786667", "lon": "6.85116933333", "hour": "06/06/10 12:44:06"}, {"lat": "47.6442326667", "lon": "6.85136933333", "hour": "06/06/10 12:44:14"}, {"lat": "47.6441106667", "lon": "6.85196666667", "hour": "06/06/10 12:44:20"}, {"lat": "47.6439786667", "lon": "6.85217266667", "hour": "06/06/10 12:44:25"}, {"lat": "47.6436933333", "lon": "6.852656", "hour": "06/06/10 12:44:32"}, {"lat": "47.6426786667", "lon": "6.853162", "hour": "06/06/10 12:44:52"}, {"lat": "47.642704", "lon": "6.853258", "hour": "06/06/10 12:44:53"}, {"lat": "47.6423453333", "lon": "6.85368266667", "hour": "06/06/10 12:44:59"}, {"lat": "47.6418393333", "lon": "6.853764", "hour": "06/06/10 12:45:05"}, {"lat": "47.6466573333", "lon": "6.85387933333", "hour": "06/06/10 12:51:40"}, {"lat": "47.6465373333", "lon": "6.85328066667", "hour": "06/06/10 12:52:25"}, {"lat": "47.6463166667", "lon": "6.85188533333", "hour": "06/06/10 12:52:46"}, {"lat": "47.646384", "lon": "6.85067266667", "hour": "06/06/10 12:52:53"}, {"lat": "47.646048", "lon": "6.85036733333", "hour": "06/06/10 12:53:03"}, {"lat": "47.6463193333", "lon": "6.85018133333", "hour": "06/06/10 12:53:08"}, {"lat": "47.645064", "lon": "6.85051466667", "hour": "06/06/10 12:53:23"}, {"lat": "47.6445926667", "lon": "6.85047733333", "hour": "06/06/10 12:53:32"}, {"lat": "47.644366", "lon": "6.850566", "hour": "06/06/10 12:53:46"}, {"lat": "47.6433106667", "lon": "6.85236733333", "hour": "06/06/10 12:54:08"}, {"lat": "47.643094", "lon": "6.85184333333", "hour": "06/06/10 12:54:15"}, {"lat": "47.64251", "lon": "6.851288", "hour": "06/06/10 12:54:21"}, {"lat": "47.6418013333", "lon": "6.85112266667", "hour": "06/06/10 12:54:28"}, {"lat": "47.6411573333", "lon": "6.850776", "hour": "06/06/10 12:54:33"}, {"lat": "47.6402653333", "lon": "6.850722", "hour": "06/06/10 12:54:42"}, {"lat": "47.6393513333", "lon": "6.85092333333", "hour": "06/06/10 12:54:48"}, {"lat": "47.638506", "lon": "6.85142933333", "hour": "06/06/10 12:54:56"}, {"lat": "47.6383373333", "lon": "6.852046", "hour": "06/06/10 12:55:01"}, {"lat": "47.63759", "lon": "6.85197133333", "hour": "06/06/10 12:55:05"}, {"lat": "47.6363573333", "lon": "6.85253133333", "hour": "06/06/10 12:55:15"}, {"lat": "47.6359006667", "lon": "6.85297866667", "hour": "06/06/10 12:55:21"}, {"lat": "47.635674", "lon": "6.85300733333", "hour": "06/06/10 12:56:13"}, {"lat": "47.6356406667", "lon": "6.85322666667", "hour": "06/06/10 12:56:22"}, {"lat": "47.6347833333", "lon": "6.853806", "hour": "06/06/10 12:56:35"}, {"lat": "47.6343073333", "lon": "6.854108", "hour": "06/06/10 12:57:05"}, {"lat": "47.6336166667", "lon": "6.85457933333", "hour": "06/06/10 12:57:12"}, {"lat": "47.6322473333", "lon": "6.85543066667", "hour": "06/06/10 12:57:26"}, {"lat": "47.6321406667", "lon": "6.856402", "hour": "06/06/10 12:57:34"}, {"lat": "47.6318993333", "lon": "6.85759866667", "hour": "06/06/10 12:57:43"}, {"lat": "47.6320913333", "lon": "6.85835866667", "hour": "06/06/10 12:57:50"}, {"lat": "47.6322053333", "lon": "6.85947733333", "hour": "06/06/10 12:57:58"}, {"lat": "47.6324093333", "lon": "6.861156", "hour": "06/06/10 12:58:11"}, {"lat": "47.631354", "lon": "6.86090066667", "hour": "06/06/10 12:58:57"}, {"lat": "47.6298406667", "lon": "6.860084", "hour": "06/06/10 12:59:14"}, {"lat": "47.6290146667", "lon": "6.860932", "hour": "06/06/10 12:59:34"}, {"lat": "47.6290806667", "lon": "6.861288", "hour": "06/06/10 12:59:38"}, {"lat": "47.6282806667", "lon": "6.861842", "hour": "06/06/10 13:07:58"}, {"lat": "47.628282", "lon": "6.86193533333", "hour": "06/06/10 13:08:13"}, {"lat": "47.628674", "lon": "6.862902", "hour": "06/06/10 13:08:33"}, {"lat": "47.628758", "lon": "6.86474866667", "hour": "06/06/10 13:08:48"}, {"lat": "47.6289846667", "lon": "6.86501466667", "hour": "06/06/10 13:08:58"}, {"lat": "47.6302606667", "lon": "6.865034", "hour": "06/06/10 13:09:12"}, {"lat": "47.6302806667", "lon": "6.86518266667", "hour": "06/06/10 13:09:21"}, {"lat": "47.6306813333", "lon": "6.86445", "hour": "06/06/10 13:09:28"}, {"lat": "47.631818", "lon": "6.86382866667", "hour": "06/06/10 13:09:45"}, {"lat": "47.6337746667", "lon": "6.863174", "hour": "06/06/10 13:10:06"}, {"lat": "47.63436", "lon": "6.86267533333", "hour": "06/06/10 13:10:16"}, {"lat": "47.6343526667", "lon": "6.86242733333", "hour": "06/06/10 13:10:20"}, {"lat": "47.6355193333", "lon": "6.862088", "hour": "06/06/10 13:10:35"}, {"lat": "47.6361333333", "lon": "6.86154", "hour": "06/06/10 13:10:41"}, {"lat": "47.6366886667", "lon": "6.860608", "hour": "06/06/10 13:10:46"}, {"lat": "47.6377413333", "lon": "6.85979866667", "hour": "06/06/10 13:10:59"}, {"lat": "47.6382246667", "lon": "6.860034", "hour": "06/06/10 13:11:07"}, {"lat": "47.6382266667", "lon": "6.85977", "hour": "06/06/10 13:11:25"}, {"lat": "47.6387986667", "lon": "6.85970266667", "hour": "06/06/10 13:11:34"}, {"lat": "47.6395133333", "lon": "6.86020533333", "hour": "06/06/10 13:11:43"}, {"lat": "47.6401906667", "lon": "6.86043666667", "hour": "06/06/10 13:12:29"}, {"lat": "47.6410073333", "lon": "6.86008666667", "hour": "06/06/10 13:13:08"}, {"lat": "47.641914", "lon": "6.85829266667", "hour": "06/06/10 13:13:25"}, {"lat": "47.6421646667", "lon": "6.85771466667", "hour": "06/06/10 13:13:33"}];
+      var positions = [
+	{'lat': 47.646385, 'lon': 6.8497686, 'hour': 'dimanche, 06/06/2010 12:43:41'}, 
+	{'lat': 47.64539, 'lon': 6.8510523, 'hour': 'dimanche, 06/06/2010 12:44:00'}, 
+	{'lat': 47.64498, 'lon': 6.8511696, 'hour': 'dimanche, 06/06/2010 12:44:06'}, 
+	{'lat': 47.64423, 'lon': 6.8513694, 'hour': 'dimanche, 06/06/2010 12:44:14'}, 
+	{'lat': 47.644108, 'lon': 6.8519664, 'hour': 'dimanche, 06/06/2010 12:44:20'}, 
+	{'lat': 47.64398, 'lon': 6.852173, 'hour': 'dimanche, 06/06/2010 12:44:25'}, 
+	{'lat': 47.643692, 'lon': 6.852656, 'hour': 'dimanche, 06/06/2010 12:44:32'}, 
+	{'lat': 47.642677, 'lon': 6.8531623, 'hour': 'dimanche, 06/06/2010 12:44:52'}, 
+	{'lat': 47.642704, 'lon': 6.853258, 'hour': 'dimanche, 06/06/2010 12:44:53'}, 
+	{'lat': 47.642345, 'lon': 6.8536825, 'hour': 'dimanche, 06/06/2010 12:44:59'}, 
+	{'lat': 47.64184, 'lon': 6.853764, 'hour': 'dimanche, 06/06/2010 12:45:05'}, 
+	{'lat': 47.646656, 'lon': 6.8538795, 'hour': 'dimanche, 06/06/2010 12:51:40'}, 
+	{'lat': 47.646534, 'lon': 6.8532805, 'hour': 'dimanche, 06/06/2010 12:52:25'}, 
+	{'lat': 47.646317, 'lon': 6.851886, 'hour': 'dimanche, 06/06/2010 12:52:46'}, 
+	{'lat': 47.646385, 'lon': 6.8506727, 'hour': 'dimanche, 06/06/2010 12:52:53'}, 
+	{'lat': 47.64605, 'lon': 6.8503675, 'hour': 'dimanche, 06/06/2010 12:53:03'}, 
+	{'lat': 47.646317, 'lon': 6.8501816, 'hour': 'dimanche, 06/06/2010 12:53:08'}, 
+	{'lat': 47.645065, 'lon': 6.850515, 'hour': 'dimanche, 06/06/2010 12:53:23'}, 
+	{'lat': 47.644592, 'lon': 6.850477, 'hour': 'dimanche, 06/06/2010 12:53:32'}, 
+	{'lat': 47.644367, 'lon': 6.850566, 'hour': 'dimanche, 06/06/2010 12:53:46'}, 
+	{'lat': 47.64331, 'lon': 6.8523674, 'hour': 'dimanche, 06/06/2010 12:54:08'}, 
+	{'lat': 47.643097, 'lon': 6.851844, 'hour': 'dimanche, 06/06/2010 12:54:15'}, 
+	{'lat': 47.64251, 'lon': 6.851288, 'hour': 'dimanche, 06/06/2010 12:54:21'}, 
+	{'lat': 47.641804, 'lon': 6.8511224, 'hour': 'dimanche, 06/06/2010 12:54:28'}, 
+	{'lat': 47.64116, 'lon': 6.850776, 'hour': 'dimanche, 06/06/2010 12:54:33'}, 
+	{'lat': 47.640263, 'lon': 6.8507223, 'hour': 'dimanche, 06/06/2010 12:54:42'}, 
+	{'lat': 47.63935, 'lon': 6.8509235, 'hour': 'dimanche, 06/06/2010 12:54:48'}, 
+	{'lat': 47.638508, 'lon': 6.8514295, 'hour': 'dimanche, 06/06/2010 12:54:56'}, 
+	{'lat': 47.638336, 'lon': 6.852046, 'hour': 'dimanche, 06/06/2010 12:55:01'}, 
+	{'lat': 47.637592, 'lon': 6.851971, 'hour': 'dimanche, 06/06/2010 12:55:05'}, 
+	{'lat': 47.636356, 'lon': 6.852531, 'hour': 'dimanche, 06/06/2010 12:55:15'}, 
+	{'lat': 47.6359, 'lon': 6.8529787, 'hour': 'dimanche, 06/06/2010 12:55:21'}, 
+	{'lat': 47.635677, 'lon': 6.8530073, 'hour': 'dimanche, 06/06/2010 12:56:13'}, 
+	{'lat': 47.63564, 'lon': 6.8532267, 'hour': 'dimanche, 06/06/2010 12:56:22'}, 
+	{'lat': 47.634785, 'lon': 6.853806, 'hour': 'dimanche, 06/06/2010 12:56:35'}, 
+	{'lat': 47.634308, 'lon': 6.854108, 'hour': 'dimanche, 06/06/2010 12:57:05'}, 
+	{'lat': 47.633617, 'lon': 6.8545794, 'hour': 'dimanche, 06/06/2010 12:57:12'}, 
+	{'lat': 47.632248, 'lon': 6.8554306, 'hour': 'dimanche, 06/06/2010 12:57:26'}, 
+	{'lat': 47.63214, 'lon': 6.856402, 'hour': 'dimanche, 06/06/2010 12:57:34'}, 
+	{'lat': 47.631897, 'lon': 6.857599, 'hour': 'dimanche, 06/06/2010 12:57:43'}, 
+	{'lat': 47.63209, 'lon': 6.858359, 'hour': 'dimanche, 06/06/2010 12:57:50'}, 
+	{'lat': 47.632206, 'lon': 6.8594775, 'hour': 'dimanche, 06/06/2010 12:57:58'}, 
+	{'lat': 47.63241, 'lon': 6.861156, 'hour': 'dimanche, 06/06/2010 12:58:11'}, 
+	{'lat': 47.631355, 'lon': 6.860901, 'hour': 'dimanche, 06/06/2010 12:58:57'}, 
+	{'lat': 47.62984, 'lon': 6.860084, 'hour': 'dimanche, 06/06/2010 12:59:14'}, 
+	{'lat': 47.629013, 'lon': 6.860932, 'hour': 'dimanche, 06/06/2010 12:59:34'}, 
+	{'lat': 47.62908, 'lon': 6.861288, 'hour': 'dimanche, 06/06/2010 12:59:38'}, 
+	{'lat': 47.62828, 'lon': 6.8618417, 'hour': 'dimanche, 06/06/2010 13:07:58'}, 
+	{'lat': 47.62828, 'lon': 6.8619356, 'hour': 'dimanche, 06/06/2010 13:08:13'}, 
+	{'lat': 47.628677, 'lon': 6.862902, 'hour': 'dimanche, 06/06/2010 13:08:33'}, 
+	{'lat': 47.62876, 'lon': 6.864749, 'hour': 'dimanche, 06/06/2010 13:08:48'}, 
+	{'lat': 47.628983, 'lon': 6.865015, 'hour': 'dimanche, 06/06/2010 13:08:58'}, 
+	{'lat': 47.63026, 'lon': 6.865034, 'hour': 'dimanche, 06/06/2010 13:09:12'}, 
+	{'lat': 47.63028, 'lon': 6.865183, 'hour': 'dimanche, 06/06/2010 13:09:21'}, 
+	{'lat': 47.63068, 'lon': 6.86445, 'hour': 'dimanche, 06/06/2010 13:09:28'}, 
+	{'lat': 47.631817, 'lon': 6.8638287, 'hour': 'dimanche, 06/06/2010 13:09:45'}, 
+	{'lat': 47.633774, 'lon': 6.863174, 'hour': 'dimanche, 06/06/2010 13:10:06'}, 
+	{'lat': 47.634357, 'lon': 6.862675, 'hour': 'dimanche, 06/06/2010 13:10:16'}, 
+	{'lat': 47.634354, 'lon': 6.8624277, 'hour': 'dimanche, 06/06/2010 13:10:20'}, 
+	{'lat': 47.63552, 'lon': 6.8620877, 'hour': 'dimanche, 06/06/2010 13:10:35'}, 
+	{'lat': 47.636135, 'lon': 6.86154, 'hour': 'dimanche, 06/06/2010 13:10:41'}, 
+	{'lat': 47.63669, 'lon': 6.8606076, 'hour': 'dimanche, 06/06/2010 13:10:46'}, 
+	{'lat': 47.63774, 'lon': 6.859799, 'hour': 'dimanche, 06/06/2010 13:10:59'}, 
+	{'lat': 47.63822, 'lon': 6.860034, 'hour': 'dimanche, 06/06/2010 13:11:07'}, 
+	{'lat': 47.63823, 'lon': 6.85977, 'hour': 'dimanche, 06/06/2010 13:11:25'}, 
+	{'lat': 47.6388, 'lon': 6.8597026, 'hour': 'dimanche, 06/06/2010 13:11:34'}, 
+	{'lat': 47.63951, 'lon': 6.860205, 'hour': 'dimanche, 06/06/2010 13:11:43'}, 
+	{'lat': 47.64019, 'lon': 6.8604364, 'hour': 'dimanche, 06/06/2010 13:12:29'}, 
+	{'lat': 47.64101, 'lon': 6.860087, 'hour': 'dimanche, 06/06/2010 13:13:08'}, 
+	{'lat': 47.641914, 'lon': 6.8582926, 'hour': 'dimanche, 06/06/2010 13:13:25'}, 
+	{'lat': 47.642166, 'lon': 6.8577147, 'hour': 'dimanche, 06/06/2010 13:13:33'}
+];
 
       var map;
       var marker;