report of second year internship as assistant engineer · report of second year internship as...

56
Report of Second Year Internship As Assistant Engineer “Development and Validation of Tracking System and Scoring Calculations for WRSC 2015” Realised at Åland University of Applied Sciences - Finland From the 8 th of June 2015 to the 4 th of September 2015 By Sylvain Hunault Engineering Student at ENSTA Bretagne SPID - Robotics 2016

Upload: others

Post on 30-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Report of Second Year Internship

As Assistant Engineer

“Development and Validation of Tracking

System and Scoring Calculations for

WRSC 2015”

Realised at Åland University of Applied Sciences - Finland

From the 8th of June 2015 to the 4th of September 2015

By Sylvain Hunault

Engineering Student at ENSTA Bretagne

SPID - Robotics 2016

2 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Abstract Nowadays, the trend of autonomous vehicles has grown, boats included. This trend deals

with future unmanned cargos able to cross the oceans or autonomous boats able to scan the

ocean during years for scientific experiments. The World Robotic Sailing Championship and

the International Robotic Sailing Conference take place in order to present the researches of

laboratories made in Robotic Sailing.

The necessity of keeping the track of those unmanned boats grows alongside this trend. This

paper presents the development of a tracking system for the 2015 edition of the WRSC

during my second year internship at ENSTA Bretagne and Åland University of Applied

Sciences. It describes how from the previous projects on this tracking system we achieved a

reliable tracking system that allowed us to perform scoring calculations.

The success of this internship relied on the strong basis built up by the previous projects and

the dedication of the previous students still involved in the project during our internship.

These factors greatly helped us, my colleague Tao ZHENG and I, to achieve the goals of this

internship.

At the end of our we were able to provide the services of watching online in real time or in a

replay mode the boats on a map thanks to trackers and determine the points scored by each

team according to the GPS positions we gathered.

Résumé

De nos jours, la tendance des véhicules autonomes s’est étendue sans laisser de côté le

domaine maritime. Celle-ci touche aussi bien aux cargos transporteurs qu’aux expériences

scientifiques sur le monde marin. La Championnat du Monde de Robots Voiliers et la

Conférence Internationale sur les Robots Voiliers a lieu pour mettre en commun les

recherches scientifiques dans ce domaine.

La nécessité de connaître les positions de ces bateaux autonomes va de pair avec leur

développement. Ce rapport présente mon travaille lors de mon stage d’été de deuxième

année réalisé à l’ENSTA Bretagne et à l’Université des Sciences Appliqués de Åland. Il décrit

comment à partir des précédents projets réalisés dans ce domaine nous sommes arrivés à

proposer un système de géolocalisation fiable ainsi que la possibilité de calculer les scores

pour la compétition.

Ce stage fut un succès grâce au travail réalisé dans les précédents projets et l’investissement

des précédents étudiants encore impliqués même au cours de notre stage. Ces faits nous ont

apporté, à mon collègue Tao ZHENG et moi, une aide indéniable à la réussite de ce stage.

Nous fûmes capables de proposer des services en ligne de suivi en temps réel ou par rejeu

de la compétition sur une carte grâce à des trackers et de déterminer les scores réalisés par

chaque équipe grâce aux positions GPS transmises par les trackers.

3 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Table of Contents

Abstract ................................................................................................................................................... 2

Acknowledgement ................................................................................................................................... 4

I - Context of the Internship ................................................................................................................ 6

1) History of the Project .................................................................................................................. 6

2) Aims of the Internship ................................................................................................................. 8

II - Description of the Work Realised .............................................................................................. 10

1) Tasks Distribution ...................................................................................................................... 10

2) Tools Employed ......................................................................................................................... 16

3) Difficulties Encountered ............................................................................................................ 17

4) IRSC & WRSC 2015 ..................................................................................................................... 19

III - Methods of Work ...................................................................................................................... 22

1) Github ........................................................................................................................................ 22

2) Scrum Management .................................................................................................................. 22

3) Test Driven Approach ................................................................................................................ 23

4) Team Work ................................................................................................................................ 24

IV - Contribution of the Internship .................................................................................................. 25

1) Skills Learned ............................................................................................................................. 25

2) Professional Project ................................................................................................................... 25

Conclusion ............................................................................................................................................. 26

Bibliography ........................................................................................................................................... 27

Appendices ............................................................................................................................................ 28

4 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Acknowledgement It is an immense pleasure to thank Mrs. Anna FRIEBE, project manager, organiser of the

WRSC 2015 and my internship tutor, for being a great supervisor and preparing everything

to make our stay in Mariehamn a wonderful experience.

I express my deep thanks to Mr. Olivier REYNET, teacher at ENSTA Bretagne, for his

positivity and for making this internship possible.

I owe a strong sense of gratitude to Mr. Ronny Eriksson, vice-rector of Åland University of

Applied Sciences, for starting this project in 2014 and for his optimism and trust in our work.

I am extremely thankful to Mr. Tao ZHENG, my workmate on this project, Mr Benoit

BOURDON and Mr. Quentin DESCOURS, the previous students working on the project; their

help and work have been undeniably useful.

Finally, I would like to acknowledge all the competitors and organizers of the IRSC and

WRSC for making this event memorable.

All these persons contributed in one or more ways to the success of this internship.

5 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Introduction

This report presents my work and my analysis of my second year internship that occurred in

the Robotic Sailing Laboratory of the Åland University of Applied Sciences in Mariehamn,

Åland, Finland. It is written in English in order to be transmitted to our Swedish tutor Anna

FRIEBE and will present in details in an appendix our production in order to help anyone who

wants to take over the project perhaps for the next edition of the competition.

This internship as assistant-engineer is an addition to our second year of studies. As the

purpose this internship is to be used for the World Robotic Sailing Championship, it was

realised at the place of the competition to get used of the environment and be introduced to

the organization.

This internship is part of a long term student project that started at ENSTA Bretagne for the

same competition in 2013. Therefore, I will briefly present the history of the project in a first

part before presenting the aims and stakes of my work.

The second part will present our work and the tools employed and then give a first analysis

through the difficulties encountered and the results of our project when it was used during

the competition.

