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:

Tall Ships Races 2025 - Le Havre to Dunkirk


Welcome to the first of four virtual Tall Ships Races in European waters which are concurrently being organized in-real-life by Sail Training International . The course for this first race is between the French ports of Le Havre and Dunkirk; circa 125nm in Sailonline’s magnificent 90m Barque.
NOTE: Starts and Finishes in tall ships racing are always offshore to avoid conflict with shipping and shipping lanes; online and real-life may not match exactly.
Race #1923
INFO by brainaid.de
Barque 90m PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: TS - SYC
Race starts: Jul 07th 16:00 Registration Open!
▶ Flash
GO TO RACE

Red Eye - Key Lime Pie-gatta 2025

Opposite the Bahamas at the tip of the Florida peninsula, we find the Florida Keys, a honky-tonk arpeggio of islands, where another SOL classic, the Key Lime Pie-gatta, so-called after the famous local condensed-milk-based tart speciality, awaits to be navigated once again. We’ll race its “Red Eye” 180nm in very-American Santa Cruz 52s, ignoring such artefacts as bridges, causeways and piers joining the keys one to the other and to the mainland!
Race #1846
INFOby brainaid.de
Santa Cruz 52 PARTICULARS
NAM_AWIP WX Updates:
0245 / 0845 / 1445 / 2045
Ranking: SYC - RED
Race starts: Jul 02nd 12:00 Registration Open!
▶ Flash
GO TO RACE

Sail Around Turkey 2025


Welcome to the 11th running of one of Sailonline's most iconic races, where our fleet races the length of the Turkish coastline from Hopa (the easternmost harbour on Turkey’s Black Sea coast) to Iskenderun (the easternmost harbour on Turkey’s Mediterranean coast). It’s a 1,372nm race and aboard our classic, 1st decade of the 21st Century, version 2 IMOCA 60, you should be able to get around the course in less than a week. That is if, of course, once you get out of the Black Sea you don’t stop to enjoy the sights or a BBQ or two in the Golden Horn, or on the Marble Islands, now land-locked Troy or Gallipoli or any of the myriad Aegean islands, that you shall have to carefully navigate past.
Race #1930
INFOfrom brainaid.de
IMOCA 60 v2 PARTICULARS
WX Updates:
0430 / 1030 / 1630 / 2230
Ranking: SYC
Race starts: Jun 27th 15:00 Registration Open!
▶ Flash
GO TO RACE

Go to race archive

SYC Ranking

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

View full list

Series

Mobile Client

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

The mobile client