I wanted to have a sunrise and a sunset icon on my dial which would track along the periphery of the dial. The sunrise icon has an upward pointing arrow and the sunrise icon has a downward pointing arrow. So their orientation needs to be maintained upright as they swing around the dial.
The locations use sunrise/sunset hour and sunrise/sunset minutes to determine the degrees (which are converted to radians for the sin and cos operations) and then multiplied for length and given 160 offsets, etc.
I created image elements with the following properties:
Sunrise Icon - “SunriseIcon.png” (40x40)
X Position: ((sin((rad(((#WRh#+(#WRm#/60))*30))))*150)+160)
Y: Position (160-(cos(rad(((#WRh#+(#WRm#/60))*30)))*150))
Width: 20
Height: 20
Rotation: 0
Opacity: $(#VAR_2#%2)==0?100:0$
Sunset Icon - “SunsetIcon.png” (40x40)
X Position: ((sin((rad(((#WSh#+(#WSm#/60))*30))))*150)+160)
Y: Position (160-(cos(rad(((#WSh#+(#WSm#/60))*30)))*150))
Width: 20
Height: 20
Rotation: 0
Opacity: $(#VAR_2#%2)==0?100:0$
The opacity is optional (you can just use 0), but I turn the display of these icons on/off by toggling #VAR_2#.
The math is based on center point rotation (160,160) and then to move them in a bit, I use 150 (not 160) when I multiply the degree/radian values into pixels (lengths).
I struggled all day with this, hopefully by posting it this will be easy-peasy for someone else!