$windlabel = array ("N","NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S","SSW","SW", "WSW", "W", "WNW", "NW", "NNW");$dir = $windlabel[ fmod((($winddir + 11) / 22.5),16) ];
Degrees To Compass Dir
A1: Variable Set [ Name:%compass To:N,NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW Do Maths:Off Append:Off ]
A2: Variable Split [ Name:%compass Splitter:, Delete Base:Off ]
A3: Variable Set [ Name:%angle To:-45 Do Maths:On Append:Off ]
A4: Variable Set [ Name:%index To:((floor( (%angle + 11.25) / 22.5)) % 16 + 16) % 16 + 1 Do Maths:On Append:Off ]
A5: Flash [ Text:%compass(%index) Long:Off ]
Should allow any angle (+/- infinite).
Matt
I'd like to add a direction heading to my car dock and this would be perfect, but how are you getting the data from the compass into Tasker?
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/MH1QH3dATsc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
Use the car dock event. I know I saw one.