New version should say 4.0 nowjminternelia wrote:Muchos Gracias.
It is currently September 15th, 2024, 8:15 am
Wind Speed and Direction V1.1.0 Updated
-
- Posts: 858
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Wind Speed and Direction V1.1.0 Updated
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 65
- Joined: March 21st, 2017, 3:46 am
Re: Wind Speed and Direction V1.1.0 Updated
Ok, I'm gonna go for noob, but I am trying to reconfigure this with some alternate assets, and I can't figure it out.CyberTheWorm wrote:Will work fine in 4.0, I was testing 4.1 and forgot to change the version number. Will re-upload it
My arrow is wayyy too big. It is worth noting that the W and H for the compass are set to the size I want in the code. I tried this on the arrow also but has no effect on the arrow. Even still, before I changed W and H, I could get the (new) arrow lined up perfect in one in instance. I created a calc measure to change the direction parameter to test and quickly realized something about my arrows axis is off.
What I am trying to do:
https://mega.nz/#!UYYl1IyT!wsJYdKfeibfgFId7d2tRWTyMLi1cleJMkDQEuzqQ6X8
Can you give me some pointers?
-
- Posts: 858
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Wind Speed and Direction V1.1.0 Updated
Looks like the offset are not correct for the hand. I would play around with the Y offset to get it to move down
Try adding that for hand2
Code: Select all
X=190
Y=190
OffsetX=0
OffsetY=6
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 858
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Wind Speed and Direction V1.1.0 Updated
I played with your code and the above will rotate it correctly.
X=<Image width/2>
Y=<Image width/2>
The only thing off was the Y offset
X=<Image width/2>
Y=<Image width/2>
The only thing off was the Y offset
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 858
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Wind Speed and Direction V1.1.0 Updated
Code: Select all
[MeterHand]
Meter=Rotator
MeasureName=MeasureDirection
ImageName=#@#Images\arrow
X=190
Y=190
W=5
H=5
OffsetX=200
OffsetY=181
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
ValueRemainder=360
X and Y is the initial position of the image (top left of the image as that point), Offset is the point the image rotates around.
That will rotate it but you will still need to play with it to get it looking the way you want.
If you scale the arrow image by 50% size and change Offset X and Y to 90 you will get an arrow that fits in the circle.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 65
- Joined: March 21st, 2017, 3:46 am
Re: Wind Speed and Direction V1.1.0 Updated
I left hand 2 in there just as a guide. Are W and H not usable to resize my hand? I dont need it to git in the circle, rather just need to inner portion of the pointer to rest on the inner edge of the circle.
I was way overthinking this. What I wound up doing instead was just eliminating the [MeterCompas] altogether, combining my arrow and compass, so that the entire image rotates. Not quite as dynamic, but fits with what I am trying to do.
I was way overthinking this. What I wound up doing instead was just eliminating the [MeterCompas] altogether, combining my arrow and compass, so that the entire image rotates. Not quite as dynamic, but fits with what I am trying to do.
-
- Rainmeter Sage
- Posts: 5512
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Wind Speed and Direction V1.1.0 Updated
You found an answer, but with modified images, you can get your initial effect.
Comp3.png
Arrow3.png
Code: Select all
[MeterCompas]
Meter=Image
ImageName=#@#Images\Comp3.png
X=0
Y=0
w=380
h=380
[MeterHand]
Meter=Rotator
MeasureName=MeasureDirection
ImageName=#@#Images\arrow3.png
W=380
H=380
OffsetX=190
OffsetY=190
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=360
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 65
- Joined: March 21st, 2017, 3:46 am
Re: Wind Speed and Direction V1.1.0 Updated
Aye. I wound up figuring out how to do what I wanted to begin with. I just made the two images the same size, Lined them up in GIMP and subtracted them from each other, then overlaid them.eclectic-tech wrote:You found an answer, but with modified images, you can get your initial effect.Comp3.pngComp3.pngCode: Select all
[MeterCompas] Meter=Image ImageName=#@#Images\Comp3.png X=0 Y=0 w=380 h=380 [MeterHand] Meter=Rotator MeasureName=MeasureDirection ImageName=#@#Images\arrow3.png W=380 H=380 OffsetX=190 OffsetY=190 StartAngle=4.7124 RotationAngle=6.2832 ValueRemainder=360 DynamicVariables=1
Arrow3.pngarrow3.png
Code: Select all
[Rainmeter]
Update=1000
DynamicVariables=1
DynamicWindowSize=1
ContextTitle=Use Imperial
ContextAction=[!WriteKeyValue Variables UnitOfMeasure i][!Refresh]
ContextTitle2=Use Metric
ContextAction2=[!WriteKeyValue Variables UnitOfMeasure m][!Refresh]
[Metadata]
Author=CyberTheWorm, Modified by 12A!N
Version=1.1.0 Modified
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
;-------------------- Variables ----------------------
[Variables]
; CityCode can be obtained at https://openweathermap.org/
CityCode=4393217
; LocationCode can be obtained at http://wxdata.weather.com/wxdata/search/search?where=YourCityName
LocationCode=USKS0298
; UnitOfMeasure can be "i" (Imperial / Fahrenheit) or "m" (Metric / Celsius)
UnitOfMeasure=i
; Locale (language) to use in the feed.
; https://msdn.microsoft.com/en-us/goglobal/bb896001.aspx
; Note that Weather.com uses "_" underline instead of "-" dash in the codes.
Locale=en_US
;To get an API key you need to sign up it's free
APIKey=060a7f4e2eee29acb3e92bca54a697c2
WebSite=https://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=1&locale=#Locale#
WebSite2=http://api.openweathermap.org/data/2.5/weather?id=#CityCode#&mode=xml&units=#UnitOfMeasure#&appid=#APIKey#
;-------------------- Measures ----------------------
[MeasureValues]
Measure=Plugin
Plugin=WebParser
URL=#WebSite#
RegExp=(?siU)<us>(.*)</us>.*<s>(.*)</s>.*<d>(.*)</d>
;Update every 15 mins
UpdateRate=9
[MeasureValues2]
Measure=Plugin
Plugin=WebParser
URL=#WebSite2#
RegExp=(?siU).*<city id="(.*)".*name="(.*)".*<sun rise="(.*)".*set="(.*)".*<temperature value="(.*)".* min="(.*)".*max="(.*)".*unit="(.*)".*<humidity value="(.*)".*<pressure value="(.*)".*unit="(.*)".*<speed value="(.*)".*name="(.*)".*<direction value="(.*)".*code="(.*)".*<clouds value="(.*)".*name="(.*)".*<weather number=.*value="(.*)".*icon="(.*)".*<lastupdate value="(.*)"
;Update every 15 mins
UpdateRate=900
[MeasureSpeedUnit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureValues]
StringIndex=1
[MeasureWindSpeed]
Measure=Plugin
Plugin=WebParser
URL=[MeasureValues]
StringIndex=2
[MeasureWindDirection]
Measure=Plugin
Plugin=WebParser
URL=[MeasureValues]
StringIndex=3
[MeasureWindDirection2]
Measure=Plugin
Plugin=WebParser
URL=[MeasureValues2]
StringIndex=15
[MeasureCalm]
Measure=Calc
Formula=MeasureWindSpeed
IfCondition=(MeasureCalm>0)
IfTrueAction=[!SetOption MeterWind Hidden 0][!UpdateMeter "MeterWind"][!Redraw]
IfFalseAction=[!SetOption MeterWind Hidden 1][!UpdateMeter "MeterWind"][!Redraw]
[MeasureCalmHand]
Measure=Calc
Formula=MeasureWindSpeed
IfCondition=(MeasureCalmHand>0)
IfTrueAction=[!SetOption MeterHand Hidden 0][!UpdateMeter "MeterHand"][!Redraw]
IfFalseAction=[!SetOption MeterHand Hidden 1][!UpdateMeter "MeterHand"][!Redraw]
[MeasureWindName]
Measure=Plugin
Plugin=WebParser
URL=[MeasureValues2]
StringIndex=13
Substitute="Gentle":"Moderate"
[MeterWindSpeed]
Meter=String
MeasureName=MeasureWindSpeed
MeasureName2=MeasureSpeedUnit
X=5
Y=5
FontColor=130,209,222
FontFace=earth orbiter
FontSize=15
AntiAlias=1
StringAlign=Left
Text=%1 %2
[MeterWindName]
Meter=String
MeasureName=MeasureWindName
X=200
Y=5
FontColor=130,209,222
FontFace=earth orbiter
FontSize=15
AntiAlias=1
StringAlign=Center
Text=%1
[MeterWindDirection]
Meter=String
MeasureName=MeasureWindDirection2
X=395
Y=5
FontColor=130,209,222
FontFace=earth orbiter
FontSize=15
AntiAlias=1
StringAlign=Right
Text=%1
[MeterX2uiCompass]
Meter=Image
ImageName=#@#Images\X2uiCompass
X=0
Y=0
[MeterX2uiPointer]
Meter=Rotator
MeasureName=MeasureWindDirection
ImageName=#@#Images\X2uiPointer
ImageFlip=Both
X=195
Y=195
OffsetX=195
OffsetY=195
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
ValueRemainder=360
-
- Rainmeter Sage
- Posts: 5512
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Wind Speed and Direction V1.1.0 Updated
Yeah, making the graphics 'match' each other simplifies the Rotator coding. We all sometimes overthinking things
Using UpdateRate=9 in [MeasureValues] is hitting weather.com every 9 seconds and may get you blocked
Might want to change that to match your other webparser, or use the default value (600).
Using UpdateRate=9 in [MeasureValues] is hitting weather.com every 9 seconds and may get you blocked
Might want to change that to match your other webparser, or use the default value (600).
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::