In a third part, I will go through the methods of work used during this period. I will introduce

Github, the Scrum Management and the Test Driven Approach that to have an optimal team

work with Tao ZHENG.

Finally, I will sum up the skills I learned and present the advantages of this internship and

how it takes place into my professional project.

6 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

I - Context of the Internship This internship has been proposed by Mr. Olivier REYNET, teacher at ENSTA Bretagne, Anna

FRIEBE organizer of the WRSC and IRSC 2015 [1] at Åland University of Applied Sciences [2]

(ÅUAS) and Ronny Eriksson vice-rector of ÅUAS, in continuation of several projects realised

by other ENSTA students. Two second-year students were required and I applied to this

internship with Tao ZHENG a Chinese student specialised in software engineering at the

school. Needless to say, a lot of work had been already done and many possibilities explored

when we started. A short history is required to give a picture of the basis we started from.

1) History of the Project

i. 2013 - Nicolas BROCHETON’s third year project

It all started from the work of Nicolas BROCHETON during his last year internship in 2013.

The subject was “Tracking and Tracing of Robotic Swarms” (« Localisation et suivi d’essaims

robotiques » in French)[3]. The motivation was to provide a tracking system for the WRSC

organized in Brest, France, by ENSTA Bretagne in 2013. This competition gathers sailing

robots elaborated by academic teams coming from all over the world. Following each robot

is not an easy task for the jury, so such a tracking system would come in reinforcement and

make the assessment more reliable.

In order to place a tracking device on a robot, two main constraints have to be respected.

Most importantly, the volume and weight should be minimized otherwise it can disturb the

behaviour of the robot. Secondly, the price should be approachable.

To respect these constraints, Nicolas chose to use smartphones and to send via SMS the GPS

coordinates with an Androïd application. The positions were gathered on a web server and it

was possible to display them on a website.

However the number of coordinates was excessively low as it can be seen on the picture

below and Nicolas needed to develop an extrapolation algorithm for the trajectory.

Picture 1: GPS coordinates of a man walking on the athletic field gathered with Nicolas Brocheton's solution

7 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

His work was successfully used for the WRSC 2013 but it inspired many possible

improvements and a second year project.

ii. 2014 - SWARMON

The SWARMON project was a second year project realised by 5 ENSTA Bretagne students

during their whole second year: Benoit BOURDON, Quentin DESCOURS, Simon STEPHAN,

Mouad BICHOUARINE and Jean-Jacques BOYE, under the supervision of Olivier REYNET [4].

The objectives were to provide a tracking system able to send GPS coordinates to a web

server and services of display for the WRSC.

This project led to the creation of an electronic card which replaced the solution proposed

by Nicolas BROCHETON. The smartphone was replaced by the 3G & GPS SIMCOM module

SIM5218 that can be programed via a Lua script.

Ruby on Rails [5] was first used in this project to provide the services of database and display

on a web server. Optimised electronic cards were also ordered to a company called

PROTECNO to minimize the volume and weight. Unfortunately, the first card made by the

company had a problem and the functional ones arrived one year after the end of this

project.

iii. WRSC 2014

After this second project, a lot of work was still necessary to present viable services for the

WRSC 2014 and 2015. With the initiative of Mr. Ronny Eriksson, vice rector of Åland

University of Applied Sciences, Benoit BOURDON and Bastien DROUOT continued the

SWARMON project at Mariehamn, Finland, during their second year internship in summer

2014. Their aim was to complete the SWARMON project for the WRSC 2015 that would

happen in Mariehamn. They successfully tested it during the WRSC 2014 in Galway with the

prototype cards developed during the SWARMON project.

Picture 2: SIMCOM SIM5218

8 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

iv. 2015 - MYR & SWARMAPP

Ultimately, during February 2015, for their third year industrial project called Monitor Your

Robot (MYR) [6], Benoit and Bastien worked again on the web site for the WRSC and they

improved significantly the previous version.

Another ENSTA Bretagne student, Thibault VIRAVAU worked on an Androïd application

(SWARMAPP)[7] that could replace a SWARMON electronic card1 during the same period.

The coordinates are sent via a HTTP Post request instead of a SMS.

2) Aims of my Internship

i. The WRSC

The WRSC 2015 was the 8th edition of this annual competition and it was organized in

Mariehamn, Åland, Finland from the 1st of September to the 4th after the IRSC. It had 2

categories of boats: micro-sailboats (below 1 meter long) and sailboats (above 1 meter long

to 4 meters). It was composed of 4 trials:

- Station Keeping: the boat had to stay alone in an small area for exactly 5 minutes

- Area Scanning: the boat had to go as many squares as possible and provide an

XML file with data

- Triangular Course: the boat had to go through waypoints as fast as possible

- Fleet Race: All together the boats had to race around a 300-meter-long square

As the title of this internship means, my work with Tao was to provide a tracking system and

scoring calculations for the WRSC 2015. The motivations for this work were roughly the

same as Nicolas’s third year project.

1 The electronic card will now be called a “tracker”.

Picture 3: The two prototype trackers used for the WRSC 2014 in Galway

9 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

ii. The Stakes of the Internship

Tracking a swarm of robots is not an easy task when your only way of checking is by looking

at them and it has been confirmed again this year. For the race trial, all the boats are

launched together and the jury have to make sure the boats do not go by non-allowed

shortcuts. Having a tracking system is a great asset for this kind of situation as it can be seen

on the pictures below: 4 boats were competing in the race around a 300 meter-long square

and the jury was in a zodiac to observe the boats. At one moment, they nearly collide with

one of the 4 boats.

Picture 4: Fleet race of WRSC 2015 on the website Picture 5: Jury of the WRSC 2015

The main stake of our work was to demonstrate these services are useful and essential for

this competition.

The competition gathered 6 teams with boats from 80 centimeters to 4.23 meters with a

weight from 5.3 kg to 300 kg. Therefore, the size, the weight and the volume of the trackers

were at stake for this year. Using the recently received electronic cards made by PROTECNO,

one of our tasks was to have the smallest, the lightest and waterproof tracker possible.

The addition of scoring calculations in comparison of the other projects added the necessity

