Appendix A algorithm

I intend to publish the source code of the code that actually scores a
series as per the RRS on the web site. It's interesting that this is in
fact a tiny part of the codebase; in fact it would be written in hours; it's
all the supporting stuff that takes the time. I want to do this so that
users can validate the code against the RRS for themselves if they so wish.
It has become apparent that this is necessary from some recent interesting
email communications.

Regards,
Colin J
www.sailwave.com

···

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.441 / Virus Database: 247 - Release Date: 09/01/2003

I have recently taken on the job of scoring our club's racing results and have opted to use Sailwave to do this. Armed with a batch of results from our last series I have entered all the data for testing purposes and Sailwave has come up with the same results as originally scored, so far so good. The results may be viewed at www.cmyc.co.uk/results/autumnleaf.htm

The concerns I have are as follows:
1) the points scored for the series do not tally with the positions.
2) Boats which do not enter for a particular race in the series seem to be scored DNC by Sailwave by default (these are shown by ' - ' on the web page having been changed by me from DNC using 'Find/Replace all' when published in Excel)
3) Does Sailwave automatically account for 'Races to Count' and how can I view this?

I would very much appreciate any help you may be able to provide to enable us to adapt Sailwave to suit our club's requirements.

The scoring system adopted by our club is as follows:

The scoring system will be as Appendix A using the Low Point system, modified as follows:
a. When boats are tied at the end of a race they shall receive points for the tied place.
b. Boats that are scored using the designations given in paragraph A11 shall receive points thus:-

        Did not finish (DNF) Number of starters +1
        Did not start (DNS) Number of starters +2
        Did not come to the starting area (DNC) Number of starters +3
        All others Number of starters +4

c. (i) 'One Day' series - when a discard is permitted ties shall be broken by taking 'best discard'

   (ii) otherwise it shall be broken in favour of the boat with the lowest score in the last race that the tied boats raced and scored differently. If a tie still remains it shall be broken in favour of the boat with the lowest score in the last race that the tied boats were eligible to sail, and which was completer - not necessarily by the tied boats - or, if a tie still remains, in the penultimate race and so on as necessary.

d. All other series - Ties shall be broken by taking into account all races sailed 'head to head' by the tied boats; the boat with the lowest overall score wins. If a tie still remains it shall be broken as in c. (ii)

e. Each boat's series score will be the total of her race scores with her worst scores discarded in accordance with SI 16. the lowest series score shall win.

Races to Count
In all series, the number of races to count in order to qualify for an award is half of those sailed rounded up unless the number of races is less than three when all races count:-

Number of Races 1 : 2 : 3 : 4 : 5 : 6 : 7: etc
Number to Qualify 1 : 2 : 2 : 2 : 3 : 3 : 4: etc

[Non-text portions of this message have been removed]