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:

Vasco da Gama Ocean Race 2025

Sailonline is proud to partner with the Royal Natal Yacht Club for the 2025 Vasco da Gama Ocean Race—South Africa’s oldest coastal ocean race! Covering 254 nautical miles from Durban to East London, this iconic route is known for rough seas, strong currents, and serious strategy. Our virtual fleet will be racing in the fierce Farr 40, a proven offshore performer. With history, endurance, and camaraderie on the line, it’s time to honour Vasco’s legacy—see you on the start line!
Race #1908
INFO from brainaid.de
Farr 40 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SYC
Race starts: May 25th 08:00 Registration will open soon
▶ Flash
GO TO RACE

Red Eye - Bimini Beach Run 2025

This time of year, already it is balmy in the Bahamas and the Biminis, if ever it is not; so let’s try and get some “Red Eye” enjoying the fine weather and a warm night, racing our appropriately luxurious and bombastic Gunboat 90, as always our craft of choice for this 250nm beach-running, island-hopping SOL classic through this multihull mecca!
Race #1845
INFOby brainaid.de
GB 90 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SYC - RED
Race starts: May 22nd 12:00 Registration Open!
▶ Flash
GO TO RACE

Africa by Sea - Abidjan to Swakopmund


Our exploration of Africa by Sea continues. Next, it’s off to Swakopmund, on the water’s edge of the Kalahari desert. It’s a wind-blasted coast, and a venue of choice for those seeking to set wind-powered speed records. More likely than not, we’ll have to beat into it in our Steinlager II, to finally find some shelter behind the walls of Platz am Meer where there is a marina of sorts. Only 2200nm!
Race #1856
INFOby brainaid.de
Steinlager II PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SYC - ABS
Race starts: May 14th 17:00 Registration Closed
▶ Flash
GO TO RACE

Channel Islands TIMED Chase 2025

Join us in Saint Peter Port, Guernsey for a race around the Channel Islands in the J-109, a recent addition to the Sailonline fleet. The course takes us around the islands of Alderney and Jersey finishing back in Saint Peter Port. This is a TIMED race, so you may RE-REGISTER HERE to try again, after finishing a run. You will have 13 days and 11 hours to test your skill and decision making after the race opens.
Race #1915
INFO by brainaid.de
J-109 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking:
TRQ2 - TRCH - SUPSOL - SYC
RACE CLOSE: Saturday,
24 May at 23:00 UTC
Race starts: May 11th 12:00 Registration Open!
▶ Flash
GO TO RACE

Elephant Island to Marquesas 2025

Prepare to test your limits as we launch into the third leg of the RWW Series and the fifth leg of the 2025 Ocean Championship Series—an epic voyage from Elephant Island to the Marquesas in the heart of French Polynesia. This 4,700-nautical-mile challenge is a true test of endurance, strategy, and raw sailing adrenaline. Aboard the high-performance Volvo 70v4, competitors will face fierce headwinds as they round the legendary Cape Horn and make the thrilling transition from the Atlantic to the Pacific. Do you have what it takes to conquer the Pacific? Join us, and put your skills to the ultimate test.
PRIZE: SMPF
Race #1909
INFO by brainaid.de
VO70_v4 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: OCQ2 - RWW - OCCH - SUPSOL - SYC
Race starts: May 05th 11:00 Registration Closed
▶ Flash
GO TO RACE

Go to race archive

SYC Ranking

  1. Sailonline Yacht Club Member Patrick70119
  2. Sailonline Yacht Club Member WRmirekd
  3. Sailonline Yacht Club Member CriticalHippo
  4. Sailonline Yacht Club Member KaSToR
  5. Sailonline Yacht Club Member FreyjaUSA
  6. Sailonline Yacht Club Member rafa
  7. Sailonline Yacht Club Member Kipper1258
  8. Sailonline Yacht Club Member bonknhoot
  9. Sailonline Yacht Club Member rumskib
  10. Sailonline Yacht Club Member vida

View full list

Series

Mobile Client

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

The mobile client