of reliability to our work. Both tracking and scoring services had to be reliable.

So at the beginning, it was expected from this internship to provide for the WRSC 2015

trackers, a website to visualize the positions of the boats on a map from shore or anywhere

else and to assist the jury to calculate the scores.

At the end of our work the 28th of September, we had developed the tools required, as user

friendly as possible. As we planned to stay for the competition Tao and I were the main users

of the tools we developed, meaning that we were running the scoring calculations and we

configured all the attempts and missions.

During the competition, the website was used to provide the official scores for the Station

Keeping, the Fleet Race and the Triangular Course. The jury followed the boats on the sea

but trusted our tracking and scoring system. The XML file for Area Scanning was analysed by

another program developed by an organizer and we were able to compare the XML file with

our data.

10 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

II - Description of the Work Realised My workmate, Tao ZHENG, and I, applied to the internship in February 2015. Since this date

we have been in contact with the previous students that worked on SWARMON. They

showed and explained us the trackers, the programs needed for the project and gave us a lot

of documents. We also took into contact with Anna FRIEBE, the person in charge of our

internship and the WRSC 2015 at ÅUAS.

We decided to start the internship as soon as possible and do it in two parts: the first one in

June at ENSTA Bretagne and the second one at ÅUAS in Mariehamn until the end of the

WRSC the 4th of September.

1) Tasks Distribution

i. Period at ENSTA

We have been involved in the project just a couple of days after applying to it. We assisted in

February to the tests of the recently received electronic cards by Quentin DESCOURS,

Bastien DROUOT and Benoit BOURDON. It was also the opportunity to be introduced to the

technologies used: Ruby on Rails, Lua, Putty and see how does the electronic cards work.

A first skype conference was organized the 28th of April with Anna FRIEBE in order to start

elaborating the objectives of our internship.

Then during June, Tao and I started working on the project fulltime at ENSTA Bretagne to

prepare the period in Mariehamn. The idea was to be fully ready to work when we arrived

out there.

Considering our different skills, Tao and I did not work on the same parts of the project

during June. Indeed, Tao is specialized in software engineering and already used Github and

web development tools during his second year project. Whereas I am specialized in robotic

engineering and for my second year project I worked on electronic cards, Androïd

development and Bluetooth communication.

Therefore, Tao directly started working on the web site developed by Benoit and Bastien

during February 2015. For my part, I worked on the trackers.

Tasks Summary

Tao’s tasks were the following without going into the details:

Configuring his computer for Ruby on Rails and master it

Understanding how is organized the website

Determining what have to be done

Preparing the Github repository that will be used during all the internship

11 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

To sum up, my tasks for this period were the following as it can be seen on the Gant

Diagram.

Mastering the use of the electronic cards and the SIMCOM SIM5218 modules

Ordering Global Positioning System (GPS) and Global System for Mobile (GSM)

antennas and batteries

Understanding the use of the Androïd application developped by Thibault VIRAVAU

Finding a solution for having small and waterproof boxes for the trackers

Preparing the internship in Åland

Picture 6: Grant Diagram for the period at ENSTA Bretagne

Electronic card

To go further into the details, the tracker needs to be fully equipped to be used. It needs a

SIM card, a GPS and a GSM antenna and a SIM5218 module. The module runs a program

written in Lua and it can also be configured and used manually with AT commands.

Therefore, my first task was to be able to run the electronic card by myself and to know how

to configure it.

Picture 7: Tracker fully equiped for WRSC 2015

12 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

GSM and GPS antennas

My second task was to replace the 2-meter-long GSM antennas used for both 3G and GPS

reception with smaller and specialised antennas. After some research and consulting the

teachers specialised in telecommunication at school, we chose the antennas (see Appendix 1

for state of the art and datasheets).

Picture 8 : GPS antenna (left) and GSM antenna (right)

Androïd Application

I briefly looked at the Androïd application SWARMAPP made by Thibaut VIRAVAU. This

application was just a backup solution so I make sure I know how it works and it can send

coordinates to the website. But we focused on having a viable solution with the trackers.

Waterproof Boxes

This time, I considered the resistance to water of our system. I looked to the existing

waterproof boxes that can be ordered online. However, they were all too big and too heavy.

Moreover, it would have added more spending and the possibility of delay by ordering them.

So I have been through the simplest solution. Mr. Fabrice LEBARS teacher at ENSTA Bretagne

gave us little plastic boxes and we made them “waterproof” with duct tape.

Picture 9: Our waterproof box placed with duct tape on the keel of a boat during WRSC 2015

To test our idea, I put duct tape all around a plastic box very carefully to avoid folds and I

placed it underwater. After 12 hours, there was no humidity inside the box. As the box

would be placed on the keel of the boats and will not remain underwater, this solution was

adopted.

13 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Preparing the trip to Åland

Finally, I prepared our trip to the second phase of our internship. I needed first to configure

my computer to be able to work on the website and started learning how to use Ruby on

Rails and Github.

Secondly, I took care that we will be able to travel by plane without problems with the

electronic cards and the batteries. Interestingly, batteries can be damaged by going in

altitude so there are restrictions to transport them by plane. Fortunately, at this moment we

had only 3 batteries and we had no problem to travel with them.

ii. Period at ÅUAS

We started working in the office with Anna FRIEBE and the Åland Robotic Sailing Team that

will compete for the WRSC the 1st of July. At this date, the antennas and batteries ordered by

ENSTA Bretagne had not arrived yet. So we had 12 SIM5218 modules (10 of them arrived in

ENSTA the 29th of June), 10 electronic cards and a set of the old 2-meter-long antennas.

Most of the remaining work concerned the website. This part had 2 phases. The first one

was the tracking services: the possibility to watch the position of the trackers in real-time on

a google map and the possibility to re-watch via a replay function. The second one

concerned the scoring calculations. Then during July and August we also made the website

as user friendly as possible.

Picture 10: Grant Diagram for the period at ÅUAS

In parallel of my work on the website, I had to run different tests on the trackers as it is

shown on the Gant Diagram. This was to make sure every component (the module, the

antennas, the batteries) will work correctly for the competition.

Tracking Services

The first phase was to develop the services of tracking, meaning that the competitors or

