It is currently March 29th, 2024, 12:41 pm

Is it possible change wind speed from km/h to m/s?

Get help with creating, editing & fixing problems with skins
Makezu
Posts: 5
Joined: January 11th, 2023, 4:57 am

Is it possible change wind speed from km/h to m/s?

Post by Makezu »

Hi

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. :)
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Is it possible change wind speed from km/h to m/s?

Post by ikarus1969 »

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.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible change wind speed from km/h to m/s?

Post by CodeCode »

Without looking it up. I am not sure your request is what I reads like.

kilometers per hour and miles per second is a big stretch of values to what weather feeds spell out for metric and Imperial measuring systems.

You want imperial miles per HOUR? The would make much more sense. Otherwise the formulas would be completely different than what weather feeds report.

So, if Kph to mph is what you meant then there are a few ways to figure it out.

Please let us know if this is actually what you meant.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Is it possible change wind speed from km/h to m/s?

Post by SilverAzide »

CodeCode wrote: January 11th, 2023, 12:23 pm Without looking it up. I am not sure your request is what I reads like.

kilometers per hour and miles per second is a big stretch of values to what weather feeds spell out for metric and Imperial measuring systems.

You want imperial miles per HOUR? The would make much more sense. Otherwise the formulas would be completely different than what weather feeds report.

So, if Kph to mph is what you meant then there are a few ways to figure it out.

Please let us know if this is actually what you meant.
"m/s" is "meters per second", which is what he is asking about.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is it possible change wind speed from km/h to m/s?

Post by balala »

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:

    Code: Select all

    [mCurrentWindSpeedMPS]
    Measure=Calc
    Formula=( mCurrentWindSpeed / 3.6 )
    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.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible change wind speed from km/h to m/s?

Post by CodeCode »

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.
:oops:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Is it possible change wind speed from km/h to m/s?

Post by SilverAzide »

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.
:oops:
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.
Gadgets Wiki GitHub More Gadgets...
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible change wind speed from km/h to m/s?

Post by CodeCode »

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.
Ok.
:thumbup:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
Makezu
Posts: 5
Joined: January 11th, 2023, 4:57 am

Re: Is it possible change wind speed from km/h to m/s?

Post by Makezu »

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:

    Code: Select all

    [mCurrentWindSpeedMPS]
    Measure=Calc
    Formula=( mCurrentWindSpeed / 3.6 )
    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.
Thank you so much! 👍🙂
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is it possible change wind speed from km/h to m/s?

Post by balala »

Makezu wrote: January 15th, 2023, 9:17 pm Thank you so much! 👍🙂
So, I assume you don't use imperial units, just metric? If you really don't I'm glad if you got it working.