• Administrator
  •  
    Support Ukraine
    If you experience any problems with the forum (it is not visible, there is no way to post messages, or some functionality does not work), please let us know. If you have problems with registration or you did not receive confirmation letter, let us know and we will activate your account manually.
    If you get an "The submitted form was invalid. Try submitting again" error, delete cookies, then try again.
     

Mars Time or other different day lengths

Topics related to the creation, development, and designing of the watch faces.

Moderators: asoo, Watchmens

Forum rules
When adding a new topic, use the template: Topic title [device name]
For example: How to create watch face [GTR 3 Pro]
All communication in this branch should only be in English.
Post Reply
smith725
WF maker
Posts: 14
Joined: 22 Oct 2021, 23:18
Location: Canada
Been thanked: 1 time
Contact:

Mars Time or other different day lengths

Post by smith725 »

I am looking to try and create a "Mars time" watch for my GTR 3 Pro. However, Mars time has a different length of day, equal to 24:37:22 earth hours per Mars day. Now - not surprisingly - I did not see any options in the tools for my GTR 3 Pro to make a face with a different length of day.

Are there any suggestions on how to do this? Do I need to dive down into what I think is more detailed scripting/programming to make this happen?
User avatar
SashaCX75
Posts: 820
Joined: 26 Oct 2019, 15:18
Location: Ukraine
Has thanked: 13 times
Been thanked: 1029 times
Contact:

Post by SashaCX75 »

The editors don't allow you to do that. You need to write your own code to get the result you want.
smith725
WF maker
Posts: 14
Joined: 22 Oct 2021, 23:18
Location: Canada
Been thanked: 1 time
Contact:

Post by smith725 »

That is sort of what I was expecting, unfortunately :-( Thank you for the clarification.

Is there a possible hint - when you say "write your own code" is this the construction I see in some of the really capable watch faces, with specially written Javascript files (and .. PNG files that seem to be different and readable???), or is this more in the way of needing to create a whole ZeppOS application? Any build tool names that might be a starting point for research?
User avatar
SashaCX75
Posts: 820
Joined: 26 Oct 2019, 15:18
Location: Ukraine
Has thanked: 13 times
Been thanked: 1029 times
Contact:

Post by SashaCX75 »

It all depends on what you want to get in the finished watch face. Most of the elements can be done in the editor. Then add code to the dial to display the time as you want. If you display it in text, it's easier. If it's a set of pictures, it's more complicated.
smith725
WF maker
Posts: 14
Joined: 22 Oct 2021, 23:18
Location: Canada
Been thanked: 1 time
Contact:

Post by smith725 »

Follow-up -- success!

I found that I could modify the calculation code for the GTR 3 Pro specialized analog display, and so leverage the existing display of hands. The key was finding that the sensor API returns a standard "1970/1/1 epoch" value, which serves as a stable starting point for the calculation.

https://amazfitwatchfaces.com/gtr/view/36370
User avatar
SashaCX75
Posts: 820
Joined: 26 Oct 2019, 15:18
Location: Ukraine
Has thanked: 13 times
Been thanked: 1029 times
Contact:

Post by SashaCX75 »

I couldn't understand why you use timeSensor.utc instead of the simpler timeSensor.second until I read the description of the watch face. Unusual watch face. I think creating this watch face was a good mental workout, but not many people will be interested in it.

If you want to modify the watch face longer I can recommend this idea. Swap the earth and mars. When you click on mars, switch between mars and the rest of the planets (and maybe the moon). I am not good at astronomy, so I don't know how relevant it is to calculate the time for the other planets or the moon.
Post Reply

Return to “Watchfaces discussion”

Who is online

Users browsing this forum: No registered users and 1 guest