SRS wrote me:
I have no idea what Beaufort is ... but you can do basic integer arthimetic using variables in todayplus, so you should be able to convert from one unit to another.But I'm not so good in 'basic integer arthimetics'. Therefore my question to this forum:
What are the lines in a skin to get
Beaufort (instead of Mph)?
Some information:0 Beaufort = under 1
1 Beaufort = 1 - 3 MPH
2 Beaufort = 4 - 6 MPH
3 Beaufort = 8 - 12 MPH
4 Beaufort = 13 - 18 MPH
5 Beaufort = 19 - 24 MPH
6 Beaufort = 25 - 31 MPH
7 Beaufort = 32 - 38 MPH
8 Beaufort = 39 - 46 MPH
9 Beaufort = 47 - 54 MPH
10 Beaufort = 55 -63 MPH
11 Beaufort = 64 - 74 MPH
12 Beaufort = 75 and higher[/color]
I'm guessing you'll need a pig-load of if statements, just like for the battery meter stuff. i.e
<pseudocode>
if MPH 1 <> 3
beaufort=1
etc...
</pseudocode>
Quote from: MadTxnI'm guessing you'll need a pig-load of if statements, just like for the battery meter stuff. i.e
<pseudocode>
if MPH 1 <> 3
beaufort=1
etc...
</pseudocode>
MadTxn,
I've tried the following lines in my slider. But with thes lines, my screen freezened. Can you see what is wrong?
////////////////////////////////////
////////////////////////////////////
// Change Mph --> Beaufort //
////////////////////////////////////
////////////////////////////////////
calcvar,var40,windspeed
if,var,var40,,<,1
storevar,var40=0
else
if,var,var40,,<,4
storevar,var40=1
else
if,var,var40,,<,8
storevar,var40=2
else
if,var,var40,,<,13
storevar,var40=3
else
if,var,var40,,<,19
storevar,var40=4
else
if,var,var40,,<,25
storevar,var40=5
else
if,var,var40,,<,32
storevar,var40=6
else
if,var,var40,,<,39
storevar,var40=7
else
if,var,var40,,<,47
storevar,var40=8
else
if,var,var40,,<,55
storevar,var40=9
else
if,var,var40,,<,64
storevar,var40=10
else
if,var,var40,,<,75
storevar,var40=11
else
if,var,var40,,>,74
storevar,var40=12
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
/////////////////////////////////////////////
////////////////////////////////////////////
var,var40,175,36,, Beaufort,l
[/color]
Timmy,
Just curious: have you tried to display var40 just after the command
"calcvar,var40,windspeed"?
I have tried but it always returns 0 for me.
TransFXB
First, I wouldn't change var40, I would use a different var, i.e.
if,var,var40,,<,1
storevar,var41=0
else...
Second, I think instead of
var,var40,175,36,, Beaufort,l
you want
text,%var40%,175,36,, Beaufort,l
I don't think, you can get a working value with the calcvar-command,
as it is restricted to only some of the system-values (take a look in the
skin-reference) but as it would be nice to also change the mph to metric
values (kmh) you could make a request in the "feature requests".
Greetings Broesel
Broesel, this is exactly what I think.
This is why i have asked above :
Quotehave you tried to display var40 just after the command
"calcvar,var40,windspeed"?
TransFXB
The last thing I've tried, are the following lines. But it did't work either. Who knows the solution???
///////////////////////////////////
// Change Mph --> Beaufort //
///////////////////////////////////
calcvar,var40,windspeed
if,var,var40,,<,1
var41=0
else
if,var,var40,,<,4
var41=1
else
if,var,var40,,<,8
var41=2
else
if,var,var40,,<,13
var41=3
else
if,var,var40,,<,19
var41=4
else
if,var,var40,,<,25
var41=5
else
if,var,var40,,<,32
var41=6
else
if,var,var40,,<,39
var41=7
else
if,var,var40,,<,47
var41=8
else
if,var,var40,,<,55
var41=9
else
if,var,var40,,<,64
var41=10
else
if,var,var40,,<,75
var41=11
else
if,var,var40,,>,74
var41=12
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
text,175,36,,%var41% Beaufort,l
I need to know how to solve this problem, before I start the next feature: an imagemeter with the beaufort-scale. On the forehand, I've made the corresponding ping (see below). I try to let it work like the moonphase imagemeter.
Timmy,
As stated above, the basic problem is that 'calcvar,var40,windspeed' will return nothing. windspeed is not part of the possible system values that can be used, as far as I know.
I ask again : have you tried to simply write/display what is in var40 just after the command calcvar,var40,windspeed ?
I guess not. That's the point.
TransFXB
Quote from: TransFXBAs stated above, the basic problem is that 'calcvar,var40,windspeed' will return nothing. windspeed is not part of the possible system values that can be used, as far as I know.
I ask again : have you tried to simply write/display what is in var40 just after the command calcvar,var40,windspeed ?
I guess not. That's the point.
TransFXB
TransFXB, isn't there realy any possebility to 'get' the windspeed, and to do something with it? (I'm almost sure there must be a way, but I do not see it...)
Timmy,
I have tried earlier to do what you are trying to do.
In my case, it was to convert mph to km/h.
I like very much your Beaufort idea (I am a sailor sometimes) but it basically requires the same input as for the mph to km/h.
I have not been succesfull to get this 'windspeed' by any mean.
This doen't mean that it is not possible but I really don't know how.
I think this deserves a request for feature!!
TransFXB
Quote from: TransFXBTimmy,
I have tried earlier to do what you are trying to do.
In my case, it was to convert mph to km/h.
I like very much your Beaufort idea (I am a sailor sometimes) but it basically requires the same input as for the mph to km/h.
I have not been succesfull to get this 'windspeed' by any mean.
This doen't mean that it is not possible but I really don't know how.
I think this deserves a request for feature!!
TransFXB
Thanks, TransFXB,
I'll follow your advice, and bring it in the forum 'Feature requests'.