Tracking the race
How do you track a boat?
The process of tracking boats is not a new concept. In fact the Queensland Cruising Yacht Club has been tracking the yachts since the very first race back in 1949. Predominantly it has been a safety requirement, however, in recent years it has evolved into a media and spectator requirement. Tracking in the very first race was done using homing pigeons; today we use the Pivotel TracerTrak? system. The system involves a hardware unit no thicker than the average computer, and a little bigger than the average paperback novel.
These units attain a GPS location on a set interval. For the Brisbane to Gladstone, ten minute intervals are used, which is quite a short timeframe for boats, but gives us more flexibility when the analysis engine kicks in. The TracerTrak unit then sends the location information to a base station using Globalstar's satellite network. The base station takes the information and creates an xml packet that is sent to the Brisbane to Gladstone YachtTracker server. The server has a simple servlet that receives the xml messages. The servlet stores the xml packet as a file for auditing, and then calls a local web service. The service will then store the location in a database and start the processing engine.
ArcGIS Server
ArcGIS Server is used often in the YachtTracker system but the hidden component is quite possibly the most powerful. One of the most powerful components of ArcGIS Server is the fact that you don't need a map to do GIS crunching. The servlet sending the locations to a web service uses ArcGIS Server. The service has two primary responsibilities. The first is to store the boat's location in a SQL Server 2008 database. The second is to predict when the boat will arrive in Gladstone. Once the boat location is stored it is immediately visible in on the YachtTracker application.
Predictive Analysis
Predicting when a yacht is going to arrive in Gladstone is an interesting challenge. The trouble is that unlike a race track for cars, yachts can travel anywhere they want (they will usually try to avoid land)! This introduces a few problems when trying figure out how far they have to go. As you can see in the image of the course, it is possible that a boat could be quite close to Fraser Island, or indeed, a long distance offshore.
Yachts will each traverse the course differently. This difference is based on many factors. Some of them are human, involving different sailors' interpretations of the race track, and the weather that will prevail. Other factors include the design of the yacht, its length and weight. So how do you predict how long they have to go? Our approach is to use the history of the yacht. We look at the boats current position and then compare that to their last three recorded positions. This gives us a good average boat speed to use for calculating their ETA (estimated time of arrival). The distance to go is worked out using linear referencing. We know the course that yachts would take if they took a direct approach. This is called the rhumbline. It is considered the shortest distance to traverse the course. When the web service receives a yacht's location it snaps the yacht at right angles back to the rhumbline. Now that the yacht is on the rhumbline, we can determine the distance to go.
From here it is simply a matter of speed = distance / time. We know the distance and speed. Remember that speed was worked out based on how far the boat has travelled over the last three recorded positions. Now that we have an ETA we can work on the handicap predictions. Yachting handicaps are worked out using a fraction of the elapsed time. For example, a fast yacht may have a handicap of 1.234, and a slower yacht, would get a handicap of say 0.8123. When we multiply the elapsed time in minutes by the handicap we get a corrected time. The boat with the lowest corrected time wins the division. Many spectators look to the results of which boat is the first to finish, but the real prize is in handicap honours!
So the predictive analysis engine works out on each positional update, the ETA and therefore current corrected time of each yacht. The placing of each boat is then displayed in the YachtTracker application.
Next Steps
In April, we will discuss the upcoming race as we count down to Easter. We will discuss the hardware driving this year's race and what measures we have taken to help the scalability of the application during peak load periods. Specifically we will talk about putting caches into online and high availability storage systems.
For more information on the Brisbane to Gladstone race, visit http://www.brisbanetogladstone.com.au/.