anyone could follow the boats on a Google map during the competition.

14 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

I took care of the real-time page by coding in Ruby, HTML and JavaScript. Moreover, this

would be the most used service of our website so I carefully tested it during the internship.

Picture 11: Real-time page displaying one of the tests done by the Åland team during August

Testing the trackers

Before the competition, we had different opportunities to test the trackers. First of all, the

SIM5218 modules were tested when we arrived in Mariehamn.

Then during the third week, we put a tracker on the Åland robot when they performed

sailing tests. But at this moment, the real-time page was not ready.

Picture 12: Tracker on the Åland Sailing Robot

However, this allowed us to test our backup protocol in case the tracker cannot send the

coordinates to the website because they are also saved on the SD card.

15 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

The Åland Robot Sailing Team made a second test that can be seen on picture 11. It worked

out well and it was found already useful by the team to visualize quickly the trajectories of

the boat even after the test.

The autonomy of the batteries was also tested. They last between 8 to 10 hours which

means a tracker can be activated during all a competition day. Furthermore, the accuracy of

the GPS was estimated by comparing it with a Differential GPS. (See Appendix 2)

Picture 13: Tao and I using the differential GPS on a hill

Finally we made sure all the trackers were working alongside the website when we tested

the performance of the server. 6 trackers (they were 6 teams registered) were launched

simultaneously and at the same time we were using the website. This test worked out

without experiencing issues on the website or the Ålcom server.

Picture 14: The 6 trackers on the parking of the school for testing the performance of the website

16 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Scoring functions

Developing the scoring functions was the second main objective of our internship. We had to

implement the scoring system in accordance of the rules of the competition by using only

the information sent by the trackers (time, latitude, longitude).

Picture 15: Scores page in development mode

Therefore, for the triangular course and the race, the functions were checking if the boat has

correctly crossed a line (the end line for instance) or correctly turned around a buoy. We

used geometrical relations and most importantly, we developed following a test-driven

philosophy which will be further explained in the Methods of Work.

Preparing for the competition

Finally, once my work completed, I had to prepare our system for the competition according

a checklist we produced with Tao and Anna (See appendix 3). This meant the website had to

be launched in production mode, a more secured mode of Ruby on Rails. Each team should

have a tracker and this tracker should be configured. 6 back up trackers were also prepared

and the protocol to save the database of the website was validated.

The 28th of August, we were ready to use our system for the WRSC.

2) Tools Employed

i. Putty

To communicate with the module, I used Putty, a free implementation of Telnet and SSH for

Windows and Linux. It is very easy to use. However it is not possible to erase the letters you

type (even if they disappear from the screen) which means you have to type the command

on Notepad and copy/paste it to avoid losing time and energy.

17 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

ii. Ruby on Rails

Ruby on Rails (RoR) is a powerful gem of the programing language Ruby to develop website.

The asset of this framework is that it gives a very structured architecture to your project.

Even if it looks complex at a first glance, once you know it you lose nearly no time to find

your files even if you have thousands.

Furthermore, RoR allows integrating Ruby code into HTML files which describes the content

of the pages of the website. The file extension becomes .html.erb (which means there is

embedded Ruby code). This allows displaying information from the database by calling

elements directly in the HTML file.

In addition, Ruby can work with a system of gems. These gems are made by other people

among the Ruby community and each gem has specific functions. For example, we looked

for using a captcha validation, so we just had to find a gem that implements it and then we

were able to integrate captcha to our website. Thanks to this possibility, we were able to

integrate many components to our website without having to code them from scratch.

3) Difficulties Encountered

i. Economic Analysis: ENSTA Bretagne and ÅUAS

An important difficulty we encountered deals with the economic system of ENSTA Bretagne.

It was planned to order the batteries and antennas at ENSTA Bretagne and receive them

before July or send them to Mariehamn. However, by the end of July, even if the

administrative requests were fulfilled, the products were not ordered yet. This forced us to

order them from Mariehamn.

At ENSTA Bretagne, the purchases are not executed by the laboratory itself. Administrative

papers have to be filled and arguments to justify each purchase have to be given. In our

case, this system slowed down excessively the acquisition of the batteries and antennas.

On the opposite, at ÅUAS, the budget for the WRSC was defined. Anna FRIEBE was able to

order them herself using the budget after having the approval of Ronny ERIKSSON vice-

rector of the University.

This system proved itself to be faster than ENSTA’s without suffering from a lack of control.

However, the scale of the University tends to justify this difference as it is humanly possible

to control every order by talking to each other in ÅUAS.

ii. Huge help from Benoit and Quentin

A very important factor in the success of this internship is the help provided by Benoit and

Quentin, mostly at the beginning but also throughout the whole 3 months. We benefited of

a very solid basis to start our work which allowed us to learn from it.

Many difficulties and questions were avoided and quickly overcome thanks to their replies

and advices which accelerated drastically the development of the project.

18 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Moreover, they provided us useful documents and internet guides to learn RoR.

Thanks to all of their help, I always found the solution of my errors within a day.

iii. Server Performance

At week 8, one week before the competition, I noticed that the server provided by Ålcom

was excessively slow. Our reference was the server from ENSTA Bretagne. The issue was that

it took about 10 seconds to integrate 10 coordinates sent by a tracker to the website on the

Ålcom server, whereas it took less than 0.2 second on the ENSTA server as it can be seen on

the picture below. It is a critical problem because the server cannot receive new coordinates

during this period and the coordinates are lost.

Our contact at Ålcom diagnosed an issue with the memory of the server and solved it.

However, the server was not able to integrate the 10 coordinates in less than 1 second. We

stated it would be enough because a tracker sent 10 coordinates every 10 seconds. With a

maximum of 6 trackers during the competition (and finally only 4 trackers were required

most of the time) the server would be able to handle the 60 coordinates it will receive every

10 seconds.

Picture 16: Logs of the website: Ålcom(left), ENSTA (right)

During the competition, we sometimes observed a slowdown of the server reaching up to 25

seconds to integrate 10 coordinates. Fortunately, no boats were performing an official

attempt and we thought it might be caused by a peak of users on the website.

iv. Trackers

