Problem: temperature C/F rotational

Hi, i have problem. I want to build a rotational temperature dial but i can´t get it to run (my brain already hurts).

It should work in both celsius and Fahrenheit.

The celsius dial matches exactly in conversion to the fahrenheit one as shown in the middle.

I will change the displays automatically with \$#WM#=F?100:0\$ and \$#WM#=C?100:0\$.

Anyone a solution/formula ? All sort of help would be appreciated a lot.

Greetings, GAUSS.

1 Like

Celsius:

Temperature range: 90 C
Angle range: 270 deg

Scale factor: 270 / 90 = 3 deg per 1 C

Uncorrected angle: (#WCT#*3)

Correction for minimum temp ( -40 C at -133.5deg ) : -133.5 - ( -40 x 3 ) = -13.5 deg

So, rotation: ((#WCT#*3)-13.5)

Test:
-40 C -> ( -40 x 3 ) - 13.5 = -133.5
0 C > ( 0 x 3 ) - 13.5 = -13.5
50 C -> ( 50 x 3 ) - 13.5 = 136.5

Fahrenheit:

Temperature range: 164
Angle range: 280 deg

Scale factor: 280 / 164 = 1.707 deg per 1F

So uncorrected angle: (#WCT#*1.707)

Correction for minimum temp ( -42 at -140deg ) : -140 - ( -42 x 1.707 ) = -68.3 deg

So, rotation: ((#WCT#*1.707)-68.3)

Test:
-42 F -> ( -42 x 1.707 ) - 68.3 = -140
40 F > ( 40 x 1.707 ) - 68.3 = 0
50 F -> ( 122 x 1.707 ) - 68.3 = 140

I hope that helps.

3 Likes

Great! Thanks for the help, i Will test today!

1 Like

You are most welcome - I hope it works

As far as i can see it seems to work perfect! You made my day!

1 Like

Cool!

Hi @GAUSS

I’m working on a watchface that includes almost same feature, half circle temperature gauge not full circle

Do you mind if I use the formulas provided by @mikeoday as well as the opacity formulas you used \$#WM#=F?100:0\$ and \$#WM#=C?100:0\$?

If you do I will remove the feature or find a different approach

1 Like

For sure you can use his formula and mine as well.

2 Likes

BTW: That´s the watch face (in progress) matching to the temperature dial:

Working Title: GAUSS-Outdoor

3 Likes

That is wonderfully complex design! I like it!

1 Like

Thank you @GAUSS & @mikeoday for your support

This is indeed a complex and very nicely detailed design… thumbs up

1 Like

Thanks.

1 Like

very good

1 Like

hi i need some help, i am seriously not good at math, as would be the tag for this look, help

You could try

``````\$#WM#==F?(170-(clamp(#WCT#,32,104)*2.5)):(90-(clamp(#WCT#,0,30)*6))\$
``````

edit: Sorry the above expression has an error in the fahrenheit part, it should be

``\$#WM#==F?(196.66-(clamp(#WCT#,32,86)*3.333)):(90-(clamp(#WCT#,0,30)*6))\$``

hi, what a complex code! seems to be right on my face, I will test during the week, because the temperature is bad to test! I only use degrees C, at the moment thank you very much for your help, I’m from Curitiba Pr, Brazil

1 Like

You are most welcome - hopefully it will work ok on your watch.

1 Like

Hi Mikeoday! By abusing your good will, you can recalculate the temperature from 0 to 40 degrees, because the coloration from 0 to 30 was strange, as the movement was great!

1 Like

I think this will work

``\$#WM#==F?(170-(clamp(#WCT#,32,104)*2.5)):(90-(clamp(#WCT#,0,40)*4.5))\$``
1 Like

muito bom, obrigado novamente, nota 10

1 Like