Hi, this is the design i’m working on.
The sun rises at sunrise and sets at sunset.
The moon rises when the sun sets and, it sets when the sun rises.
I have a problem with a condition expression to move the moon, in the editor it works well but when i try it on my smartwatch it doesn’t works.
Let me know if it works for you.
anyway it moves slowly so, u must check at different hours to see if it change position or not
Thank you.
Facer - Thousands of FREE watch faces for Apple Watch, Samsung Gear S3, Huawei Watch, and more
Cool idea.
On my ipad ( running Chrome ) the moon rotates ok but no sign of the sun.
The sky ( Milkyway image ) is rotating anti-clockwise about once a minute and in opposite direction to the Moon. Not that it realy matters of course, but the stars and moon actually appear to move across the sky in the same direction ( albeit that the moon is “moving” just perceptibly slower by ~ 24/29.5 of a revolution per day ).
Now i fixed expression for Sun and moon and it must works.
The sky now is rotating clockwise like the moon and 2x slower as before, so once every 2 minutes.
The movement of the moon is not realistic cause it rises when sun sets and it sets when sun rises but it’s a choice that i made to have or sun or moon in the sky.
I have to choose if use that hand or change it with a like a circle pointer running on tickmarks.
Yes, that all seems to work now. Well done on a very interesting design!
I can’t understand…i updated it and now it works in browser preview but not on my watch if i sync it
If you can post your expressions or activate the inspection mode I will have a look and see if I can spot something.
What watch do you have?
I have Ticwatch express.
These are the expression for rotation of
MOON
$#WSH#*60+#WSm#>#DH#*60+#Dm#&&#DH#*60+#Dm#>#WRH#*60+#WRm#?200:(#DH#<12?(285+(240/(1440-#WSm#+#WRm#-(#WSH#-#WRH#)60))(59-#WSm#+(23-#WSH#)*60+#Dm#+(#DH#)*60)):(285+(240/(1440-#WSm#+#WRm#-(#WSH#-#WRH#)60))(#Dm#-#WSm#+(#DH#-#WSH#)*60)))$
SUN
$#WSH#*60+#WSm#>#DH#*60+#Dm#&&#DH#*60+#Dm#>#WRH#*60+#WRm#?(105+(240/(#WSm#-#WRm#+(#WSH#-#WRH#)60))(#Dm#-#WRm#+(#DH#-#WRH#)*60)):45$
I know, it’s a bit confusing
The problem is that in preview on browser it works but when I sync it on watch, the moon stuck in the sky and the sun under earth
#WSH#60+#WSm#>#DH#60+#Dm#&&#DH#60+#Dm#>#WRH#60+#WRm# is the same as #DISDAYTIME#=true but I used this cause it also works in browser preview and disdaytime don’t works in preview
Ok. I think you may have syntax errors in the expression. I think that it might be a problem to forego the ‘*’ symbol in the expression.
That is, #WSH#60 should be #WSH#*60 etc.
No, I didn’t miss *, I don’t know why but it didn’t be copied
Ok, sorry, I’ll look deeper into the expression …
Mmm, nested conditionals …
I have not tried these myself but others have had success. However, I think that they use slightly different syntax…
$ test1 ? value1_if_true : $ $ test2 ? value2_if_true : value_If_false $
…
Alternatively, you could split the nested conditionals into two separate single conditional statements…
for moon:
- if daytime then transparency = 0, else it = 100
- rotation: as per the second conditional statement in your expression
This thread might also be of some help…
About midway down the thread there is a discussion about how to do something similar to what you are doing.
Ok, thank you so much I’ll have a look when I have time! Really appreciate.
Can u maybe try it on your smartwatch to see if the problem is only with my ticwatch or if it works just on browser and is not working on every smartwatch, please?
It might start appear the sun at sunrise and finish disappear at sunset, and the moon must be in sky when the sun isn’t.
Ty in advance
Finally i got it working, and i also understood many thing about math expressions and conditionals.
It was a bracket problem.
I understood that math expressions ALWAYS wants brackets, also in conditions, and at the same time operators like =, >, <, >=, <=, != and boolean operators like || and && NEVER wants brackets.
So for example
$1<2?100:0$ correct
$(1)<(2)?100:0$ correct
$(1+4)<(2-1)?100:0$ correct
$(2*(5-2))<=(3-2)&&(4*6)!=(6-3)?100:0$ correct
$(1<2)?100:0$ wrong
$1+2<2+5?100:0$ wrong
$(13<2+3&&3<4)?100:0$ wrong
$((13)<(2+3)&&3<4)?100:0$ wrong
$((13)<(2+3))&&(3<4)?100:0$ wrong
$(((13)<(2+3))&&(3<4))?100:0$ wrong
Hope someone likes my design now that fully works
I am glad you figured it out.
Well done on sticking with it and getting it working!