Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Copy/paste that into a function block, with the compass sensor being the X input, your output will be a 0-360 degree.
The formula above works fine, a more compact version would be:
Converts the compass -0.5 to 0.5 into 0-360 degree angle.
atan2 also returns radians from 0 to 2pi, so you might have something mixed up when you state it returns 0-360 degrees.
I had the system set up and working so I had indicated course 180 when spawned facing south at the creative island. Happy with it. Then I broke out the section grid tool and started piling my logic up on the deck to start compressing it all into smaller microcontrollers. I sectioned out the compass sensor block and slapped it down vertrically and 90 degrees off the way I had it earlier and it threw the compass off.
Be sure the compass block lays flat (glass up) and the blue arrow is pointing towards the azimuth you wish to read.
I think your compass is not pointed in the right direction.