Facebook

Login

Support Sailonline

If you haven't already - join the SAILONLINE YACHT CLUB!

Please also consider making a donation - all amounts are greatly appreciated!

Board » General Discussion » Circular Math

Working on a Spreadsheet function to give the correct TWA that matches what the SOL game client displays. I happen to use LibreOffice so this is how it looks for me.

The structure is a common IF, THEN, ELSE format.

=IF((TWD-COG)<=-180,(TWD-COG)+360,
IF((TWD-COG)>180,(TWD-COG)-360,
(TWD-COG)))

I was curious if anyone could suggest a simpler or more elegant way to do the same thing ?

Beyond that if you happen to have any other Algorithms that are useful for SOL problems please share them here.
None so blind
=MOD(TWD-COG+180,360)-180

Even allows values like 365 or -70 for TWD and COG.

_____________________
+1 for LibreOffice ;)

--- Last Edited by kroppyer at 2013-10-28 22:15:06 ---
Very Clever ~ I was familiar with the term Modulo but had never applied it to anything before. Now I can turn my spreadsheet into a circular slide rule or Whiz Wheel.
None so blind
[removed at the suggestion it was off-topic]

--- Last Edited by LaoziSailor (Han Tacoma-Emons) at 2013-10-29 22:59:20 ---
LaoziSailor

Everything gets done by not doing anything!

Please login to post a reply.

Races

Next Race: 00d 00h 00m


Current Races:

Newport Bermuda Race 2026


The 636-mile Newport Bermuda Race is one of the oldest regularly scheduled ocean races, and with the Fastnet and the Sydney Hobart Race, it is one of the three great classic races of the yachting world. First raced in 1906, now in its 54th biennial, the Race can again also be participated in online. In real life, the race is open to entry in four different division – Double-Handed, St. David's Lighthouse, Gibbs Hill Lighthouse, and Finisterre Division – which in the past we have also offered online. This year, however, our online race will be all-in one-design in silky swift Club Swan 50 yachts, so that your results can count towards SOL’s SUPerBUDdy title, whilst hopefully still giving you a chance of overall line honours against the fastest yachts of the real-life Gibbs Hill Division, especially if you can find some forecast winds that don’t quite work out that way on the real water!
Race #2038
INFOby brainaid.de
Club Swan 50 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SUPBUD - SYC
Race starts: Jun 19th 17:05 Registration will open soon
▶ Flash
GO TO RACE

Bluefin Tuna - Mexico Gulf to North Sea 2026

Join us and follow the Bluefin Tuna, as they migrate from their spawning grounds in the Gulf of Mexico to their feeding grounds in the North Sea off the coast of Norway. This 4300 nm race is part of our Ocean Championship and the final race of OCQ2 2026, and also the second leg of our Migration series. We will be sailing in our Gunboat 90. Race #2035
INFO by brainaid.de
Gunboat 90 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: OCQ2 - MIG - OCCH - SYC
Race starts: Jun 08th 11:00 Registration Open!
▶ Flash
GO TO RACE

Thessaloniki to Port Said 2026

Welcome back to the Eastern Mediterranean for the fifth race of our Magical Mediterranean Series. Only marginally less unlikely to be ever raced in real life during SOL’s lifetime than our previous race from Tobruk to Iskenderun, this 710nm race takes us from Greece’s ancient northern port of Thessaloniki through the Aegean island maze, south east into the Levantine Sea to a finish in modern Port Said, in splendid Swan 65s!
Race #1977
INFO by brainaid.de
Swan 65 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: MED - SYC
RACE CLOSE: Wednesday,
June 17 at 2300 UTC.
Race starts: Jun 06th 15:00 Registration Closed

▶ Flash
GO TO RACE

TuziTekwini TIMED Race 2026

Sailonline is delighted to have been invited again to partner with the King Shaka Yacht Club (KSYC) of South Africa to bring a virtual version of the Tuzi Tekwini Ocean Raceto our online community.
The Tuzi Tekwini Ocean Race is a near 90 nautical mile race down the east coast of South Africa from the port of Richards Bay to the port of Durban. Achievable in a single day and seen by some as an easy mile-builder, the course is more tactical than some think and should not be underestimated. This iconic race promises to be an unforgettable experience for yachting enthusiasts.
Our online version of the race will be a TIMEDrace so you may RE-REGISTER HEREto try again after finishing a run. You will have two weeks to test your skill and decision making after the race opens.
Race #2037
INFOby brainaid.de
Sailonline’s virtual yacht for all your runs will be our much-loved Farr 38 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking:
TRQ2 - TRCH - SUPBUD - SYC
RACE CLOSE: Saturday,
13 June at 23:00 UTC
Race starts: May 31st 12:00 Registration Open!
▶ Flash
GO TO RACE

Go to race archive

SYC Ranking

  1. Sailonline Yacht Club Member WRmirekd
  2. Sailonline Yacht Club Member KaSToR
  3. Sailonline Yacht Club Member CriticalHippo
  4. Sailonline Yacht Club Member rafa
  5. Sailonline Yacht Club Member Panpyc
  6. Sailonline Yacht Club Member bonknhoot
  7. Sailonline Yacht Club Member HoratioPugwash
  8. Sailonline Yacht Club Member rumskib
  9. Sailonline Yacht Club Member CollegeFund
  10. Sailonline Yacht Club Member sassy63

View full list

Series

Mobile Client

SYC members have the benefit of access to our mobile/lightweight web client!

The mobile client