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:

Christmas(W) to Christmas(E) Island 2026

This year, we shall sail the 5827nm from Christmas to Christmas in the world-rounding record-shattering 125 ft Orange catamaran, and in the less frequent direction out of the Indian Ocean into the Pacific. There are a lot of islands in the way, and the possibilities to avoid them, north and south, and as far as you like, are endless. Who will find the best route? Fair winds!
Race #2075
INFO by brainaid.de
Orange 125ft Catamaran PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SYC
Race starts: Dec 01st 05:00 Registration Open!
▶ Flash
GO TO RACE

Westcoast Offshore Race 2026

Ahoy, SOLers! Welcome to South Africa for Sailonline’s debut of the legendary West Coast Offshore Race! Organized by the Royal Cape Yacht Club, this iconic overnight classic stretches from Cape Town’s Table Bay to a warm finish at Saldanha Bay Yacht Club. Rooted in the daring 1980s Sea Harvest Race, this 163nm coastal challenge offers rugged beauty and tactical shifting winds. We are taking it on in the nimble Fareast 28R. Designed by Simonis Voogd, this axe-bow performance keelboat is a true downwind flyer! Trim your sails, watch for whales, and race to the braai in Saldanha Bay!
Race #2073
INFO by brainaid.de
Fareast 28R PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SUPBUD - SYC
Race starts: Nov 21st 07:00 Registration Closed
▶ Flash
GO TO RACE

Cross the Convergence 2026 - Agalega to Iles Crozet


The last race of our series of ocean voyages across the World’s convergence zones takes us from Agalega’s Vingt Cinq to the Crozet Island’s Ile aux Cochons. Politically, but hardly practically, Agalega belongs to Mauritius, more than 600nm distant. Improbably, Crozet belongs to France, more than 6000nm distant; also you will find rien des cochons there, just penguins. Anyway, it’s 2200nm between these unlikely outposts, and we will take our vintage Super Maxi 100, the one with the revised (v2) polar, to make the crossing between the two.
Race #1989
INFOby brainaid.de
Super Maxi 100PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: CCZ - SYC
RACE CLOSE: Wednesday,
December 2 at 2300 UTC.
Race starts: Nov 20th 18:00 Registration Closed
▶ Flash
GO TO RACE

Go to race archive

SYC Ranking

  1. Sailonline Yacht Club Member CriticalHippo
  2. Sailonline Yacht Club Member rumskib
  3. Sailonline Yacht Club Member Kipper1258
  4. Sailonline Yacht Club Member rafa
  5. Sailonline Yacht Club Member cdhinman
  6. Sailonline Yacht Club Member rthinman
  7. Sailonline Yacht Club Member Panpyc
  8. Sailonline Yacht Club Member nacrr
  9. Sailonline Yacht Club Member brellis
  10. Sailonline Yacht Club Member YANN

View full list

Series

Mobile Client

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

The mobile client