The trackers are not user-friendly, meaning that there is only a tiny detail that shows how to

plug the battery. I am writing down this problem as anyone using a tracker should be very

careful about the battery because I damaged one electronic card and destroyed another by

exchanging the pins of the battery and creating a shortcut.

19 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Picture 17: Tracker in its box, ready for the WRSC

Moreover, our idea to make the boxes waterproof worked out until the last day of

competition where water got inside of one box and created a shortcut. The reasons might be

that there were folds on the duct tape as it was put in a hurry. Furthermore, the box was

splashed by the water because the keel of the boat was quite small which is completely

different from calm water.

A real solution to have waterproof trackers has to be found or the duct tape has to be put

with extreme care if someone takes over the project.

4) IRSC & WRSC 2015

The 28th of August our work was complete and everything ready for the competition.

The 31st of August we attended the International Robotic Sailing Conference. The lectures

were extremely entertaining. Benoit and Quentin gave one lecture to present the project

SWARMON and introduce the version we developed with Tao. Therefore, we used this day

to meet the teams and invite them to register to our website.

Picture 18: Home page of our website

Finally, as organizers our task was to make sure everything works correctly during the

competition

20 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Picture 19: My badge for the WRSC

We had a television screen displaying the boat currently performing. (See picture 20)

According to our checklist, each day I prepared the trackers with duct tape and put them

inside the boats if possible or stick them onto the keel with duct tape. During each day, we

had to note the time of each official attempt (which means validated by the jury) and to

perform the scoring calculation. At the end of each day, we stopped the server in order to

make a backup save of the database.

Picture 20: Television screen displaying the attempt of the moment

Throughout all the competition we had to retrieve only once the coordinates thanks to the

SD card because once tracker stopped transmitting to the website without any reason.

We also had to correct minor bugs at the end of the first and third day when we stopped the

server.

21 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Last but not least, our work was very welcome by all the competitors and the jury: the idea

of re-using it for the next competition emerged.

22 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

III - Methods of Work In order to work with Tao and maximizing our efficiency we used different methods of work.

1) Github

Github has been a key element throughout this entire project. Indeed Github offers a version

controller system and simplify the work in a group with a system of branches.

Picture 21: Github branch system

A Github repository is organized of branches. The primary one is the branch ‘master’ which

contains normally the last stable version. Then creating a branch allows working on the

project from this version. With this method you can create one branch for each feature you

want to develop. Once the feature is finished, you submit a pull request to merge your

version with the branch ‘master’ and by solving the conflicts, the project should remain

stable.

Therefore, for our project, each of us has one branch to pull our changes. The use of Github

for only the two of us was simple even if it took time to be mastered. Indeed, to add our

changes to the ‘master’ branch the steps were the following:

Picture 22: Protocol to update the branch ‘master’

Moreover, Github is a very convenient tool to transfer our project on a machine. For

instance, for the Ålcom server, we just needed to install Github and then download the

repository with the console command.

2) Scrum Management

In order to organize the tasks during the internship with Anna FRIEBE, we used Scrum

Management in a simplified way. This simply consisted in doing each morning, if possible, a

short meeting to expose what has been done, how we plan to do the next tasks and discuss

about the different approaches of doing them. This method was very helpful thanks to the

external point of view of Anna and greatly helped us developing a user-friendly website. It

23 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

was also used to organize the journey when we needed the help of a person from the

university, notably for using the differential GPS.

Picture 23: Scrum management board at the end of the internship

Moreover, we used a board and post-it to classify the tasks in terms of priority and state

(Tasks, Checked Out and Done). We used it to know what was doing the other one and Anna

provided the little changes needed by adding post-it.

3) Test Driven Approach

We employed a test driven approach for the development of the whole website as it is part

of the Ruby on Rails philosophy but more specifically for the scoring functions.

Basically, this approach means you write the tests before the functions. A big part of Ruby

on Rails is dedicated to tests however I found more convenient to test the website and the

real-time page for instance by using it as would do a normal user. The tests are written in

Ruby and they use their own data written in yaml files.

Nevertheless, this was very useful for developing the scoring calculations. It allowed us to

focus on the calculations first instead of working simultaneously on the score pages and the

scoring functions. My approach to develop these functions was first to determine the inputs

and outputs of my functions in the test part. Then write a first version of the functions and

finally elaborate the core of the tests. Depending on the results of the test, the functions had

to be adjusted or not.

24 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

4) Team Work

Ultimately, once both of us become used to Ruby on Rails and JavaScript. We were able to

help each other to solve tenacious issues. Depending on the case, we worked on the same

computer or on our own to bring a solution and new ideas to the issue.

Working with another person on the project has been a real plus. It helped not to feel alone

and depressed in front of the errors and most importantly to learn from the other’s work.

25 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

IV - Contribution of the Internship

1) Skills Learned

This internship allowed me to improve a lot my working methods and my technical skills. I

had the opportunity to master Putty and Github that I am already re-using for my

professional contract.

This internship also taught me how to benefit from the skilled people around me, whether

the teachers of ENSTA or the teachers of ÅUAS.

Most importantly, I drastically improved my knowledge in the languages Ruby, JavaScript,

HTML and CSS. I successfully re-used my skills in electronics to understand how to use the

trackers. My researches about GPS and GSM antennas are definitely a plus as my third year

project deals with antennas.

2) Professional Project

The formation I received during my second year was polyvalent and this internship which

mixed web interface, calculations and electronics reached my expectations. My interest in

this internship was the link between humans interfaces and sensors (here the trackers).

Having started my third year studies, this project was definitely what I wanted to do.

In addition, I started my third year of studies at ENSTA Bretagne with a professional contract

at Thales Brest. My subject deals with the test bench of radar detectors of French warships

which links sensors and a testing interface. This contract will allow me to become even more

specialized in this field.

26 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Conclusion This internship has been an amazing opportunity that surpasses my expectations. It has been

a great pleasure for me to be involved in a long term student project and in the organization

of a robotic competition. Furthermore, personally, it has been wonderful to live in a

Scandinavian country.

The success of our services during the competition, the congratulations from the other

organizers and the wish to re-use finally this project make me thing we have reached our

