Scoring problem on races crossing IDL and rounding Cape Horn

As SOL is now sailing again in Southern Pacific the curvature of earth and the international dateline (IDL) is playing some tricks on SOL. This is my understanding what happens there.

Rounding detection

First of all, a short explanation on how DTF (Distance To Finish) and mark roundings are handled in SOL. Each mark causes a turn in the route, i.e. if we approach the mark from west and the next mark is north, the turn is 90 degrees. SOL considers the mark rounded when the boat crosses the line representing half of the turn needed. So assuming we come to mark in 90 degrees and turn to 0 degrees, the mark is rounded when the boat crosses the line SE (135 degrees) from the mark.

Now, the SOL sailing engine sails the boats in "hops", i.e. it moves the boats every X seconds to the direction they are pointing and the amount of the movement depends on the wind on the boat's location, the boat polar and how many seconds there has been since the last movement of the boat. Usually on normal server load the hops are about 15 seconds.

After each hop, the engine checks if a mark rounding happened, that is did you happen to to cross the half-angle of the next mark rounding. Unfortunately this calculation doesn't understand crossing the IDL so when you cross, it thinks that you traveled all the way around the world on that hop.

If you cross the IDL more south than Cape Horn (S 55.98) the server actually thinks that you have rounded the mark. This is because the server thinks your hop went all the way around the world other way (below Australia and Africa etc.) crosses the line which server considers the limit for mark rounding, so it marks the boat as rounded. If you cross north of Cape Horn, your hop (or what the server think it is) goes north of Cape Horn as well and thus no rounding is marked.

How this affects the DTF

For boats that have not rounded Cape Horn the DTF is calculated so, that the GC (Great Circle) distance to the mark rounding is added to the distance from that rounding to the next mark (in the case of Global Challenge Leg 3 the finish).

But if the server thinks that the boat has already rounded Cape Horn, it will calculate DTF simply as the GC distance to the next mark. This is why some boats have suddenly gained 600 miles when they have crossed the IDL.

Fixing the problem

For the current race, the fix is that the boats with incorrect roundings are corrected in the server to not have rounded Cape Horn yet. No boat has gained any advantage by this problem because it's just the DTF calculation which has been wrong.

The admins probably could have been faster reacting to this problem but it occurred first time 24 hours ago and I spent yesterday getting into the root of it by re-running manually the server code calculating the DTF and mark rounding before I fully understood what it was about.

From previous races run in this area the admins knew that there has been something wrong with the IDL and we tested this race beforehand by sailing over the IDL in practice mode when the race was not yet public. Unfortunately we didn't understand that the problem happened only when the crossing happens more south than Cape Horn and didn't detect the problem then.

In the long run of course the server mark rounding code in the server has to be fixed to prevent this situation happening in the future races.

DTF calculation near the polar area

Year ago when we run in this same area in the SWR Leg 5 the same problem happened but that time the boats with incorrect roundings had their DTF actually increasing by 2700 miles. This is because SOL tries to anticipate where the boats rounding will happen by calculating the shortest distance the boat has to sail to round the next mark. 

In the polar area if the boat is nearer the pole than the next mark the shortest distance to the rounding is actually at the pole. The problem with this is that the distance from the pole to the next mark is then much longer so in these situations the DTF's may feel weird. When the boats get nearer the next mark this problem will correct itself.


Timed races in sollog

Now, as the Holiday Star timed race has just opened in SOL it probably is a good time to talk about one shortcoming sollog has. It doesn't support timed races at all so unfortunately you can't view your timed races there at all.

The basic reason for not supporting them is that the current data model I use doesn't like having multiple boats with the same name in the same race. And that's what happens when someone does more than one attempt.

At the time this came apparent last spring I shortly consulted the most active solers and the consensus seemed to be that sollog is not so important for timed races so I just decided not to do them at all. After all, the hourly rankings don't make much sense when boats have not started at the same time.

Thinking of it now, timed races probably would need a different approach, it would be nice to compare two timed runs head to head so that you could see the speed/wind/location of the boats compared to their start time. However that would mean that I'd have to start polling the boat positions more often than just once per hour but that might be manageable.

I'd like to hear if many people are missing the timed races in sollog and also any ideas what kind of information should be shown for them?


Short introduction to sollog

The principal idea of sollog is really simple. It fetches every hour the positions and headings of the boats in a sailonline.org race from the server and stores them. Then it can show this information and also all kind of performance statistics which can be calculated using the fetched information.

Before this I have never got into writing any manual or documentation for it. If you are experienced in sailing and especially virtual sailing most of the features are pretty easy to figure out by yourself. But even if most things can be easy to understand, there can be features that you haven't discovery by youself so here is a short list of features in sollog.

1. Races list

The first page lists all the races sollog has stored information from. Select here the race which you are interested in and you will be taken to the race information page for that race. The newest races are on top.

In the bottom of the page you can also search for all races participated by a certain boat. Type the name of the boat and press "Find races" to see them.

2. Race information

