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:

Susan Hood Trophy Race 2026

Lake Ontario Offshore Racing (LOOR) welcomes racers to Sailonline’s virtual version of their annual Susan Hood Trophy Race. This year, this pleasant weekender on western Lake Ontario will be of about 60nm in length, and online for convenience will start and finish at the Port Credit Yacht Club (PCYC). At or before the real-life Skipper’s Briefing a decision will be made to race the course clockwise (course Delta) or anti-clockwise (Echo). If there is time we will match this online. As before, the race is the first of two that will count towards a special Sailonline's LOOR Series medals, but this year we sail in Jeanneau Sun Fast 3300s. Bon voyage!
Race #2033
INFOby brainaid.de
Sun Fast 3300 PARTICULARS
NAM_AWIP WX Updates:
0245 / 0845 / 1445 / 2045
Ranking: LOOR - SUPBUD - SYC
Race starts: May 29th 23:45 Registration Open!

▶ Flash
GO TO RACE

Cross the Convergence 2026 - St Helena to Cape Verde


The fourth race of our series of ocean voyages across the World’s convergence zones takes us out of the Pacific into the Atlantic for a 2200nm race in Judel Vrolijk 62’s, from the desolation of St Helena, there where Napolean Bonaparte saw out the end of his life, to the even greater desolation of Fogo in the Cape Verde’s. You’ll have to cross the equator, with the coasts of Africa and South America your only navigational restrictions.
Race #1984
INFOby brainaid.de
Judel Vrolijk 62PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: CCZ - SYC
Race starts: May 22nd 18:00 Registration Open!
▶ Flash
GO TO RACE

Chesapeake and Potomac TIMED Race 2026

Welcome to the Chesapeake Bay, the sailing capital of the United States. Feast on Maryland crab cakes or crabs seasoned with Old Bay spice before sailing down the Bay aboard a Formula 18 catamaran on a 128 nm course that will take you up the Potomac River finishing at Quantico, Virginia. 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 #2032
INFOby brainaid.de
Formula 18 catamaran Particulars
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking:
TRQ2 - TRCH - SYC
RACE CLOSE: Saturday,
23 May at 23:00 UTC
Race starts: May 10th 12:00 Registration Open!
▶ Flash
GO TO RACE

Tasmania to Kamchatka 2026

Welcome to yet another all-new route. Tasmania to Kamchatka, part of our Ocean Championship and also the third leg of the ROW (Round the Old World) series. Be aware of the obstacles on the way, likely to split the fleet. It's like X:mas to X:mas, crossing the same waters, navigating the same archipelagos. This second race of OCQ2 2026 will be sailed in our revised 'version 2' Imoca 60 Foil. Race #2031
INFO by brainaid.de
Imoca 60 Foil v2 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: OCQ2 - ROW - OCCH - SYC
Race starts: May 04th 11:00 Registration Closed
▶ Flash
GO TO RACE

Go to race archive

SYC Ranking

  1. Sailonline Yacht Club Member WRmirekd
  2. Sailonline Yacht Club Member CriticalHippo
  3. Sailonline Yacht Club Member Panpyc
  4. Sailonline Yacht Club Member rafa
  5. Sailonline Yacht Club Member CollegeFund
  6. Sailonline Yacht Club Member rumskib
  7. Sailonline Yacht Club Member KaSToR
  8. Sailonline Yacht Club Member bonknhoot
  9. Sailonline Yacht Club Member vida
  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