objectives. However, by being involved in its development, I know they are still many ways

of improving it.

This internship is a meaningful addition to my polyvalent curriculum and allowed me to get

contacts in international laboratories. I have good hope this experience alongside my third

year project will help me find a job in the robotic fields.

Finally, I wish this project will be re-used and find successors. I will be glad to help the

persons who will take over our work.

27 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Bibliography [1]: World Robotic Sailing Championship 2015 & International Robotic Sailing Conference -

http://wrsc2015.com/

[2]: Åland University of Applied Sciences - http://www.ha.ax/text.con?iPage=28

[3]: « Localisation et suivi d’essaims robotiques », by Nicolas BROCHETON, 2013

[4]: « Projet SWARMON - Rapport de Projet », by Benoit BOURDON, Quentin DESCOURS,

Simon STEPHAN, Mouad BICHOUARINE and Jean-Jacques BOYE, 6 June 2014

[5]: Ruby on Rails - http://rubyonrails.org/

[6]: “Final Report - SWARMFRAME Project” by Benoit BOURDON and Bastien DROUOT, 2015

[7]: “Final Report SWARMAPP Project” by Thibault VIRAVAU, 2015

28 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendices

Appendix 1: GSM and GPS antennas, State of the Art

Appendix 2: Accuracy measurements with a differential GPS

Appendix 3: Checklist for the WRSC

Appendix 4: Notice to take over the project

Appendix 5: Internship Agreement

Appendix 6:Assessment Report

29 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendix 1: GSM and GPS antennas

GSM Antenna

According to my research, the 3G uses the frequencies 900 and 2100 MHz and the 2G uses

900 and 1800 MHz (according to http://www.commentcamarche.net/contents/1123-

telephonie-mobile-3g-et-4g-expliquees)

Because 3G is now the “standard”, I did not find antennas specialized in 3G or 2G. However I

suppose an antenna specialized only in 3G or 2G would be much smaller.

Therefore, our criteria for having a 3G antenna (with a 2G backup) are:

- frequency bands at 900, 1800 and 2100 MHz

- U.FL connecter to avoid an adaptor

- Small size

- Omnidirectional

- Linear Polarization

- Gain above 1

- Not too heavy

We finally choose the GSM Penta Band Antenna ANT-PCB4242 by rfsolutions because it gives

the best compromise for the parameters above.

Datasheet: http://www.farnell.com/datasheets/1637086.pdf

GPS Antenna

