Who uses mps for wind speed?

From the general public anyway. Surely kph would be a more sensible metric solution.

Anyway for my faces I use an expression that converts to mph if units set is metric given I use metric to have celcius for temperature. I thought I’d share:

(round($#UNITSYS#=IMPERIAL?#WND#:frowning:#WND#*2.237)$)) mph

3 Likes

Ha Ha. Mixed metric. What a mine field. Don’t start me off . We went metric in the UK in 1972 and still drive in mph. Intresting bit of maths in the middle of you formula. :slightly_smiling_face:. Please don’t change it just post a revision. Without testing it I am not certain what is supposed to be there. : : )

2 Likes

Oops

(round($#UNITSYS#=IMPERIAL?#WND#: (#WND#*2.237)$)) mph

The space should be removed when using of course.

Edinburgh here by the way.

The formula was just a result of me typing convert mps to mph in google.

2 Likes

Auld Reekie . Mum was a Stuart Dad was a Campbell : )
Nice work above .
Couple of unnecessary () but it works .
Next step to give a m/s ledged when you go metric up there .
I like to se my temp in Celsius, just double m/s so the Face is not mixed metric.
But I completely agree with you.
Your work your watch .

1 Like

you can use the backward quote for expressions on the forum:
` the expression `
(round($#UNITSYS#=IMPERIAL?#WND#:(#WND#*2.237)$))

2 Likes

imo, sometimes it is good for readability. I would write ((x/10)+5) even though (x/10+5) is the same

3 Likes

Nice one @ThaMattie .
I work like that all the time as The C++ I do for the Arduinos insists on it .
Thanks very much for the Backward Quote heads up but I can not find it .

#BLN# ’

Is it this one?

1 Like

no, it is the one on the top left of a keyboard, together with the ~ (on a standard US/international keyboard)


left from the 1

3 Likes

@ThaMattie

ha ha

(round($#UNITSYS#=IMPERIAL?#WND#:(#WND#*2.237)$)) mph

Never used that in my Life.

I am sure it was you that taught me where to find || on the Keyboard .

Thank you so very much for Being there .

2 Likes

In my reading on either the forums or Facer expression help I had seen that each individual maths operation should have its own parentheses. I shall do some testing though as reducing them will aid readability and maintenance.
I can’t see what could have been removed here though.

Good tip on the quotes.

1 Like

(#WND#*2.237)

I have been advised in the past to cut down on their use ;
At the end of the day it is what works.

1 Like

Facer’s own help seems to indicate that each maths expression needed to be enclosed though it is terse enough to be open to interpretation.

I’ve just tested it and it does work without. Previously I would have expeced $1+1=2?True:False$ to require (1+1) but apparently not.

Obviously there is still order of precedence to consider:
1+1*2=3
(1+1)*2=4
That’s just maths though, not syntax.

1 Like

Inside a conditional things are different I think.

Yes, inside conditionals you also need to be careful, because adding parentheses makes it a number, so True==True but (True)==1

And what seems to work in creator, doesn’t always work on all watches, there are differences between creator, the Android preview app, Tizen watches and WearOs watches, etc

1 Like

My most common, and hard to spot mistakes initially, have been copy paste of expressions where I miss or leave in a bracket or $.
The latter has been quite common when copying partial expressions to and from conditionals.

1 Like

If you want to preserve the formula, you can simply select it and hit this button:
obrázok
It adds the right quotes automatically

1 Like

((#BLN#)*3.6)

Well what a day for learning .

Thank you @petruuccios .

Every day’s a learning day here.

Thanks, to you all.

1 Like