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:

Shearwater - Rio de la Plata to Irish Sea 2026

Welcome to the fourth leg of our MIG series. This time we're racing the Sooty Shearwater on their migration from the breeding grounds in South America to the northern Atlantic. This is also part of our Ocean Championship, and as such the third race of OCQ3 2026. This race will be sailed in our Gunboat 90. Race #2055
INFO by brainaid.de
GunBoat 90 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking:
OCQ3 - OCCH - SYC - MIG
Race starts: Sep 02nd 11:00 Registration Open!
▶ Flash
GO TO RACE

New Ice Age 2026 - Scott Base to Neumayer Station


To complete our DN circumnavigation of Antarctica and our 4-race ice-boat marathon series, we continue clockwise, now departing from Scott Base back to Neumayer Station. It’s about 3500nm back as well, which, as said if there’s wind at all, should, well-wrapped in your DN-cockpits, not take you much more than five days. And remember: charts down here are unreliable – what is land and what is ice?!
Race #1971
INFOby brainaid.de
DN PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: NIA - SYC
Race starts: Aug 27th 07:00 Registration Open!
▶ Flash
GO TO RACE

Cross the Convergence 2026 - Tenerife to Fernando de Noronha


The sixth race of our series of ocean voyages across the World’s convergence zones takes us back up the Atlantic to Tenerife, from whence we will depart on a classic transatlantic passage to Brazil’s Fernando de Noronha. It’s 2150nm as the albatross flies, but you will undoubtedly have to take some and sometimes sudden detours to get your Volvo 70v4 through the doldrums stretching across your path from the Amazon to the Niger.
Race #1986
INFOby brainaid.de
Volvo 70v4PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: CCZ - SYC
Race starts: Aug 23rd 18:00 Registration Closed
▶ Flash
GO TO RACE

Go to race archive

SYC Ranking

  1. Sailonline Yacht Club Member KaSToR
  2. Sailonline Yacht Club Member CriticalHippo
  3. Sailonline Yacht Club Member WRmirekd
  4. Sailonline Yacht Club Member rafa
  5. Sailonline Yacht Club Member Panpyc
  6. Sailonline Yacht Club Member cdhinman
  7. Sailonline Yacht Club Member rthinman
  8. Sailonline Yacht Club Member ms0689
  9. Sailonline Yacht Club Member BRENTGRAY
  10. Sailonline Yacht Club Member Sax747

View full list

Series

Mobile Client

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

The mobile client