It's a 24 hour clock and I'm able to parse the times from a website in a hh:mm 24hr format.
This is the example of what I want it to do.
I'm having difficulty translating the hh:mm sunrise (e.g. 07:00) and sunset (e.g. 17:00) times into roundline Start and rotation angles so it maps to the clock.
I have the 24 hour hand working correctly though. Any help would be appreciated.
Here is the code:
Code: Select all
[Rainmeter]
SkinWidth=150
SkinHeight=200
AccurateText=1
[Metadata]
Author=Do
Name=sunrise
Information=
Version=1.3
License=Creative Commons
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[MeasureTime]
Measure=Time
[MeasureSunRise]
Measure=Plugin
Plugin=WebParser.dll
URL=https://www.metaweather.com/api/location/44418/
RegExp=(?siU)"sun_rise":"\d\d\d\d-\d\d-\d\dT(.*):\d\d\..*"sun_set":"\d\d\d\d-\d\d-\d\dT(.*):\d\d\.
StringIndex=1
UpdateRate=3600
[MeasureSunSet]
Measure=Plugin
Plugin=WebParser.dll
URL=https://www.metaweather.com/api/location/44418/
RegExp=(?siU)"sun_rise":"\d\d\d\d-\d\d-\d\dT(.*):\d\d\..*"sun_set":"\d\d\d\d-\d\d-\d\dT(.*):\d\d\.
StringIndex=2
UpdateRate=3600
[MeterNight]
Meter=Roundline
X=-125
Y=-103
W=400
H=400
AntiAlias=1
DynamicVariables=1
LineLength=26
LineStart=18
LineColor=4F5E8E
RotationAngle=(RAD(360))
StartAngle=(RAD(0))
Solid=1
UpdateDivider=-1
[MeterDay]
Meter=Roundline
X=-125
Y=-103
W=400
H=400
AntiAlias=1
DynamicVariables=1
LineLength=26
LineStart=18
LineColor=1DA8FF
RotationAngle=(RAD([MeasureSunSet]-[MeasureSunRise]))
StartAngle=((RAD(90+[MeasureSunRise])))
Solid=1
UpdateDivider=-1
[MeterHand]
Meter=Roundline
MeasureName=MeasureTime
X=-125
Y=-103
W=400
H=400
AntiAlias=1
LineLength=26
LineStart=18
RotationAngle=((RAD(360)))
StartAngle=(RAD(90))
LineWidth=1
LineColor=255,255,255
ValueRemainder=86400