Student Name / Student No.: Chua Hua Yong / N0705129
STUDENT
(N0705129)
: CHUA HUA YONG
SUPERVISOR : DR TAN B.K
PROJECT CODE : JUL2010/ENG/055
What is GPS?
GPS stands for GLOBAL POSITIONING SYSTEM using Space-based navigation satellite system to provide reliable location and time information at all time on anywhere on earth.
Location and time information is capture by a GPS receiver which precisely time the signal sent by the 32 satellites that orbit around earth.
What is a Server?
A server provides essential service connect a series of computer that link other computers or electronic device together. A server user is able to customize server function according to their needs and having dedicated functionality such as web server, print server and data servers. It also allow permitted user to access them. Usage is normally associated within a large organization or public user via internet.
Why makes a GPS Server?
The main objective in this project is to develop a low cost GPS server using limited resource and cost, with the ability to review data from past and present records anytime from anywhere to keep track of vehicles fleets. Data can also be use to improve vehicle travelling which will help individual to save cost on expenses.
How to make a GPS server?
In this project, a laptop and internet connection will be used to simulate a server. GPS tracker will also be needed to send location data for the server to keep and access to. An application program will be used to display the data and plotting of data onto the map.
This report will include topics like objectives, literature review on GPS, server technology, project and time management. More importantly, it will also cover subjects like development and implementation of conceptualised idea, testing, evaluation and troubleshooting/debugging of the programmes and systems. These will be covered in greater detail in later chapters.
2 | P a g e
I would like to take this opportunity to thanks my project supervisor, Dr. Tan Bee Koon for his patience, guidance, motivation, and utmost support towards completion of the FYP project. Dr. Tan has guided me towards obtaining the solution consistently so that I am able to complete my project on time with the tight schedule. He is a tremendously good supervisor who exhibits his extensive cares, experiences, disciplines and guidance towards his project students. Additionally, I would like to thanks him with appreciation for his extensive help to drive me around Singapore landmarks to test the functionally of the applications.
Similarly, I would like to thanks my school mates in Unisim for their morale support and encouragement. I have grown my learning experiences with them during the schooling time.
And they had made my stay in school a pleasant and meaningful one.
Special thanks to Mr. Hanafi from Advance Micro Pte Ltd for the advice on the HTML program code. And thanks to my friend, Shawn for sharing his GPS data.
Last but not least, I would like to show my deepest thankfulness to my family and loved ones, who have shown me their concern and full support.
3 | P a g e
Page
ABSTRACT ……………………………………………………………………………………………. 2
ACKNOWLEDGEMENTS …………………………………………………………………………….
3
CHAPTER ONE ………………………………………………………………………………………... 8
1 INTRODUCTION
1.1 Overview of background
1.2 Project objective
1.3 Over all Objectives
1.3.1 GPS Technology
1.3.2 Selection of hardware Devices
1.3.3 Selection of Programming Language
1.4 Propose method to employed
1.5 Skill Review
8
8
8
8
9
9
10
10
1.6 Layout of Project Report 10
CHAPTE R TWO ……………………………………………………………………………………….. 12
2 PROJECT MANAGEMENT
2.1 Project Planning
2.2 Project Management
2.3 Project Risk Management
12
12
13
2.4 Cost Management 13
CHAPTER THREE …………………………………………………………………………………….. 14
3 REVIEW OF LITERATURE
3.1 Review of Global Positioning System (GPS) Technology
3.2 What is GPS?
3.3 Elements of GPS
14
14
15
4 | P a g e
3.4 How GPS Functions
3.5 Concepts and Principles used in GPS Technology
3.6 What is a Server
15
17
17
CHAPTER FOUR ………………………………………………………………………………………. 18
4 SYSTEM DEVELOPMENT
4.1 System Overview
4.2 System Architecture
18
20
CHAPTER FIVE ………………………………………………………………………………………... 21
5 SYSTEM DESIGN CONSIDERATIONS
5.1 National Marine Electronics Association (NMEA)
5.2 Geographic Coordinate System (GCS)
5.2.1 Latitude
5.2.2 Longitude
21
22
22
22
5.3 GPS Coordinate Format
5.3.1 Decimal Degrees
5.3.2 Degrees Decimal Minutes
5.3.3 Degrees, minutes and second
23
23
23
23
5.4 Factor affecting GPS Accuracy
5.4.1 User Equivalent Rang Error (UERE)
5.4.2 Signal Arrival Time Measurement
5.4.3 Atmospherics Effect
5.4.3 Mulitpath Error 24
CHAPTER SIX ………………………………………………………………………………………….. 26
24
24
24
24
6 SOFTWARE DEVELOPMENT
6.1 GPS Webpage
6.2 Software Implementation
6.2.1 DynDns Setting
6.2.2 GpsGate Setting
26
26
30
31
6.3 HTML coding
6.3.1 Function Initialize()
6.3.2 Function Show Max zoom(Latlng)
32
32
32
5 | P a g e
6.3.3 Function createMarker(point,time,lat,lng,speed)
6.3.4 Process_GPS_logfile = function(doc)
32
32
CHAPTER SEVEN …………………………………………………………………………………….. 33
7 SYSTEM TESTINGS AND RESULTS
7.1 Functional Testing
7.1.1 Test case 1: GPS tracking and logging functionality
7.1.2 Test case 2: Map Plotting function
33
33
34
CHAPTER EIGHT ……………………………………………………………………………………… 35
8 PROBLEMS AND DISCUSSIONS
8.1 Server unable to host from Laptop
8.2 GPS receiver was unable to sent data to server
8.3 Accuracy of GPS data
8.4 Map was unable to activate on webpage
8.5 Battery Life of Laptop 35
CHAPTER NINE ……………………………………………………………………………………….. 36
9 CONCLUSIONS AND RECOMMENDATIONS
35
35
35
35
9.1 Conclusions
9.2 Recommendations and Future Work
36
36
CHAPTER TEN ………………………………………………………………………………………… 37
10 CRITICAL REVIEWS AND REFLECTIONS
REFERENCES …………………………………………………………………………………………. 39
APPENDIX A ………………………………………………………………………………………….... 42
Specifications of GPS Bluetooth Receiver, Holux M-1200
APPENDIX B ………………………………………………………………………………………….... 43
Appendix B-1 Gantt Chart 43
APPENDIX C ………………………………………………………………………………………….... 44
Full program source code
6 | P a g e
Appendix C-1 FV4958Z.php …………………………………………………………... 44
APPENDIX D …………………………………………………………………………………………… 50
Testing results
Appendix D-1 Journey from Changi Airport to SIM University …………………………………… 50
7 | P a g e
1.1 Overview of Background
Every year new technology keeps emerging and taking over older technology. One such example is the GPS system. Do you remember the days of using street directory to locate our destination or using map and compass to locate current location? Both method required basic map reading and planning which consume time and effort. Ever since GPS have been invented life have been a breeze for travelling and over the time GPS is slowly been integrated to our life.
GPS is being employed in navigation to aids us in arriving our destination and locating our current location. A common application is the vehicle tracking system where a GPS tracking device is installed in a vehicle to allow other to know it current location.
1.2 Project Objective
The aim of this project is to provide a one stop solution for enterprises such as logistics or dispatch company to easily keep track of vehicle under their control as to maintain cost reduction. Through tracking of their personal fleet of vehicles travelling data, they will be able to determine whether the drivers are travelling using the optimal route.
Data can also be kept for further analysis to reduce fleets’ fuel usage, improve fleet productivity, enhance customer service, and identify problems such as excessive idling, inaccurate timesheets, unauthorized stops, and personal vehicle use.
1.3 Overall Objective
The overall objective is to look into and explore the usage of GPS system based on the past history and development of GPS. How much have GPS improve and translate to current state that is being relies on by many roads user to determine location.
GPS vehicle tracking system now commonly used to determine current location of the vehicle can help reduce fleets’ fuel usage, improve fleet productivity, enhance customer service, and identify problems such as excessive idling, inaccurate timesheets, unauthorized stops, and personal vehicle use.
1.3.1 GPS Technology
The most important factor in GPS tracking, the ability to accuracy retrieves data and saving it and reviews it. There is a need to know the GPS infrastructure layouts, limitations, and communication protocol. Research will need to be conduct in order to fully implement flawless data extraction and viewing .We need to understand the type of methods used for the
GPS technology and the problem which would affect the performance of the GPS tracker receiving of satellite signal. More detailed information will be covered in Chapter 2.
1.3.2 Selection of Hardware Devices
The role of the GPS receiver is to detect 4 or more satellites, calculate the distance to each and use this information to deduce its own location. The GPS receiver device used in this project is M-1200 from HOLUX Technology Inc. as shown in Figure 1.1. It is Bluetooth enabled and connects wirelessly with other devices such as laptop or Personal Digital
Assistance (PDA) through the Bluetooth interface. The specifications of the GPS receiver can be obtained from Appendix A.
8 | P a g e
Figure 1.1: Picture of GPS receiver
For displaying of GPS data, we require a SMS receiver and data plan that interface with the computer in order to capture all GPS information via SMS. Once that information is captured on the computer, plotting of map is allowed on the waypoints travelled by the GPS tracker by the vehicle. For SMS receiver, mobile broadband adaptor, Model: E1550 from HUAWEI is being selected. It is compact with size of 11.5mm (H) x 87.5mm (L) x 26.0mm (W) and easily installed with USB plug and play interface. Moreover, it supports 3.5G network using mobile
SIM card for ease of fast transmitting rate for SMS. For more detailed specification of the tracker, refer to Appendix A.
Figure 1.2: Picture of Mobile Adapter
1.3.3 Selection of Programming Language
Although there are various choices of programming language such as C#, C++, Java, Open
GL and Google Map API, Google API and HTML is chosen for the project. The reason being,
HTML and Google API will be able to display map and the location on the internet and lots of freeware and coaching is easily available on the world wide net. This will shorten the time needed to meet the tight schedule for the implementation, as we can study and learn from the previous students’ programming codes in order to improve on the functionality.
1.4 Propose method to employed
To create a GPS server system, a basic understanding of the system would be required
.Therefore purchasing of a GPS tracker would greatly helps. Using the GPS tracker to track and sent the location data that is required to be store and be able to view on a map showing how the vehicles travel. It is also important that the data is easily available to access from any computer.
Verify of the tracker will be conducting a serials of trial that by travel along Singapore express way using a motorcycle to simulate a vehicles travelling. The coordinates of location would then be sending through the tracker to be log down.
9 | P a g e
A program would be created to display the coordinate on a GUI, which the vehicles ID, speed, coordinate and time taken would be display. The program is also required to show past travelling history on the map.
1.5 Skill Review
GPS receiver communications is defined by the National Electronics Association (NMEA) standards. Understanding the NMEA standard and lines of data format use during sending of data would be of top most essential.
The choice of program language has to been chosen as the project required 2 different type of programming. One for the GUI design to display and mapping of the GPS data and another would be to create a data base and if possible creating a webpage to assess the data.
Programming skill like visual basic, C#, C++, java, open GL and Google Map API are some examples that may require mastering to run an application to interface between server, GPS receiver and GUI. These skills can be attaining through various source like library, internet or books. Hands-on training of the chosen programming will allow developer to choose the most suitable software to achieve this project requirement.
1.6 Layout of Project Report
Chapter 1 : - Introduction: it gives a summary of the project objectives, hardware and software, application and project scope. Further detail on individual component will be explained in the later chapters.
Chapter 2 : - Project management: it gives information on problem which would be faced during the project development stage. Therefore, earlier prevention plan plays an important part of the project.
Chapter 3 : - Literature review: This chapter covered researches of background on
GPS and HTML technology. Concepts, principles and application used for GPS are also being covered in this chapter.
Chapter 4 : - System Integration: Breakdown of GPS Data system which plans the project process flow towards meeting the requirements of the project.
Chapter 5 : - Highlight of the problems faced for System Design which aided in the prevention of the software implementation.
Chapter 6 : - Software developments with explanation of each of the functions and flowchart for further illustration for GPS tracking system.
Chapter 7 : - Testing and evaluation methods which show the results of the functionality of GPS tracking system.
10 | P a g e
Chapter 8 : - Problems which encountered during the process of development for GPS tracking system and solutions used to fix the issues.
Chapter 9 : - Conclusion on what is done and achievement. Recommendations are included which provides some suggestions to improve and enhance on the project.
Chapter 10 : - Reflections on the development of the project. Essentially, the experience and knowledge learnt from the process of project development.
11 | P a g e
2.1 Project Planning
2
The work breakdown structure of the GPS server project is shown in figure 2.1, which helps in defining and grouping similar work elements together and provide the overall picture of the total work scope for the project.
2.2 Project Management
Figure 2.1
A Gantt chart provides an overall picture of the future activities planning of the project that is being segregated into 2 phase. Different activities will be break down to smaller segment to aid in better time management with the ability to focus and monitor the process of the project.
The first phase is the Planning phase, all expected activities is being listed and plan in according for the completion of the project. The time allocated to the different activities difference according to confidence and difficulties that may encounter during the project.
Therefore more time will naturally be allocated to the programming as it required more time to perform and in case of encountering unexpected technical issues.
The second phase is the monitoring phase, it is used to ensure the project is moving smoothly according to the plan and if a specify activities is taking more time than expected does it require assist to proceed the project .
12 | P a g e
Gantt chart in Appendix 2 was created for this project. Research &Analysis is to start the project by check whether is it feasible to produce. Literature Search is to understand the background of the Project. Familiarization of the software is to understand and choose the preferred software coding. Developing the software will using the most time due to the complexity of the programming and in anticipation of issue will appear therefore time is needed to fix any technical issue encounter along the way. Lastly the completed software will then be going through a serial of test run to ensure no major bug is encounter. Evaluations will always be check against to gauge whether any further improve is required.
2.3 Project Risk Management
There are four stages to risk management planning. They are as follows:
Risk Identification – Identifying what is the cause and impact.
Risks Quantification – Marking out what is the probability that the risk will happen and what is the impact to it.
Risk Response – Finding ways to avoid, reducing the impact and accepting the risk. There is no point to ponder over it.
Risk Monitoring and Control – Regularly checking status on the outstanding action to the risk and identifying new risk which might occur.
2.4 Cost Management
In order to keep the cost of the project as low as possible, careful tracking of expenditure is required for the whole project. This is because implementing a low cost GPS vehicle server is needed. In addition, the claim for the project is kept at S$100. Further information of the bill of material is summarized in Appendix B.
13 | P a g e
3.1 Review of Global Positioning system (GPS) Technology
In the past our ancestors has to erected monumental landmarks which wasted labor and time, draw laboriously drafted detailed maps for others to use and they also learned to read the stars in the night sky to prevent themselves from getting lost at night when there is no streetlight.
The first satellite navigation system called Transit used a constellation of five satellites that orbits around the earth it makes use of the Doppler Effect to pinpoint the location on Earth but can only provide navigation only once per hour was created by the United State Navy in
1960. During the same time the united state air force also created a radio-navigation system called MOSAIC (Mobile System for Accurate ICBM Control). Both the navy and the air force have created a serial of improvement to their system the following years. But in 1973 both navy and air force navigation was integrated after a meeting at the pentagon which created Defence Navigation Satellites System (DNSS) and within the year it was renamed
NAVSTAR-GPS. It was this milestone that eventually created the GPS we are using now.
3.2 What is GPS?
Global Positioning System (GPS) is a constellation of 24 satellites that orbit around the Earth at about 20,200 km, which makes two complete rotations a day. The current location, time and velocity are determined by a GPS receiver that acquires radio signals transmitted from the satellites.
Figure 1: GPS space segment with 24 GPS satellites
[http://en.wikipedia.org/wiki/File:ConstellationGPS.gif]
14 | P a g e
From the picture above we can see that the GPS space segment there is 24 GPS satellites are separated into 6 orbits having 4 satellites in each. Within each orbit, the four satellites are evenly spaced. So at any point of time the GPS receiver will be able to receive information from the satellites
3.3 Elements of GPS
GPS consist of 3 different segment; the space, control and user segment
The user segment consists of receivers that are able to detect, decode and process GPS satellite signals. The receiver has to locate at least four or more satellites in view acquire signals from satellites then it can carry out propagation time measurements to calculate location and speed of the user
The ground segment consists of monitor stations and a master control station, which monitor and control the satellites. The monitor stations receive data such as orbits, altitude, location, and speed from the satellites and send this data to the master control station, where it corrects the orbital and clock information known as ephemeris data, and update the satellites via ground antennas. This also ensures that they orbit within limits.
The space segment consists of satellites powered by solar cells that constantly adjust the solar panels toward the sun and the antennas toward Earth. Each satellite is equipped with atomic clocks that synchronizes and measures time accurately. On each orbital plane, a minimum of four satellites are placed to allow visibility on Earth at any location and time for 3dimensional positioning.
3.4 How GPS Function?
A GPS receiver calculates its position by precisely timing the signals sent by GPS satellites high above the Earth. Each satellite continually transmits messages that include ephemeris data, almanac data and the time the message was transmitted
Ephemeris data provide the exact location data and health of each satellite which will be used by the GPS receiver to calculate their own location from earth.
15 | P a g e
Almanac data consist of coarse orbit and status information such as current time and date of each individual satellite in the constellation. It is used to identify satellites that are nearby for acquisition of GPS signals.
The receiver utilizes the messages it receives to determine the transit time of each message and computes the distances to each satellite. These distances along with the satellites locations are used with the possible aid of trilateration, depending on which algorithm is used, to compute the position of the receiver. This position is then displayed, perhaps with a moving map display or latitude and longitude; elevation information may be included. Many GPS units show derived information such as direction and speed, calculated from position changes.
Figure2: How GPS find it location? http://www.aero.org/education/primers/gps/images/5steps-illustration.jpg
3.5 Applications of GPS
GPS has a variety of applications on land, sea and air. It can be used everywhere except inside buildings, in caves as well as subterranean locations and underwater.
16 | P a g e
GPS was developed for military use to aid in missiles and projectile aiming .Most missile are equipped with GPS receiver, once the exact location of the target is acquired and loaded into the software, the missile with the embedded receiver is launched towards the target. In us army force soldiers used GPS to find objectives or target even in the dark or in unfamiliar territory to coordinate troop and supply movement.
GPS is engaged in fleet vehicles, public transportation systems, delivery trucks and courier services for monitoring locations at all times for both efficiency and driver safety. For cargo management, stolen shipments can be located and the shipper has the ability to report delivery time accurately, thus enhancing customer service.
Police cars, fire trucks and ambulances can be tracked and deployed to the nearest emergency, enabling quick response in critical situations. Public transportation systems are able to make use of GPS coupled with GSM network to report the location of the vehicle back to a centralized headquarter and allows the accurate prediction of the arrival time to commuters.
3.6 What is a Server?
A server provides essential service across a network which is either software or a series of computers that link other computers or electronic devices together. Only permitted users within a large organization can access them or for public users access via the Internet. Server can have dedicated functionality such as web servers, print servers and database servers.
Web Servers
File sharing is simple example. While the existence of files on a machine does not classify it as a server but when there is a mechanism which shares these files to other user through accessing it with other application or system is become a server unit. Applications that support a server system include switches, routers, and gateways.
Database Servers
Laptop and desktop can also be created to be a server when web server software run on it such as multiplatform “Apache HTTP server” under such situation to allow other to download or
17 | P a g e
upload file to it memory consider as a web server application. “Rapidshare” operated as a file sharing software where people sharing of file within the internet.
Print Servers
Computer is connected to one or more printers within a network normally using a Lan connector which allocated printing of document from other computers and sends the jobs to the appropriate printers.
18 | P a g e
4.1 system overview
NMEA FILE
The System level diagram of the GPS data server system is shown above. The system consists of a Bluetooth holux1200 receiver which will be sent coordinate in NMEA format to the laptop via Bluetooth interface.
The laptop will act as a data server equip with internal SIM card connected to internet. Data
Coordinates received from the GPS receiver will be saved in folder respectively and reconfigures of data reading and data required for plotting will be done by the server. The data will then be plot on the Google map.
Permitted user will be able to access the webpage http://doylegps.dyndns.org to view the plotted Map showing or indicating the location of the vehicles travel route.
19 | P a g e
4.2 system architecture
Information
Bluetooth interface module
Various format of data
Data Server
Data saving
Data Analysis
Coordinates Conversion
Mapping of
Coordination
Webpage
Uploading of Mapping
End User access
The system Architecture frameworks of the GPS tracking applications consist of 3 main modules. Information module is used to configure and open the laptops serial communication port which is port 21 to interact with the Bluetooth enable GPS receiver to receive data to the server and data also can be received from thumb drive and save at the same location.
After analysis of data format, we may find that data may consist of information not required and we need to filter the data to ensure that only relevant data is been obtain. The filter data will then be read from the system to been used for map plotting.
Data received will have the longitudes and latitudes formats in degree minute second.
Conversion is required to turn the format into degree where it is the format readable by the
Google JavaScript API.
After converting the data correctly, Webpage will be able to display the plotted map when end user interfaces with the data associated by clicking on data file. User will also be able to check whether the data is correct as pop up will trigger for a respond.
20 | P a g e
5.1 National Marine Electronics Association (NMEA)
NMEA is a communication standard under controlled by US based National Marine
Electronic Association. NMEA is used extensively for communication between marine electronic devices consists of electrical and data specification normally used sonar, gyrocompass and GPS receiver.
The NMEA standard uses a simple ASCLL, serial communication protocol that easily define the data in a sentence that is transmittable to several listeners.
From the example above,
-
-
$ is used to indicate the start of the sentence.
GPRMC can define as GP stands for GPS under the talker ID and next 3 letter RMC stands
for Recommended Minimum specify GPS/Transit data.
081836 stands for time receive under UTC. A indicate the receiver is receive signal in good condition or a letter “V” indicate otherwise.
-
-
-
-
3751.65, S stands for longitude received and 14507.36, E stands for latitude received.
000.5 speeds in knots.130998 is the date in day month year format.
011.3, E indicate Magnetic variation 11.3 deg east,
*62 is a checksum compare
21 | P a g e
5.2 Geographic Coordinate System (GCS)
Figure 5.2
(http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ opt/csb3022a.htm)
Geographic Coordinate System is a system that determines every location on earth to be represented by a set of numbers. 3 position such as vertical, horizontal and elevation is a common choice of coordinates
5.2.1 Latitude
Latitude of a location on the earth is the angular distance with positive value going northwards and negative values going southwards of the location on the equator. The latitude is an angle and is usually measure in degree. Lines which join all the points with same latitude are called parallels as they run parallel to the equator.
5.2.2 Longitude
Longitude is a geographic coordinates that specific the east with positive values and to west with negative values along Prime Meridian of a zero point on the earth surface at England.
Lines of Longitude, called meridians, run perpendicular to lines of latitude and pass through both North and South poles
22 | P a g e
5.3 GPS Coordinate Format
Data received from GPS receiver indicating location can be one of the several formats that is usually being use.
All degree formats of the coordinate is always the left-most whole number.
Example: 12° 20' 44" N
12 is the degree
Imagine a sphere being dividing into 4 parts. North and east parts give u a positive sign where south and west produce negative sign
Longitude: 180, W = -180 & 180, E = 180 Latitude: 180, S =-180 & 180, N =180
20 are Minutes for the above example. Minutes are an optional component. If there are no minutes component the degree will be the precision coordinates and there will be no seconds’ components.
44 are the seconds for the coordinate. Seconds will be only available if there is a minute component exists. To convert seconds to minutes is equal to 44/60 give u 0.736
5.3.1 Decimal degrees with negative numbers for south and west
Example: 12.3456, -98.7654
First will be latitude and then followed by longitude. Negative will be place if the coordinate are in the south or west respectively. This is also the format I would be using in my system as value is easy to read and understand.
5.3.2 Degrees and decimal minutes with N, S, E or W suffix for North, South, East, West
Example: 12° 20.736
′ N, 98° 45.924
′ W or N 12° 20.736
′ , W 98° 45.924
′
First will be latitude and then followed by longitude. Degree decimal minutes above are commonly used in electronic navigation such as GPS tracking and car navigational system.
To converts degrees decimal to degree format: 12° 20.736
′ N
1.
The integer number of degrees is the same (12)
2.
The decimal degrees is the decimal minutes / 60 (20.736/60 = 0.3456)
3.
Add the two together (12+0.3456=12.3456)
4.
Negate the value if it is South or West (in this case, North, so 12.3456)
5.3.3 Degrees, minutes and seconds with N, S, E or W suffix for North, South, East,
West
Example: 12° 20' 44" N, 98° 45' 55" W or N 12° 20' 44", W 98° 45' 55"
Degrees Minutes Second formats is common standard used to indicate location on maps.
23 | P a g e
To convert degrees, minutes seconds format to degree format, it is required to convert to degree minute first then from then convert to degree format.
To converts degrees decimal to degree format: 12° 20' 44" N
Calculate the total number of seconds, 20
′ 44 ″ = (20*60 + 44) = 1244 seconds.
The fractional part is total number of seconds divided by 3600. 1244 / 3600 =
~0.3456
Add fractional degrees to whole degrees to produce the final result: 12 +
0.3456 =12.3456
5.4 Factors affecting GPS Accuracy
Accuracy is very important to all GPS application as many of the decisions involve precise report of coordinates. Without accuracy travelling using GPS navigation will be unreliable or even dangerous .For example cars having travel in wrong lane against traffic or doing a misleading turning which incurred more travelling time. There are several factors that will contribute to accuracy of the GPS.
5.4.1 User Equivalent Rang Error (UERE)
User Equivalent Rang Error refers to the error of a component in the distance from the receiver to a satellite. In the past civilian GPS position fixes at typically accurate to 15 meters.
However, with advancement of newer technology the average accurate is reduce to 5 meter under a clear weather
5.4.2 Signal Arrival Time Measurement
The position calculated by a GPS receiver requires the current time, the position of the satellite and the measured delay of the received signal. The position accuracy is primarily dependent on the satellite position and signal delay.
To measure the delay, the receiver compares the bit sequence received from the satellite with an internally generated version. By comparing the rising and trailing edges of the bit transitions, modern electronics can measure signal offset to within about one percent of a bit pulse width,
5.4.3 Atmospherics Effect
GPS signal from the satellites will pass through Earth’s atmosphere, which are made up of several different density layers Resulting signal being affected by dispersion within ionosphere and humidity delays at troposphere causing delay to GPS receiver.
Different altitude will casing signal delay as the signal will pass through more of the atmosphere at higher elevations
5.4.4 Multipath error
24 | P a g e
Multipath error only occur when the GPS signal being reflected off by terrain, tall building ,high landscape and huge object causing delay in transmitting the signal.
Thus a slight delay in the signal will cause inaccuracy in positioning. Varieties of techniques have been produce or develop to reduce effect of multiple errors.
For long delay multipath a narrow correlator spacing was develop to recognize the signal and discard it to prevent the GPS to receive the signal. For shorter multipath signal as harder to filter as they usually mixed with the real signal. Choke ring antenna notable for the ability to reject multipath signal maybe used to reduce the signal power to prevent short multipath signal interface with the real signal.
Multipath effects are much less severe in moving vehicles. When the GPS antenna is moving, the false solutions using reflected signals quickly fail to converge and only the direct signals result in stable solutions.
25 | P a g e
6.1GPS Webpage
The overall flowchart of the GPS data server is shown in figure 6.1.
Start
GPS Tracker searches for satellites signal
No
GPS Tracker engaged with satellites
Yes
GPS Tracker starts to send
$GPRMC DATA with current location at every 1s to 60s as per setting interval
Server received data stored in folder
Monitor User click selection button in
Webpage
Mapping plotting in webpage
Data converted to text format
End
Figure 6.1: Flowchart of GPS Server
26 | P a g e
Select Data to access various vehicle data
Basic introduction of the project
Overall objective of the project
Display of source code
Select vehicle plate to access
There is several buttons for user to access. Introduction will provide a simple introduction on
GPS server. Overall Objective will also provide user a brief objective on the Server project.
C# program will display the basic program that was been used in this project, user can also understand more on how the project are being derived from. Data is where user is able to access the GPS location data of each individual vehicle that has been track.
27 | P a g e
Click on file to bring up data format
Click ok after verify data is running good
Example from, Access data vehicle FV4958Z, we see that the Route file is place at the left hand side of the webpage. File is categorized by date and time. Upon clicking the data a pop up window will show the data that is going to display. If the data is unreadable or data missing the pop up window will be blank. If data is good and user will have to click ok button to carry on to the mapping of the data
28 | P a g e
Point is plotted on map with the given longitude and
From the picture above, the map is being plotted with the data from “Log 2011-04latitude data
17_132427.nmea” is successfully plotted. User can simply click on Data on the above tab to check a different vehicle or click route file on the left for a different time slot.
6.2 Software Implementation
The Program source code can be retrieved in the Appendix C. The following section will explained the implantation of each function in more detail.
29 | P a g e
6.2.1 DynDns Setting
DynDns is used to when IP address for computer that regularly changing IP address. IP address is needed when the computer is hosting the data Server. If IP address regularly changing is due to ISP (Internet service Provider). As user can only access the host webpage through IP address
From the figure, shown a typical sample setting of the DynDns program. The only variable that changes will only be the IP but the program will link up the IP address to the domain name. Domain Name system is required as it help to assign domain name like http:// doyledyndns.org to user as it is easy to remember rather user have to remember IP address to access.
30 | P a g e
6.2.3 GpsGate Setting
Gpsgate is used to communicate the GPS receiver to provide data to collect
.
At the input tab ,GpsGate will try to communication with GPS receiver Holux 1200 once connection is establish the icon will turn green and system will also sent confirmation to the
GpsGate. Output tab enable user to set setting to type of file to receive and multiple file receiving is possible
31 | P a g e
NMEA Filter figure above show that setting provided. Command filter will be set to
$GPRMC as this will be our primary file type to receive, time interval in sec will be set at 30 sec to ensure at accuracy reading.
6.3 Html coding
6.3.1 Function initialize ()
Function initialize () is used to plot the map on the webpage allow user to view it. Where the longitude and latitude is use to position the map centres on webpage.
6.3.2 function showMaxZoom(latlng)
Allow user to have the Maximum possible zoom into map
6.3.3 function createMarker(point,time,lat,lng,speed)
To create marker window that appear on the top on the marker after clicking on it. With the information such as point, time, lat, long and speed.
6.3.4 process_GPS_logfile = function(doc)
To read doc file that end with .txt or nmea. After reading the file it will read data as per string.
Only data starting with $GPRMC will be taken into consideration, timing variable will be used if the data consist of too many data to reduce the server load as to reduce the plotting.
The nmea file data are separated by commas so Parts [] indicate which data are read from.
Time will be taken from part 0 as they belong to the first data. Latitude and longitude will require conversion to degree mode as they come in the format of degree minutes. String of longitude will separated into 2 parts. Turning the minutes to substring and divide by 60. After finish the computation the string will then be added together to provide the final degree data.
Speed data will be check whether the vehicle moving and data speed is in knot so data have to be multiply 1.852 to covert in KM/hr.
Doyletest is included to create the initial pop up for user to identify the longitude and latitude to check whether the data is being read correctly.
32 | P a g e
This chapter will discuss the actual implementation and the results of the various scenarios conduct to test the functionality of the system. The actual setup and implementation of the
GPS tracking system in a vehicle is shown in figure 7.1
7.1 Functional Testing
The Data server will be subjected to test to check whether all system is able to work. A few test cases will be defined and tested against with. The collected result will be verified and compared with the expected outcome. If there is any error or unsatisfied result from the field test, the program will reanalysed to rectify any software issue. Testing will be repeating until results are proved to be satisfactory.
7.1.1 Test case 1. GPS tracking and logging functionality
The purpose of test case 1 is to check whether the server is able to received GPS coordinate from the Holux 1200 and location data are able to be save for viewing on the map.
Server computer is able to connect to Holux 1200 from Bluetooth connection. Data is streaming into the folder path//GPSlog.
GPRMC Time Longitude and latitude date
Figure 7.1: Sample GPRMC files data received and folder file
33 | P a g e
7.1.2 Test Case 2: Map plotting function
The objective of the test case 2 is to validate check that data just collected will be able to plot on to map. The user will click on the “date” button on webpage to execute the Google Map to display the location of the vehicle travel. The Google Map was examined to ensure that the location is displayed with the marker placed accurately. The marker will also be clicked to check if the coordinate’s information was populated properly in the popup window. The location will be verified with the data stored in the log file. To ensure the GPS data server is capable of providing high quality and performance of the GPS server data. We travel from
Changi airport to Unisim via AYE, the system is able to pass the basic functional test.
Figure 7.2: route taken for full system functional trial
34 | P a g e
During the course of development, many issues were encountered. However with effort spent on research problems were overcomes. 5 main issues were identified and step to rectify from issue will be discussed in detail.
8.1 Server unable to host from Laptop
The first issue encounter is the server was unable to host. By using on another computer was unable to download file from the server. After going through on apache website found that the port number has to set at port 80 as a port was required to host. After fixing up the port issue the same issue return this time was the found out that the IP address have change. Therefore to keep the IP address changing on check software DynDns was install to keep track of the frequent IP address.
8.2 GPS receiver was unable to sent data to server
GPS receiver Holux 1200 was to be only communicating using blue tooth. It comes with software that allow user to view how many satellite it has connected with and the current location. But Data was unable to extract to use it on plotting on map and safekeeping. After researching found that a special version of USB cable it required to collect data from the receiver but due to the cost another method have to source. Eventually came to a software called GPSgate that allow communicating with Bluetooth receiver and download data in several formats such as GPRMC was required.
8.3 Map was unable to activate on webpage
Map was unusable as the space was empty and Google map was giving error. After checking through the Google API forum was found that I need to apply a set of API key and register the webpage used. After apply the key and register the webpage the map is able to use.
8.4 Data received is too large amount of the plotting
During the field test, data was set to receive every 1 sec, with the huge amount of data plotting take a long time causing the server to slow down. After having the issue, data to be received is reducing to 30 sec. Filtering of data was used to avoid cluttering of point on the map.
8.5 Battery life of laptop
Laptop battery life dwindles as the age of the laptop is 3 years. Battery life of the lap top is only 2 hour after fully charge. Therefore purchase a cigarette adapter for the field test will provide a constant power to the laptop.
35 | P a g e
9.1 Conclusions
There are many GPS data servers available in the market. However, this project manages to prove that GPS data server is able to produce similar result at a faction of the cost. The cost of the GPS data server is $0. Reason for the zero costs falls primary that the Holux 1200 used is bought by previous student.
The GPS data server is able to keep track of the vehicle location and plot the travelled route on the map with detail like time, speed, latitude and longitude as long the data receive include those. Data is also able to save within each allocated folder and access to everyone that needs the data via the internet.
With extensively field testing after debugging and evaluation, the GPS data server has fulfil the requirements of the accessible to access the vehicles travel logs. However, there exists room for improvements on the project, which could further enhance by the next student taking over the project.
9.2 Recommendations of future works
Currently, data received is sent by email then is updated to server, which required manual entering if the data can be extracted automated and sent to the server precious time can be save.
Map plotting on the data server is based on per day data received from user. If the server is able to handler data from user as per string it can perform service such as provide live updates travel position and geo-fencing security, but will incurred higher cost as data maybe send via
SMS over the current application of Bluetooth.
36 | P a g e
The initial step to getting the project started was to do an extensive research on GPS technology, what is a GPS, how does it work and the principle and concepts around it. I have to understand the technology involves and type of data that I will be receiving in order to build a data server on it. Next I also looking at type of server I need to facilitate the project so as to produce a low cost GPS data server.
In order to proceed, I have to decide on what servers do I need to create. Eventually I split within the choice having server computer or web server. Secondly how to successful create a webpage using HTML where I have no experience in. Coming from Basic C programming back ground enable me to learn the HTML language within a short period. Lots of information can be found for the internet such as live example or solution sample improve my learning curve leap and bounds. Books from the public library also provide another source for enrichment to different ideas for me to design my webpage.
The next obstacle was to familiarise myself with Google API for the plotting of point checker.
As Google API is using JavaScript, I have a hard time understanding and applying. But with time spent on Google map forum, I was able to research data to my usage and manage to overcome it.
My first milestone was met when I am able to upload data from my computer and able to download the data which is the GPS file from another computer with application such as apache and DynDns supporting my laptop as server.
Second milestone is to create a web page that incorporated Google API within my webpage.
The most problematic error was encounter on the display of the map on the webpage due to passkey issue and display Singapore as the main island.
Next milestone is to use collected data to plot on the map indicating the place the vehicle has gone through. Issue encountered is not able to plot the map as the webpage and Google API are unable to understand data. Finally after rearranging incoming data format and changing setting, the html is able to display data which allow GoogleMap API JavaScript plot the point correctly.
Final milestone is to incorporate an auto update of the server for data file received. Previously data has to be manually uploaded and update the server script when a new file received. After doing research on the function of the auto update, a .php file format has to be use first. So I
37 | P a g e
need to turn the server into a PHP enable server and install freeware such as UNISERVER to smoothly run the data server under PHP.
The completion of this project would never happen if not for Dr Tan. I very grateful to Dr Tan
Bee Koon who help me and guide me as a kind mentor. He is always encouraging me whenever a difficult problem was encountered and as strict teacher, he is always giving feedback wherever he felt that there can be an improvement to be done. I also feel that time management play a big part in the project, common distraction as exam, class test, lesson, work and personal life need to be juggle around properly.
38 | P a g e
[1] Aerospace Corporation (2007) GPS Primer, Elements of GPS http://www.aero.org/education/primers/gps/elements.html
[2] Appleseed, Johnny (1999-2009) The Theory and Practice of GPS http://www.ja-gps.com.au/whatisgps.html#anchor5186443
[3] Article by Darren Griffin, How does the Global Positioning System works? http://www.pocketgpsworld.com/howgpsworks.php
[4] Garmin, What is GPS? http://www8.garmin.com/aboutGPS/
[5] First U.S. Publication in June, 1996 by: Corvallis Microtechnology, Inc,
Introduction to the Global Positioning System for GIS and TRAVERSE http://www.cmtinc.com/gpsbook/
[6] LiveViewGPS (2009) GPS Asset Tracker http://www.liveviewgps.com/gps+asset+tracker.html
[7] Maps-GPS-Info.com, GPS History, How it all started http://www.maps-gps-info.com/gps-history.html
[8] National Space-Based Positioning, Navigation, and Timing Coordination
Office, The Global Positioning System http://www.gps.gov/systems/gps/index.html
[9] Rocky Mountain Tracking (2001-2007), Smart Track GPS Tracking System http://www.rmtracking.com/gpsproducts/smarttrack.html
[10] Smithsonian Institution, How Does GPS Works http://www.nasm.si.edu/gps/work.html
[11] Starcom Systems (2004-2009) Fleet Management
39 | P a g e
http://www.starcomsystems.com/services_fleeta.asp
[12] SunSat Statellite Solution Co., GSM mobile phone tracking system via the
GPS-TRACK satellite network http://www.themobiletracker.com/english/index.html
[13] The Aerospace Corporation, How GPS Works http://www.aero.org/education/primers/gps/howgpsworks.html
[14] Topbits, How GPS Tracking Works http://www.topbits.com/how-gps-tracking-works.html
[15] Wikipedia, the free encyclopedia, Global Positioning Systems http://en.wikipedia.org/wiki/Global_Positioning_System
[16] Wikipedia, the free encyclopedia, GPS Satellite http://en.wikipedia.org/wiki/GPS_satellite
[17] Wikipedia, the free encyclopedia, Compass http://en.wikipedia.org/wiki/Compass
[18] Wikipedia, the free encyclopedia, Sextant http://en.wikipedia.org/wiki/Sextant
[19] Wikipedia, the free encyclopedia, GPS Tracking Device http://en.wikipedia.org/wiki/GPS_tracking_unit
[20] Wikipedia, the free encyclopedia, Trilateration http://en.wikipedia.org/wiki/Trilateration
[21] Wikipedia, the free encyclopedia, GPS tracking unit http://en.wikipedia.org/wiki/GPS_tracking_unit
40 | P a g e
[22] Wikipedia, the free encyclopedia, Trilateration http://en.wikipedia.org/wiki/Trilateration
[23] Geneq inc., GPS – The Error Budget http://www.sxbluegps.com/gps-error-Budget.html#gpsworks
[24] ASCII Control Characters Definition http://www.lammertbies.nl/comm/info/ascii-characters.html#endt
[25] ASCII Table http://www.asciitable.com/
[26] Koobmeei blogspot, Convert Degrees, Minutes, and Second to Decimal
Degrees to.html
http://koobmeej.blogspot.com/2008/08/convert-degrees-minutes-and-seconds-
[27] Sparky Spider's Discoveries blogspo t, Javascript: Convert DMS to DD to.html
http://sparkyspider.blogspot.com/2006/12/javascript-object-convert-from-dms-
[28] Mike Williams (2006 – 2010), Google Maps API Tutorial http://econym.org.uk/gmap/
41 | P a g e
Specifications of GPS Bluetooth Receiver, Holux M-1200
Basic Specification
Size
Weight
Chipset
Channels
Frequency
C/A Code
Update Rate
Antenna Type
Minimum Signal Tracked
Acquisition Time
Reacquisition
Hot Start
Warm Start
Cold Start
Position Accuracy
Built-in patch antenna
-159 dBm
< 0.1 sec (Average)
1 sec
33 sec
36 sec
Non Differential GPS
Position
Velocity
Time
3.0 m CEP without Selective Availability (SA)
0.1 m/sec
0.1 micro-second (Synchronized GPS Time)
Differential GPS (RTCM/EGNOS/WAAS/MSAS)
Position < 2.2 m (Horizontal 95% of time)
< 5 m (Vertical 95% of time)
Bluetooth
Version
68.5 (L) x 23 (W) x 16 (H) mm
30g
MTK MT3318 chipset
32 parallel satellite-tracking channels
L1, 1575.42 MHz
1.023 MHz
1 Hz
Range
Frequency
Modulation
RF Channels
Input Sensitivity
Output Level
Date Output
NMEA Protocol Output
Baud Bit
Parity
Stop Bit
GPGGA
GPGSA
1.2 Compliant. Compatible with Bluetooth devices with
Serial Port Profile (SPP)
Class 2 (up to 10 meters in open space)
2.40 GHz – 2.48 GHz
FHSS/GFSK
79
-85dBm
+2dBm
Version 3.01
8
None
1
1 time/1 sec
1 time/5 sec
42 | P a g e
GPGSV
GPRMC
GPVTG
Dynamic Conditions
Altitude
Velocity
Acceleration
Jerk
Appendix-B Gantt chart
1 time/5 sec
1 time/1 sec
1 time/1 sec
Max 18,000 meters
Max 515 m/sec
Max 4G
Max 20 m/sec
43 | P a g e
Name: Chua Hua Yong ENG499
PI No.: N0705129 CAPSTONE ELECTRONICS PROJECT
<html>
<head>
<title>Doyle GPS Data</title>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="main.css">
<script src="../templates.js" type="text/javascript"></script>
</head>
<body>
<table class="Global" cellpadding="0" cellspacing="2" border="1">
<tr><td height="127" colspan="3">
<!-- ============ Header section ============== -->
<table class="Header" cellspacing="0" border="0"><tr>
<!-- ============ Logo ============== -->
<td style="background: url('header-bg.png') no-repeat;" width="100%" align="left"><div style="display: table; margin-left: 20px; margin-top: 20px;"> </div></td>
</tr></table>
<div style="height: 1px; background: #cfe7cf"><img src="space1x1.gif" width="1" height="1" alt="spacer"></div>
<!-- ============ Navbar Menu ============== -->
<table class="NavBar" cellspacing="0" border="0"><tr><td>
<table class="NavBarMenu" cellspacing="0" border="0"><tr>
<td><a href="index.html">Introduction</a> |</td>
<td><a href="Overall.htm">Overall Objective</a> |</td>
<td><a href="#">C# program</a> |</td>
<td><a href="Datas.htm">Datas</a> |</td>
<td><a href="Maps.htm">Maps</a> |</td>
<td><a href="#">Contact</a></td>
</tr></table>
</td></tr></table>
</td></tr>
<!-- ============ COLUMNS SECTION ============== -->
<!-- ============ Left Column ============== -->
<tr><td class="Left" width="15%" align="center">
<!-- ============ Site Menu ============== -->
<table class="BoxStyle MedFontBold" cellspacing="0">
<tr><td> <!-- spacer --></td></tr>
<tr><td><a href="#">Forum</a></td></tr>
<tr><td><a href="#">Links</a></td></tr>
<tr><td><a href="#">About</a></td></tr>
<tr><td> <!-- spacer --></td></tr>
</table>
<!-- ============ Extra Block below Site Menu ============== -->
<table class="BoxStyle" cellspacing="0"><tr><td style="padding: 20px;">
<p>
<h3>Route Files</h3>
<?php
// open this directory
//setting are here
$myDirectory = opendir("FV4958Z");
}
$url_prefix = '<a href="FV4958ZMaps.php?f=FV4958Z/';
// get each entry while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
// close directory closedir($myDirectory);
// count elements in array
$indexCount = count($dirArray);
// sort 'em sort($dirArray); if ($indexCount > 0 ) { //more than 0 files in directory
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br> for($index=0; $index < $indexCount; $index++) {
$cur_filename = $dirArray[$index];
$cur_parts = explode(".",$cur_filename);
$cur_ext = $cur_parts[sizeof($cur_parts)-1];
}
?>
}
if (substr($cur_filename, 0, 1) != "." && ($cur_ext=="nmea" || $cur_ext=="txt")){ echo $url_prefix . $cur_filename.'">'.$cur_filename.'</a>'; echo "<br >\n";
}
<!-- ============ br tags below are just filler ============== -->
<br>
<br>
ENG499 CAPSTONE PROJECT PROPOSAL 2
</td></tr></table>
</td>
<!-- ============ Content Column (Middle) ============== -->
<td class="Content Padded" width="55%">
<!-- ============ Page Heading ============== -->
<h1 class="HeadingStyle">MAPPING OF DATAS (Collected Data from Holux)</h1>
<!-- ============ Begin Content ============== -->
<p> Plotting of maps
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Maps API Example: Maximum Zoom Levels in Map Types</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAwvyheHUxuV5CvJmiOUHBiRSwL6RAAB41iJEitTOW mg63U4PYnhRzJ5ym-tih3vm8lpAJhexs9S5rqQ" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function initialize() {
if (GBrowserIsCompatible()) {
}
});
}
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(1.336178333,103.84128333), 20);
map.setMapType(G_NORMAL_MAP);
map.setUIToDefault();
GEvent.addListener(map, 'click', function(overlay, latlng) {
showMaxZoom(latlng);
});
}
}
function showMaxZoom(latlng) {
G_SATELLITE_MAP.getMaxZoomAtLatLng(latlng, function(response) {
if (response && response['status'] == G_GEO_SUCCESS) {
alert("The maximum zoom level where satellite imagery is available at this location is: " + response['zoom']);
// Right now this function is not used. Just for future extension.
// User can pass the parameter in URL and below javascript will grab the parameter
// based on that parameter, it will load related text file (Live or History GPS Data).
// Example Got from here --> http: //www.codeproject.com/KB/scripting/GetURLParameters.aspx
ENG499 CAPSTONE PROJECT PROPOSAL 3
function getURLParameters()
{
var sURL = document.URL.toString();
if (sURL.indexOf("?") > 0)
{
var arrParams = sURL.split("?");
var arrURLParams = arrParams[1].split("&");
var arrParamNames = new Array(arrURLParams.length);
var arrParamValues = new Array(arrURLParams.length);
var i = 0;
for (i = 0; i < arrURLParams.length; i++) {
var sParam = arrURLParams[i].split("=");
arrParamNames[i] = sParam[0];
if (sParam[1] != "")
arrParamValues[i] = unescape(sParam[1]);
else
arrParamValues[i] = "";
}
} else {
return "";
}
} return arrParamValues[0]; function plot_route(FileName) { if (GBrowserIsCompatible()) { var gmarkers = []; var markers = []; var realaddress;
// A function to create the marker and set up the event window function createMarker(point,time,lat,lng,speed){ var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() { plot_map.panTo(point); var geocoder = new GClientGeocoder(); geocoder.getLocations(point, function(response){ var place = response.Placemark[0]; realaddress = place.address;}) window.setTimeout(function() { marker.openInfoWindowHtml('<b>Time Stamp: </b>' + time + '<br>' +
'<b>Latitude: </b>' + lat + '<br>' + '<b>Longtitude: </b>' + lng + '<br>' +
<b>Speed: </b>' + speed + '<br>' +
'<b>Address: </b>' + realaddress);}, 1000);
}); return marker;
}
ENG499 CAPSTONE PROJECT PROPOSAL 4
// create the map var plot_map = new GMap2(document.getElementById("map_canvas")); var mgr = new GMarkerManager(plot_map); var customUI = plot_map.getDefaultUI(); customUI.maptypes.hybrid = true; plot_map.setUI(customUI); plot_map.setCenter(new GLatLng(1.336178333,103.84128333), 11);
// === Define the function thats going to process the text file === process_GPS_logfile = function(doc) {
// === split the document into lines === lines = doc.split("\n"); var doyletest = ""; var rawtest = ""; var last_read_time = 0; for (var i=0; i<lines.length; i++) { if (lines[i].length > 1) {
// === split each line into parts separated by "," and use the contents === parts = lines[i].split(","); var time = parts[1];
// if (parts[0]=="$GPRMC" && ((time - last_read_time >=60) || last_read_time == 0)){ last_read_time = time; var lat = parseFloat(parts[3]) + "," + (parts[4]);
//var lng = parseFloat(parts[5]) + "," + (parts[6]);
//var speed = parts[3]; var lat_string = parts[3]; var lng_string = parts[5]; var lat_decimals = parseFloat(lat_string.substring(lat_string.length-7, lat_string.length)) / 60; var lng_decimals = parseFloat(lng_string.substring(lng_string.length-7, lng_string.length) )/60; var lat_int = parseFloat(lat_string.substring(0, lat_string.length-7)) ; var lng_int = parseFloat(lng_string.substring(0, lng_string.length-7) ) ; var lat = lat_int + lat_decimals; var lng = lng_int + lng_decimals; var speed_str = String(parseFloat(parts[7])*1.852); var speed_parts = speed_str.split("."); if ((speed_parts.length>1) && parseFloat(parts[7])>0 ) { var speed_decimal = speed_parts[1]; speed_decimal = speed_decimal.substring(0,1); var speed = speed_parts[0] + "." + speed_decimal + "KM/H";
}else{
} var speed = "0KM/H";
//alert(speed);
//var speed =(parseFloat(parts[7])*1.852) + "KM/H"; var point = new GLatLng(lat,lng);
doyletest += time + " | " + lat + " | " + lng + " | " + speed + "\n";
// create the marker var marker = createMarker(point,time,lat,lng,speed);
ENG499 CAPSTONE PROJECT PROPOSAL 5
}
function start_here(){
}
//]]>
</script>
</head> markers.push(marker);
}
alert(doyletest);
}
} mgr.addMarkers(markers,0,17); mgr.refresh();
}
GDownloadUrl(FileName, process_GPS_logfile);
}else{
} alert("Sorry, the Google Maps API is not compatible with this browser"); var FileName = getURLParameters(); if(FileName != ''){
}else{
} plot_route(FileName); initialize();
<body onload="start_here()" onunload="GUnload()">
<div id="map_canvas" style="width: 800px; height: 520px"></div>
</body>
</html>
<!-- ============ End Content ============== -->
</td>
<!-- ============ Right Column ============== -->
</tr>
<!-- ============ Footer ============== -->
<tr><td colspan="3" class="Footer" style="vertical-align: middle;">
Copyright © Doyle Chua N0705129
</td></tr></table>
</body>
</html>
ENG499 CAPSTONE PROJECT PROPOSAL 6
Data uses for travelling for changi air port to UNISIM
$GPRMC,054133.000,A,0121.6375,N,10359.3746,E,0.55,54.92,170411,,,D*5E
$GPRMC,054204.000,A,0121.6383,N,10359.3744,E,0.49,68.33,170411,,,D*5B
$GPRMC,054235.000,A,0121.6370,N,10359.3731,E,0.10,238.56,170411,,,D*6F
$GPRMC,054305.000,A,0121.6366,N,10359.3732,E,0.10,102.23,170411,,,D*61
$GPRMC,054335.000,A,0121.6367,N,10359.3732,E,0.00,102.23,170411,,,D*62
$GPRMC,054406.000,A,0121.6366,N,10359.3731,E,0.00,102.23,170411,,,D*67
$GPRMC,054436.000,A,0121.6365,N,10359.3730,E,0.00,102.23,170411,,,D*66
$GPRMC,054507.000,A,0121.6364,N,10359.3729,E,0.00,102.23,170411,,,D*6C
$GPRMC,054537.000,A,0121.6365,N,10359.3729,E,0.00,102.23,170411,,,D*6E
$GPRMC,054607.000,A,0121.6365,N,10359.3729,E,0.00,102.23,170411,,,D*6E
$GPRMC,054637.000,A,0121.6364,N,10359.3728,E,0.00,102.23,170411,,,D*6D
$GPRMC,054707.000,A,0121.6362,N,10359.3730,E,0.02,102.23,170411,,,D*62
$GPRMC,054737.000,A,0121.6549,N,10359.3894,E,1.73,105.13,170411,,,D*6C
$GPRMC,054807.000,A,0121.6174,N,10359.4349,E,8.35,195.76,170411,,,D*67
$GPRMC,054836.000,A,0121.5129,N,10359.3472,E,22.94,202.60,170411,,,D*5F
$GPRMC,054909.000,A,0121.2833,N,10359.2513,E,30.04,201.39,170411,,,D*55
$GPRMC,054940.000,A,0121.0158,N,10359.1365,E,33.27,203.97,170411,,,D*5E
ENG499 CAPSTONE PROJECT PROPOSAL 7
$GPRMC,055011.000,A,0120.7283,N,10359.0154,E,37.51,202.36,170411,,,D*5F
$GPRMC,055042.000,A,0120.4103,N,10358.8810,E,39.13,202.99,170411,,,D*5C
$GPRMC,055113.000,A,0120.0998,N,10358.7333,E,40.71,212.79,170411,,,D*57
$GPRMC,055143.000,A,0119.8150,N,10358.5415,E,41.76,214.78,170411,,,D*5C
$GPRMC,055213.000,A,0119.5262,N,10358.3431,E,40.57,211.91,170411,,,D*55
$GPRMC,055244.000,A,0119.2373,N,10358.1456,E,37.43,216.05,170411,,,D*5D
$GPRMC,055314.000,A,0119.0607,N,10357.9005,E,36.51,248.43,170411,,,D*53
$GPRMC,055344.000,A,0118.9326,N,10357.5917,E,41.12,247.79,170411,,,D*5F
$GPRMC,055414.000,A,0118.7991,N,10357.2661,E,44.03,247.63,170411,,,D*52
$GPRMC,055444.000,A,0118.7068,N,10356.9325,E,39.44,268.43,170411,,,D*51
$GPRMC,055514.000,A,0118.6887,N,10356.6054,E,40.02,258.95,170411,,,D*53
$GPRMC,055545.000,A,0118.6025,N,10356.2864,E,35.61,256.14,170411,,,D*58
$GPRMC,055615.000,A,0118.5174,N,10355.9911,E,35.99,254.24,170411,,,D*55
$GPRMC,055645.000,A,0118.4307,N,10355.7171,E,34.94,243.22,170411,,,D*5B
$GPRMC,055716.000,A,0118.3061,N,10355.3948,E,37.99,254.51,170411,,,D*52
$GPRMC,055747.000,A,0118.2109,N,10355.0593,E,42.35,255.37,170411,,,D*54
$GPRMC,055817.000,A,0118.1174,N,10354.7242,E,41.66,254.35,170411,,,D*5C
$GPRMC,055847.000,A,0118.0202,N,10354.3867,E,42.76,254.00,170411,,,D*57
$GPRMC,055917.000,A,0117.9044,N,10354.0553,E,41.97,250.54,170411,,,D*55
$GPRMC,055949.000,A,0117.7690,N,10353.7008,E,46.68,250.05,170411,,,D*57
$GPRMC,060018.000,A,0117.7399,N,10353.3419,E,43.20,272.89,170411,,,D*5D
$GPRMC,060049.000,A,0117.7405,N,10352.9667,E,43.96,267.80,170411,,,D*5B
$GPRMC,060654.000,A,0116.3627,N,10349.9042,E,37.60,301.98,170411,,,D*5F
$GPRMC,060725.000,A,0116.5715,N,10349.6565,E,36.57,307.12,170411,,,D*50
$GPRMC,060755.000,A,0116.6350,N,10349.5595,E,6.15,298.22,170411,,,D*6C
$GPRMC,060825.000,A,0116.6680,N,10349.5027,E,6.67,305.63,170411,,,D*65
$GPRMC,060855.000,A,0116.6884,N,10349.4652,E,3.60,300.01,170411,,,D*6E
$GPRMC,060926.000,A,0116.7025,N,10349.4386,E,4.81,293.11,170411,,,D*67
$GPRMC,060956.000,A,0116.7100,N,10349.4068,E,3.31,275.33,170411,,,D*61
$GPRMC,061026.000,A,0116.7218,N,10349.3723,E,5.22,278.38,170411,,,D*69
$GPRMC,061056.000,A,0116.7252,N,10349.3297,E,4.29,268.35,170411,,,D*6C
$GPRMC,061126.000,A,0116.7265,N,10349.2873,E,7.56,266.72,170411,,,D*69
$GPRMC,061157.000,A,0116.7372,N,10349.2187,E,11.22,274.90,170411,,,D*51
$GPRMC,061227.000,A,0116.7583,N,10349.1592,E,8.17,294.71,170411,,,D*61
$GPRMC,061257.000,A,0116.7949,N,10349.1009,E,7.92,302.46,170411,,,D*63
$GPRMC,061327.000,A,0116.8302,N,10349.0426,E,6.70,298.66,170411,,,D*6A
$GPRMC,061358.000,A,0116.8758,N,10348.9696,E,18.39,300.47,170411,,,D*59
$GPRMC,061428.000,A,0116.9479,N,10348.8496,E,22.44,296.68,170411,,,D*5B
$GPRMC,061459.000,A,0117.0119,N,10348.5826,E,38.79,275.31,170411,,,D*58
$GPRMC,061530.000,A,0117.0352,N,10348.2304,E,40.54,276.20,170411,,,D*54
$GPRMC,061600.000,A,0117.1131,N,10347.9281,E,36.76,306.13,170411,,,D*5D
$GPRMC,061630.000,A,0117.2790,N,10347.6624,E,40.52,301.60,170411,,,D*50
$GPRMC,061700.000,A,0117.4701,N,10347.3863,E,38.49,303.54,170411,,,D*54
ENG499 CAPSTONE PROJECT PROPOSAL 8
$GPRMC,061730.000,A,0117.6776,N,10347.1339,E,39.40,318.62,170411,,,D*54
$GPRMC,061800.000,A,0117.8810,N,10346.9133,E,25.73,298.27,170411,,,D*5D
$GPRMC,061830.000,A,0118.0100,N,10346.6923,E,29.65,301.40,170411,,,D*5C
$GPRMC,061901.000,A,0118.1443,N,10346.4563,E,34.78,292.64,170411,,,D*5B
$GPRMC,061931.000,A,0118.1650,N,10346.2863,E,0.48,260.77,170411,,,D*68
$GPRMC,062001.000,A,0118.1930,N,10346.2604,E,18.54,12.36,170411,,,D*61
$GPRMC,062032.000,A,0118.3347,N,10346.2650,E,25.07,359.32,170411,,,D*58
$GPRMC,062102.000,A,0118.5497,N,10346.2977,E,25.56,12.23,170411,,,D*64
$GPRMC,062132.000,A,0118.7265,N,10346.3276,E,23.90,359.75,170411,,,D*56
$GPRMC,062202.000,A,0118.9514,N,10346.3017,E,29.75,351.15,170411,,,D*53
$GPRMC,062232.000,A,0119.1782,N,10346.2520,E,29.28,344.00,170411,,,D*5C
$GPRMC,062302.000,A,0119.2954,N,10346.2530,E,0.17,53.50,170411,,,D*5E
$GPRMC,062332.000,A,0119.4585,N,10346.3508,E,34.24,42.82,170411,,,D*69
$GPRMC,062402.000,A,0119.6007,N,10346.5369,E,14.99,28.73,170411,,,D*61
$GPRMC,062434.000,A,0119.6984,N,10346.5999,E,27.88,38.16,170411,,,D*61
$GPRMC,062504.000,A,0119.8003,N,10346.6062,E,14.35,301.72,170411,,,D*58
$GPRMC,062534.000,A,0119.8062,N,10346.5784,E,0.22,9.45,170411,,,D*6C
$GPRMC,062604.000,A,0119.8065,N,10346.5783,E,0.00,27.59,170411,,,D*5D
$GPRMC,062634.000,A,0119.8065,N,10346.5785,E,0.01,27.59,170411,,,D*59
$GPRMC,062704.000,A,0119.8065,N,10346.5787,E,0.00,27.59,170411,,,D*58
$GPRMC,062734.000,A,0119.8064,N,10346.5786,E,0.01,27.59,170411,,,D*5A
$GPRMC,062804.000,A,0119.8053,N,10346.5778,E,0.00,27.59,170411,,,D*52
ENG499 CAPSTONE PROJECT PROPOSAL 9