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
To get accurate roll data, you need a leftward-facing and an upward-facing sensor. Use 2 input arctangent here, like "atan2(left,up)". Output will be in radian, input can be direct from tilt sensor.
Lua's math.atan function can take 2 arguments just like the atan2 function in the function blocks.
Looks good on boat feeding a gauge turned vertical with a constant number to the second red line as a warning that its time to worry about touching bottom.
However, it shouldn't matter if these are pointing left/right or forward/backwards for this, as a 15 degree left roll and a 15 degree right roll have the same effect. Likewise for pitch.
(for completeness, I have the altimeter next to the laser emitter)