Im using JDWS-03 weather skin and i would like to change wind speed to m/s because it easier understand that for me. Is it possible? edit file or something? thank you.
Would you provide a link where we can download this skin, so we can have a look?
Usually it's not too hard to change from km/h to m/s (by dividing it by 3.6) but we need to look at it.
Makezu wrote: ↑January 11th, 2023, 5:02 am
Im using JDWS-03 weather skin and i would like to change wind speed to m/s because it easier understand that for me. Is it possible?
If this is the skin you're talking about (and I do believe this is), you have to make a few updates in the code. For first as far as I can tell the only skin of this package which shows wind speed is the JDWS-03\Haelen\Haelen.ini skin, so all I write below is related to this skin. If there is any other as well, please try to make the same updates and if you don't succeed, let me know.
So, do the followings:
Add the following measure to the code of the @Resources\WeatherParser.inc file:
When the skin gets the wind speed expressed in km/h, this measures converts it in m/s.
Replace the Text option of the [CurrentWindSpeed] meter in the JDWS-03\Haelen\Haelen.ini file with this: Text=[mCurrentWindSpeedMPS] [mUnitsSpeed]. I also would add onemore thing, to get the speed with two decimals, because if you leave the option as posted above, you'll get lot of decimals and it doesn't look good. So try adding the number of decimals as well, for instance: Text=[mCurrentWindSpeedMPS:2] [mUnitsSpeed] (obviously this uses two decimals, but you adapt this to get the desired number).
Remove the UpdateDivider=-1 option of the [CurrentWindSpeed] meter of the JDWS-03\Haelen\Haelen.ini file (or replace it with UpdateDivider=1).
Finally replace the Substitute option of the [mUnitsSpeed] meter of the @Resources\WeatherParser.inc file with this: Substitute="^m$":"m/s", "^e$":"mi/h".
Note that if you did all this, when switching to imperial measure units (so to miles instead of km), the value shown in the skin will be wrong. If you want to use both systems, further improvements are needed. Please let me know if this is the case, for further guidance. But if not needed, I don't work with this.
Hope you get the result as you want. Do you get it?
Additional note: whenever are you asking for help, would be nice to post a link where we can download the skin you're having troubles with, because might be hard to find it. So you should help us to can easier help you.
SilverAzide wrote: ↑January 11th, 2023, 3:13 pm
"m/s" is "meters per second", which is what he is asking about.
So, if the wind is going 20 kph, the meters per second would be a fraction by 1000 so (EDIT) 0.02 mp/s. Seems odd to need that value - which is why I asked that question the way I did.
CodeCode wrote: ↑January 12th, 2023, 12:06 am
So, if the wind is going 20 kph, the meters per second would be a fraction by 1000 so (EDIT) 0.02 mp/s. Seems odd to need that value - which is why I asked that question the way I did.
Er, no... the conversion factor is not 1000. You didn't factor in the time. 20 km/h is: 20 / 3.6 = 5.56 m/s, as ikarus1969 and balala indicated.
SilverAzide wrote: ↑January 12th, 2023, 1:36 pm
Er, no... the conversion factor is not 1000. You didn't factor in the time. 20 km/h is: 20 / 3.6 = 5.56 m/s, as ikarus1969 and balala indicated.
balala wrote: ↑January 11th, 2023, 4:56 pm
If this is the skin you're talking about (and I do believe this is), you have to make a few updates in the code. For first as far as I can tell the only skin of this package which shows wind speed is the JDWS-03\Haelen\Haelen.ini skin, so all I write below is related to this skin. If there is any other as well, please try to make the same updates and if you don't succeed, let me know.
So, do the followings:
Add the following measure to the code of the @Resources\WeatherParser.inc file:
When the skin gets the wind speed expressed in km/h, this measures converts it in m/s.
Replace the Text option of the [CurrentWindSpeed] meter in the JDWS-03\Haelen\Haelen.ini file with this: Text=[mCurrentWindSpeedMPS] [mUnitsSpeed]. I also would add onemore thing, to get the speed with two decimals, because if you leave the option as posted above, you'll get lot of decimals and it doesn't look good. So try adding the number of decimals as well, for instance: Text=[mCurrentWindSpeedMPS:2] [mUnitsSpeed] (obviously this uses two decimals, but you adapt this to get the desired number).
Remove the UpdateDivider=-1 option of the [CurrentWindSpeed] meter of the JDWS-03\Haelen\Haelen.ini file (or replace it with UpdateDivider=1).
Finally replace the Substitute option of the [mUnitsSpeed] meter of the @Resources\WeatherParser.inc file with this: Substitute="^m$":"m/s", "^e$":"mi/h".
Note that if you did all this, when switching to imperial measure units (so to miles instead of km), the value shown in the skin will be wrong. If you want to use both systems, further improvements are needed. Please let me know if this is the case, for further guidance. But if not needed, I don't work with this.
Hope you get the result as you want. Do you get it?
Additional note: whenever are you asking for help, would be nice to post a link where we can download the skin you're having troubles with, because might be hard to find it. So you should help us to can easier help you.