The initial page for a race (like Leg 2 of SOL's Global Challenge 2012-2013) shows some real basic information about the race, like waypoints and start time.

After that there are search boxes for two boats. If you are interested in showing information about one single boat (like yours), you can type the name of the boat to the first search box and then press the button "Show statistics" for numeric display of the boat's hourly statistics in the race so far (i.e. "boat history") or "Show map" for displaying the course sailed by the boat in google maps.

3. Hourly race standings

Here we get to the actual race data. You can see here how the race standings look for any full hour of the race (like Leg 2 at 16.12.2012 11:00 UTC).

Description of the data available for each boat:

  • Rank - ranking of the boat at that hour *
  • DBL - Distance behind leader *
  • DTF - Distance to finish *
  • Distance - The distance between this boat's location has moved during last hour
  • Course - The course from boat's last location to this hour's location
  • 24h - The distance boat has traveled during last 24 hours
  • Speed - The speed of the boat at the moment
  • Heading - The heading boat was pointing to at the moment of this hour *
  • TWA - True wind angle of the boat at the moment of this hour
  • TWD - Wind direction at the position where the boat was at this hour
  • TWS - Wind speed at the position where the boat was at this hour
  • Waypoint Name - The next waypoint this boat is aiming to in the race
  • Waypoint Bearing - Heading to the next waypoint (great circle)
  • Waypoint Distance - Distance to the next waypoint (great circle)
  • Lat - Latitude of the boat location *
  • Lon - Longitude of the boat location *
The ↑↓ columns means difference in that data during the latest hour. In rank and DBL positive number means that you have gained, negative number is loss.

The columns marked with * are values which are taken directly from the server, others are calculated if the information is available. Especially the boat speed and wind values are not exact but should give a pretty good indication of the real values.

Map view

You can also view the hourly boat positions in google maps (like Leg 2 at 16.12.2012 11:00 UTC).

Boat lists

As the ranking page lists all boats participating in the race finding the ones you are interested in is quite difficult. You can create a list of boats which you only want to be shown like your friends or boats you are in close racing. 

Boat lists must be created for each race separately (like here for leg 2) and they show only the listed boats (like here latest positions of sol Admins boats).

4. Boat history

This is same information as in the hourly race standings but instead of displaying all boats at a certain time, the numbers are all hourly data for one boat (like here for for my boat in leg 2).

The boat history can be accessed either from the Race page using "Show statistics" or by following a link from the hourly standings.

Map view

Here you can view the approximate course your boat has sailed in this race in google maps using the hourly positions (here is my track from leg 2). The detailed track is the track available from sol server.

5. Compare two boats

Here you can compare two boats hourly data to each other (like here me and ITA_4_Aaron). You can get to the comparison either by entering the boats names in Race page using "Compare stats" or from Boat history when you enter another boats name and press "Compare".

The numbers here are Rank, DBL, Distance, Course, TWS and TWD from both boats histories displayed in the order the boats are listed in the page header. The ↑↓ fields are calculated differences in each field.

Additional values are Boat positions Distance and Bearing which are simply the distance of the boats at that hour and the (great circle) direction from the first boat to the other one.

Map view

Here you can compare the two boats courses on google maps (like here for me and ITA_4_Aaron).


Updating the sollog soon

Looks like now that because even more people are aware of the staging version after my recent blog post, most of the users have switched to use it.

After reviewing weekends usage statistics where staging has had 3 times more usage than the "official" version it looks like most people are happy with the extra information staging has.

So soon (which can be anything from 1-2 days to 1-2 months depending on my free time) I will be updating the official version to have the same information the staging has now. 

In the comments StuArt asked about similar ranking site that user "wiz" has previously kept for sailonline.org with national rankings and different kind of records (24h run etc). I will probably have a look during Christmas holidays how easily this kind of ranking would be to do.


Starting a blog about technical things in sol

This blog is about the (IT) technical things in sol (sailonline.org virtual sailing site), different kind of tools you can use to help your sailing there. Not so much about how to navigate your virtual boat as there are better sites for that for example listed here: http://sailonline.org/wiki/show/Links/.

My own sol statistics site sol.hmm.iki.fi has now been in use for almost a year. So far I have mainly developed it to suit my own use but I hope to get more feedback about ideas how to improve it through this blog. Feel free to comment and suggest new ideas to either my sollog site or perhaps even completely new tools. 

Which sollog version would you prefer?

For a start, even if I have quite often mentioned it in the race chats, not everyone is aware that there are two version of my sollog pages. The official one is of course sol.hmm.iki.fi but there is the "development" version in staging.sol.hmm.iki.fi which includes quite a lot of more numbers calculated hourly from the boat information. The main difference is that the staging version includes the weather data from sol server and thus can calculate things like speed, twa, tws etc. hourly for each boat.

I myself have been recently using the staging site because of the extra information it has but on the same time I have hesitated a bit to make it the "official" version as I fear that the amount of different numbers can be quite confusing. Then again, I believe that the average virtual sailor probably is pretty comfortable with data like this and if (s)he isn't it might be good to show what kind of data is essential for performance in virtual sailing (and in real sailing of course too).

So for this first post, I'd like to have feedback which version people would prefer. Of course it could be possible to continue having both sites or having "simple" and "detailed" versions of the pages on the same site but perhaps there is need for only one version.

hmm@iki.fi (or hmm at sol race chats)