Location Based HTML
Kevin Curran, Computer Lecturer - Magee College

GPS

A variety of mobile information appliances are developed rapidly such as smart phones with capability of Internet access, PDAs (Personal Digital Assistants) equipped with GPS (Global Positioning System), and car navigation systems. A navigation service is one of the indispensable services to these mobile information appliances, but currently it is only available with car navigation systems. In order to use the navigation service not only on cars but also on trains, on buses, and on foot with various mobile information appliances, a common data format for describing navigation information such as locations of points and route information is required. The "NVML" (NaVigation Markup Language) is a markup language for describing the navigation information satisfying the above requirement. The NVML enables us to use a navigation service at any time and anywhere, and it will also be used in other services such as a guide service for sightseeing, a travel planning service, and a publishing service for tourists.

There is a site dedicated to this location based html and the specification is here.

Task

Develop a system that would allow someone to enter in tasks such as wishing to drop the laudry off at a dry cleaners on Friday. Then on Friday whenever that person drives near a dry cleaners - their mobile phone alerts them. It's basically bringing location into an organiser.

I'd love to see students take this theme and develop it. It's one of the hottest areas in mobile computing at present.

Tutorial on GPS

What is it?
The Global Positioning System consists of 3 segments:
  • Space Segment
  • Control Segment
  • User Segment
The Space Segment is a constellation of 24 satellites which orbit the earth every 12 hours. The Control Segment comprises a series of monitoring stations at different locations around the world, with the master control facility located at Schriever Air Force Base in Colorado USA. The User Segment is made up of all the GPS receivers in the world's aircraft, ships, cars, and handheld units.


How it works
The operation of the system is very complex. At its simplest, each satellite is constantly transmitting its identity, along with a time signal. GPS receivers contain an almanac which tells them where each satellite is at any moment in time. The receiver picks up a signal from satellite number 4 which says something like "I'm satellite number 4, and I sent this message at 14:30hrs and 13.9732465 seconds". The receiver knows where the satellite is, and it also knows what time it is, so the receiver thinks "I got that message at 14:30hrs and 14.0295465 seconds, so the signal took 0.0563 seconds to reach me, therefore satellite number 4 is X miles away from here". That information on its own is useless, but if you receive the same information from 4 satellites in parallel, you have your position in 3 dimensions.


Selective Availability
The US government introduced Selective Availability (SA) in order to control the availability of the highly accurate positioning which the GPS system is capable of providing. Without SA, the GPS system is accurate to around 30 Metres. SA degrades the accuracy of civilian receivers by introducing a small error in the time signal transmitted by each satellite. The accuracy of the system is reduced to around 100 metres. There are many articles complaining about SA, and calling for its abolition. I'm not so sure I agree with them. The GPS system belongs to the US military, it cost them billions of dollars to develop and implement. Personally, I'm surprised they make it available to the public at all, let alone for free. Having said that, I wouldn't complain too loudly if SA was abolished.

Update: 1st May 2000.... The White House has just announced that Selective Availability has been abolished. Read the statement here.


DGPS
Differential GPS. Imagine you survey a position to pinpoint accuracy, then place a GPS receiver there. The receiver knows exactly where it is, so it's not fooled by Selective Availability. This receiver can calculate the timing errors which are in the transmissions from each satellite, and blow the whistle on them! The DGPS station has a transmitter which constantly sends out correction signals to DGPS-enabled receivers. So effectively, the DGPS transmitter is shouting things like "Satellite number 5 is 0.0023 seconds slow, and satellite number 9 is 0.0049 seconds fast". A DGPS-enabled receiver can incorporate these corrections into its calculations and can therefore provide a much more accurate position. It should be noted that DGPS transmitters are not widespread, They are extremely expensive to install, and are typically found in areas where high accuracy surveying is necessary, such as around quarries and drilling platforms etc. It's worthwhile checking to see if DGPS signals are available in your area before spending money on a receiver.


Triangulation
Triangulation is a major factor in determining your position accurately. This can be more accurately described as Geometric Dilution Of Precision. Ideally, when calculating position, the GPS receiver should be tracking as many satellites as possible, and the satellites being tracked should be as widely spread across the sky as possible. The image below illustrates a receiver tracking 8 satellites in parallel, which are well spread across the sky. The receiver could comfortably ignore 4 of these satellites, and only use the 4 which are widely separated, and its accuracy would hardly be affected at all.


The following illustration shows the same 8 satellites, but only 4 are visible. The satellites which are visible are relatively close together in the sky, so the signals are separated by relatively shallow angles. The accuracy of the position calculated by the receiver will be degraded as a result.

Download the Gps Component software.

This Zip file contains the classes necessary to interface a standard GPS receiver with the toolkit, and in fact any other Java application.  You will need to compile these classes, but this is straight forward as long as Java can find the classes found in the above packages.

You will need to create a new directory called 'locationUtils'.  This was created inside the 'context' directory created by the context toolkit, but it does not matter as long as your CLASSPATH contains a reference to the directory in which the 'locationUtils' directory can be found.

Click on this link to download the Zip file ..... nmeagps.zip

Please follow these instructions:

  1. Unzip the GpsWidget.zip file to a temporary directory.

  2. Move to these locations the following files (the context directory will be in the directory where you installed the context toolkit):

    • To the context\arch\widget directory - WNmeaGps.java, SignalReceiverWidget.java, GlobalXYLocationWidget.java, GlobalWidgetGpsExtension.java, LocationWidget.java and AltitudeLocationWidget.java.

    • To the context\arch\generator directory - NmeaSerialGps.java and NmeaSerialReader.java

    • To the locationUtils directory - GpsMonitor.java, GpsMonitorUI.java, GlobalCoordinate.java, LatOrLongitude.java, TestSerialReader.java,  LocationConverter.java and GpsGenerator.java

  3. Compile each of the class files separately.  Run the 'javac' command in the directory of the class to be compiled. For example run  "javac WNmeaGps.java".

JavaDoc documentation is available online for all the classes/interfaces here, or as a zip file here.

  The Java Communicaions API can be downloaded locally here.
Shareware software is here at http://www.easygps.com/ or here for a map file handling utility http://www.gpsu.co.uk/

There's an excellent GPS Tutorial on the Trimble website.

Thanks to Stuart Robertson for writing this tutorial.


Home

To contact Author: Email: [email protected].