Concerning the civil GPS antennas, there is only one frequency which is 1575,42 MHz. (See

http://fr.wikipedia.org/wiki/R%C3%A9cepteur_GPS) This is why you do not find the

frequency in the datasheet of a GPS antenna.

According to a document written by Taoglas Antenna Solutions which describes accurately

and clearly how GPS antennas work and what are representing their parameters, the GPS

antenna we looked for may respond to these criteria:

- Cable shorter than 200 mm

- Circularly polarized

- The bigger the surface and volume are, the more reliable the antenna is and

capable of work without discontinuity

- Internal GPS

- U. FL connector to avoid an adaptor

Moreover when using the antenna, we may put it far from metal components. However,

inside the box, the antenna is very close to the module and the GSM antenna but it still work

fine.

30 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Bases on theses parameters, we choose the MIA-18 Embedded Active GPS Antenna 18 mm

built by Maxterna Inc. for again the best compromise.

Datasheet: http://www.farnell.com/datasheets/1681382.pdf

31 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendix 2: Accuracy Measurements with a Differential GPS

Protocol

The measures were executed at the top of a hill nearby a water tower to have the best

visibility for the satellites.

All measures were taken at the same position.

We used a differential GPS from the University (See Picture) in differential mode to get the

reference value. We gathered about 100 coordinates from it before stopping.

Annexe 2 - Picture 1: Differential GPS

2 trackers were put in the middle of the differential GPS and were launched for about 2-3

minutes.

Results

The measures were exploited using Scilab.

32 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Here are 2 types of graph:

- One represents the position in red of the coordinates given by the tracker and in

blue the coordinates given by the differential GPS.

- The second represents the evolution of the equivalent in meters of the difference

between the reference value and the each position given by the trackers.

The reference value is the mean value of latitude and longitude given by the differential GPS.

The formula used to transform a position (latitude,longitude) in meters is :

acos(cos(lat*%pi/180)*cos(long*%pi/180))*R

where R = 6371000 meters

The original formula of the distance between two points is:

ACOS( SIN(lat1*PI()/180)*SIN(lat2*PI()/180) + COS(lat1*PI()/180)*COS(lat2*PI()/180)*COS(lon2*PI()/180-lon1*PI()/180) ) * 6371000

I use approximation but it is fine as the distances are small.

(Source : http://www.movable-type.co.uk/scripts/latlong.html)

Here the graphs obtained (see pictures below).

As we can see, the difference between the two positions decreases over time but a static

error remains.

This means the tracker is connecting to more and more satellites and therefore the position

it gives is more and more accurate. The DGPS was displaying how many satellites were

visible and there were 8 satellites when we realised our measures.

However, because our trackers are not using differential GPS, it remains a static error that

we cannot get rid of. But these measures allowed us to say our trackers can give measures

around 5 meters from the exact position. In fact, I expect the distance go below 2 meters

which means after reflexion, we should perform a very long measure to visualize the static

error more clearly.

During the competition the trackers were launch around 9 a.m. and stopped around 5 p.m

which means there was enough time for then to become as accurate as they can.

33 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

34 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

35 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendix 3: Checklist for the WRSC

Before the beginning of the competition

For the tracker:

Make sure all the batteries are fully loaded.

Make sure all the trackers have the correct autorun (with appropriate token and token ID).

Make sure all robots have a tracker and that it is written on it. Name of team and Robot in

the back of the box for instance.

Make sure all trackers have a sim card and an sd card.

Make sure the trackers and antennas are stuck with some tape.

Prepare back up trackers if there are enough to do this.

For the website:

Make sure the website is launched

Make sure the website is accessible

Make sure the website can register coordinates sent by trackers

What must be brought with us :

Cables to load batteries

Adapters to read sd cards

Laptop(s)

Pick up the start time and end time of missions and attempts on the website

Camera to take pictures, because that’s cool

During the competition

Pick up the beginning time of each mission, each attempt for each category

Same for end time

Note the start of the race trial

After each day of the competition

Make sure the start and end time matches the real ones picked up during the competition

36 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Make sure no bugs have appeared and if there is one try to fix them without destroying

everything !! NEVER, NEVER RESET THE DATABASE !!

Load the coordinates from the sd card if necessary

Make a backup save of the data base

37 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendix 4: Notice to Take Over the Project

This appendix will give as many information as possible about the trackers and the website.

If any information you think is missing, you can contact us at:

[email protected]

[email protected]

First of all here is a short list of the software I used.

-Putty to communicate with the tracker

-Sublime Text 2 to write code (Lua, JavaScript, Ruby, Html, CSS and so on)

-As Ruby on Rails is broken on Windows, I used a Ubuntu 14 with Virtual Box to launch the

server (I had to share the folder between my computer and my virtual machine: if a modify a

file of the folder on my computer, it is changed also on my virtual machine)

-Github with gitshell

Tracker’s notice

A tracker is equipped of a GPS antenna and a GSM antenna connected via a U. FL connector.

(See appendix 1 for more precision about the antennas). To run it requires:

- A SIM card

- A GPS antenna

- A GSM antenna

- A battery (source of power)

- A SIM5218 module

- (Not mandatory)a SD card

Here is a schema explaining the electronic card:

38 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Be careful when connecting the battery: the red wire of the battery should go to the + and

the black one should go to the other pin.

Moreover, the used the USB to USB configuration with GPIO and antennas activated.

Normally all trackers should be set this way by default.

Then the module when launch will run the file autorun.lua. Before hand, you need to

configure the tracker for the SIM card you are using.

Documentation given to us to configure the SIMCOM SIM5218 module:

Configuration of the SIMCOM 5218 module

Usefull documentation for this section: developmentkitmanual.pdf

How to start the SIMCOM with the development kit:

Plug the antenna on the module directly (slot main for the 3G, slot GPS for the GPS)

Insert the SIM card in its slot (needed to start)

Switch on both UART (serial link) and RF CONTROL (flight mode) buttons

Connect the serial link to the PC (using the USB connector)

Power the card (USB or mains 220V) and move the power jumper to the correct position

Turn on the module by pressing the POWER ON button

When you have power the RED light is on When you press the POWER ON button the STATE light turn

to green

WARNING: The module will not start without the SIM card and the antenna

Communication with the module using Linux

39 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Usefull documentation for this section: documentationSIM5218ATcommands.pdf

First you need to find on wich port is attached the serial Link. To do so you can type this

command line in a terminal: dmesg | grep tty Write down the number of the USB port (e.g.:ttyUSB0)

Now you have two solutions to communicate with the module:

To use PUTTY to type directly the command lines

To use PYTHON SERIAL (You will not be able to read the port)

Using Putty

Start PUTTY (install Putty on your system with for instance "apt-get install putty" on Linux and then

launch it in sudo )

In the home page (when you click on “Session― in the list in the left of the window) fill the

following field to establish a serial connection:

Hostname: /dev/ttyUSB0 #put the correct port number instead of ttyUSB0

Speed: 115200

Connection type: Serial

Finaly click on OPEN

NOTE: In Putty you can save a session for next uses

Using Python serial

python import serial ser=serial.Serial('/dev/ttyUSB0',115200)

ser.write('ati ')

NOTE: When using Python Serial you are not able to read the port

Configuration of the internet access: First you have to find find the configuration of your specific operator:

You can find a list of pdp configurations here or here

For instance if you are in Aland:

Alcom: APN: internet / no password needed Sonera: APN: internet / no password needed

Then start the card and enter your PIN code:

at+cpin=1234 #enter your PIN code, where 1234 is YOUR PIN code

Then configure the module with the correct PDP configuration (here with Sonera): at+cgsockcont=1,"IP","internet" # define your APN regarding to the PDP

40 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

configuration you use for the profile 1 at+csockauth=1,0 #configure

authentification for profile 1, 0 = no password needed at+csocksetpn=1

#select the profile 1 (up to 16 profiles can be used) Now your card should

be configured !

Test your internet connection:

Open the internet connection (do not forget to plug the antenna):

at+netopen=,,1

NOTE: It can take some time for your first connection

If you want to test your connection:

at+csq #give the strongness of the 3G signal, the higher the better i.e:20

Utilisation of LUA scripts:

usefull documentation: sim52xxluaapplicationnotev0.04

To launch a script from the SIM card:

at+cscriptstart="D:\script.lua" #where "script" is the name of your scipt

To stop the script:

at+cscriptstop

To copy the script in the SIMCOM's memory:

at+fscopy="D:\script.lua","C:\script.lua"

NOTE: If you name your script as autorun.lua• and put it in the memory of

the SIMCOM, the script will automatically be launched when you start the

module.

Once you have configured correctly the module, (and checked it is correctly configured with

the AT commands) [See documentation about the module

documentation_SIM5218_ATcommands.pdf] if your server is running and the address of the

website written in the Lua script corresponds, you should be able to receive GPS and

coordinates and send them to the website.

The lua script does multiple things.

First it launches the 3G connection and the gps.

When it receives coordinates (one every second) it will put into shape the latitude and

longitude because the values given are in degrees and minutes.

After receiving 5 coordinates, it connects to the website and it prepares the HTTP POST

request. When it has received 10 coordinates, the post request is sent.

41 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Website’s notice The code of the website can be found on the Github of Tao:

https://github.com/nicolas2lee/AdvancedMYR

The website was developed with the FrameWork Ruby on Rails

(http://rubyonrails.org/documentation/) and I will not explain how to code in RoR as there

are already excellent guides and tutorials on the web.

I suggest to train with the tutorials of rails first before going through the code of our

website: http://guides.rubyonrails.org/getting_started.html All the commands given in this

tutorial are very important and basic. Rails will create most of the files and organize the

database just by running console commands (such as rails generate controller etc.)

The ruby community and more generally web development community is very active. The

website stackoverflow is very useful to find well know mistakes or find some help.

http://stackoverflow.com/

Do not create too hastily your issues; there are already tremendous amounts of issues and

examples on the internet. (For instance, we never created any issue for Ruby and Html

problems).

Installing Ruby on Rails

First, as I encountered a problem to install Ruby On Rails on Windows. I may explain how I

manage to use it on my computer.

I used Oracle VM VirtualBox and installed Ruby on Rails following this guide on a Ubuntu

v14: https://gorails.com/setup/ubuntu/14.04.

VirtualBox: https://www.virtualbox.org/

Structure of the website

First I will give an overall view of the folders into the project AdvancedMYR/MYR_Rails which

contains the code of the website.

In the app folder:

Assets: contains the JavaScripts files for the Replay, the Real-time and the creation

and display of markers. There are common scripts and some are separated in folders

for their use and to avoid conflicts.

Controllers: There is a controller for each type of data (teams, coordinates, and so

on). Each file contains functions to do basic calculation and requests to the database.

There are generated automatically if you run the appropriate command of Rails (See

the getting started tutorial). Variables starting an @ are transferred to the view with

the same name of the functions.

42 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

For instance if you write @teams=Team.all in the member controller in the show

function. By typing @teams (in the middle of <% %> which means there is ruby code

between) in the show.html.erb of the folder views/members, it will reference to the

@teams of the controller.

At the end there is the marker_params function which defines the only parameters

that can be filled in the database.

Rails is based on the CRUD philosophy: Create, Read, Update and Destroy. All these

functions are created by default.

Helpers: For advanced functions needed in a controller, you should write them in the

appropriate helper (one for each type of data). We have for instance the scoring

calculations in there.

Mailers: for the content of emails. Tao worked on this, I did not.

Models: This folder contains a file for each type of data. It describes the format of

each parameter of a data. For instance, the name of a member should be composed

of letters starting with a capital letter. Many things can be checked by this way such

as the presence and uniqueness of a parameter and even more.

Models are used also for describing the relations between the types of data.

43 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

As shown in this image, a data can belong to another. Therefore you do not need to

specify the parent in the schema file of the database. (It will talk about this later.) If a

robot belongs to a team, you can access its team by writing in Ruby robot.team.

If the relation is has many you can also access them by typing team.robots to obtain

the list of all the robots of this team.

Finally, has many through is like has many.

I take time to explain this because, it appeared to me too lately and therefore I

duplicated some data by willing to do correctly. Even if RoR is quite powerful and

generates a lot of things for you, sometimes these generated things are somehow

hidden in only one file.

Uploaders: Tao worked on it and I did not. It concerns the logos of members, teams

and boats.

Views: This folder contains a folder for each type of data. Each folder contains views

that can be automatically generated for the defaults one (See getting started

tutorial). Each folder is linked with a controller. Here the files are in .html.erb which

means you can embed Ruby code into html code by putting it between these tags <%

%>. Here you need to understand and learn HTML.

These folders can also contains .js.erb files which are JavaScript files with embedded

Ruby code (using the same tags).

We filtered what is displayed in the views depending of the status of the user

(administrator, team leader, visitor).

Here is an array presenting the permissions:

The bin folder: it contains configurations files for the website. You may not even have to

modify them (we did not).

The config folder contains 3 folders: environments, initializers and locales; and other

configuration files.

There are 3 environments you can use to launch your website: the test environment for

tests; the development environment for local debugging; and the production environment

for launching your website on the web. The production mode is more secured and avoids

your website to be stolen.

Each environment is configured in its appropriate file in the environments folder.

44 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Initializers contains file loaded when the web site is launched. The files depend on the gems

you use.

Finally, the route.rb specifies the routes of your website. This files says if there is a view

when a user enter the url with /planes or /teams. Again the getting started tutorial explains

when it has to be configured.

The db folder deals with the database. Each type of data and its parameters are defined in

the schema.rb file however this file can be modified only by running rails commands! These

commands create migrations files into the migrate folder, and then you have to fill these

migrations and then validate them by running a rails command.

The public folder contains the layout.css file for the website and all the static images.

The test folder is made only for testing. It works the same as the website and is used to

validate your website by editing tests. We used this to validate the scoring functions.

The file Gemfile tells which gems and their versions are used for the website.

Description of the real-time and replay page

The JavaScript files of the real-time page use the google map API

(https://developers.google.com/maps/documentation/javascript/)

There are different files to organize somehow the functions.

We uses ajax request mainly to prevent the server from running only the scripts. These

requests are asynchronous and are very helpful to make requests to the database.

All the information of the map are coded in the rtmap.js and replay_map.js files respectively

for real-time and replay. (It is also the same for the creation of markers). Because we need

to interact with the images and dots we put on the map, we need to store them in global

variables such as latest_markers, latest_buoys, lines, etc.

It may appear very messy at a first glance because one function is calling another in a

different javascript file and switches again and again. However, to understand the

architecture I strongly recommend taking the time to draw which functions call which.

Everything starts in the replay.js and real_time.js files.

Scoring functions

Scoring functions determine the time needed by a boat to complete a trial.

There are written in the score_helper.rb file.

How to use the website

We developed the website to be able to administrate the WRSC with our administrators’

permissions.

All the time are in UTC time, so consider your local time before choosing the date.

45 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Only the administrators can create missions. The time stamp is in UTC time. After this,

attempts can be created (by the team leader also). The time stamps should correspond

contain the official attempt and allow seeing it clearly via the replay page. The timestamp

have to be defined carefully because it is used to calculate the points scored with the

attempt.

Moreover, in each module the id and token have to be written in the lua script. They should

correspond exactly to those written in the trackers page, and only one tracker for one token.

Last but not least, the database can be accessed with the rails console (run rails c). And it

gives the absolute rights to modify it (the passwords are encrypted).

I hope these notices were clear. If not, do not hesitate to contact us.

46 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendix 5: Internship Agreement

47 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

48 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

49 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

50 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

51 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

52 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

53 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

54 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

Appendix 6: Assessment Report

55 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT

56 Development and Validation of Tracking System and Scoring Calculations for WRSC 2015

Sylvain HUNAULT