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:

Tristan da Cunha to Newfoundland 2026

Welcome to the third leg of our RNW series. This final leg Round the New World, from Tristan da Cunha to Newfoundland, is the culmination of our 2026 Ocean Championship, and as such also the final race of OCQ4 2026. This race, like the previous race in the RNW series, will be sailed in our revised 'version 2' Imoca 60 Foil. Race #2074
INFO by brainaid.de
Imoca 60 Foil v2 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: OCQ4 - RNW - OCCH - SYC
Race starts: Dec 07th 11:00 Registration Open!
▶ Flash
GO TO RACE

Phuket TIMED Race 2026

The last TIMED race of 2026 brings us to Phuket, Thailand for a 116nm circuit around Phuket Provence. Depending on the wind direction the narrow channel at Pak Phra Beach could be challenging. The boat for this race is the 29er XX with a fun polar.
This is 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 #2076
INFOby brainaid.de
PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking:
TRQ4 - TRCH - SYC
RACE CLOSE: Saturday,
19 December at 23:00 UTC
Race starts: Dec 06th 12:00 Registration will open soon
▶ Flash
GO TO RACE

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

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