It is currently April 25th, 2024, 2:18 am

Updated Image of Spinning Earth

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Updated Image of Spinning Earth

Post by balala »

ikarus1969 wrote: December 18th, 2018, 5:09 am For this i have the "UpdateMeter" in the "FinishAction" of the WebParser measure.
Unfortunately the previously described problem indeed exists: if you're using ImageName on Image meter and aren't adding the DynamicVariables=1 option to the Image meter, the image is shown, but never updated. Once an image loaded, it is static and doesn't update, even if you're using the mentioned FinishAction on the parent WebParser measure (due what is described into the Note here). I think I repeat myself, when I say there are two solutions:
  • Add a DynamicVariables=1 option to the Image meter.
  • Use a MeasureName option instead of ImageName on the Image meter (which doesn't require to set the dynamic variables).
Me personally always would prefere the second solution, but it's not mandatory. It's up to you which one do you choose.
User avatar
GTI.H
Posts: 75
Joined: December 15th, 2018, 3:35 am

Re: Updated Image of Spinning Earth

Post by GTI.H »

balala wrote: December 18th, 2018, 4:28 pm Ok, post please the whole code, because it isn't complete.
I do not believe this helps anything, but here it is:

Code: Select all

[MSSun]
Measure=Calc
; Formula=-23.45*Cos(Rad(360/365*((MSClockDayYearNumber-1)+10)))
; Error -> (More accurate) Formula=Asin(Rad(Sin(Rad(-23.44))*Cos(Rad(360/365.24*(MSClockDayYearNumber+10)+360/PI*0.0167*Sin(Rad(360/365.24*(MSClockDayYearNumber-2)))))))
Formula=Round(-23.44*Cos(Rad(360/365.24*(MSClockDayYearNumber-1+10)+360/PI*0.0167*Sin(Rad(360/365.24*(MSClockDayYearNumber-1-2))))),1)
UpdateDivider=-1
Substitute=#DataTranslate#
MaxValue=180
MinValue=-180
Remember, the issue is in updating the Eath.jpg image and not its rotation which is the function of the Meter and I think this is fine.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Updated Image of Spinning Earth

Post by eclectic-tech »

We need your entire skin code; these 3 sections are not enough to test... there are missing variables that are required by the skin.
Without your entire skin content, it is no possible to duplicate your issue and offer help. :uhuh:
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Updated Image of Spinning Earth

Post by balala »

GTI.H wrote: December 18th, 2018, 11:09 pm I do not believe this helps anything, but here it is:
Indeed, it doesn't, especially that the [MSSun] measure uses a [MSClockDayYearNumber] measure, which is also unknown.
Agree with eclectic-tech, who said:
eclectic-tech wrote: December 19th, 2018, 3:22 am We need your entire skin code; these 3 sections are not enough to test... there are missing variables that are required by the skin.
Without your entire skin content, it is no possible to duplicate your issue and offer help. :uhuh:
Come on guys, could you please help us to help you, when you're asking for?
User avatar
GTI.H
Posts: 75
Joined: December 15th, 2018, 3:35 am

Re: Updated Image of Spinning Earth

Post by GTI.H »

As I said, my Skin has more than 3200 lines and many other resources (graphics, script, etc), is not ready and I would like to publish it only after it's ready.

I do not think we need all Skin to solve this issue, I just work on Measure and Meter myself, and by isolating these two, they should work.

I'm suspicious that Meter Rotator does not refresh the image,I hope jsmorley can confirm this, and I'll test it the first time using Skin from this example here: https://docs.rainmeter.net/tips/rotate-an-image-around-its-center/. Just replace the red image with the one downloaded by WebParser from ikarus1969.

Alas, could anyone show a simple Skin with a Measure and a Meter Rotator where image refresh works?
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Updated Image of Spinning Earth

Post by balala »

GTI.H wrote: December 19th, 2018, 2:18 pm As I said, my Skin has more than 3200 lines and many other resources (graphics, script, etc), is not ready and I would like to publish it only after it's ready.
This is not a problem, you can pack the whole config and upload the package. Uploading a packed skin doesn't necessarily mean you've published it yet, but however in a way...
GTI.H wrote: December 19th, 2018, 2:18 pm As I said, my Skin has more than 3200 lines and many other resources (graphics, script, etc), is not ready and I would like to publish it only after it's ready.
Probably the whole config indeed isn't needed, however never can say precisely what would and what wouldn't be needed. That's why we both, eclectic-tech and me asked to post the whole code / upload the packed config.
But as you wish...
User avatar
GTI.H
Posts: 75
Joined: December 15th, 2018, 3:35 am

Re: Updated Image of Spinning Earth

Post by GTI.H »

Please, friend :(, just replace [MSSun]
per:

[MSSun]
Measure=Calc
Formula=25
UpdateDivider=-1
MaxValue=180
MinValue=-180

and you can already test.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Updated Image of Spinning Earth

Post by eclectic-tech »

GTI.H wrote: December 19th, 2018, 2:18 pm Alas, could anyone show a simple Skin with a Measure and a Meter Rotator where image refresh works?
earth1.gif

Code: Select all

[Rainmeter]
Update=50

[MSSun]
Measure=Calc
Formula=-180+Counter%359
; Formula=-23.45*Cos(Rad(360/365*((MSClockDayYearNumber-1)+10)))
; Error -> (More accurate) Formula=Asin(Rad(Sin(Rad(-23.44))*Cos(Rad(360/365.24*(MSClockDayYearNumber+10)+360/PI*0.0167*Sin(Rad(360/365.24*(MSClockDayYearNumber-2)))))))
;Formula=Round(-23.44*Cos(Rad(360/365.24*(MSClockDayYearNumber-1+10)+360/PI*0.0167*Sin(Rad(360/365.24*(MSClockDayYearNumber-1-2))))),1)
;UpdateDivider=-1
;Substitute=#DataTranslate#
MaxValue=180
MinValue=-180

[MSEarthPic]
Measure=WebParser
;UpdateRate=#UpdateEarthPic#
; Url="http://fourmilab.ch/cgi-bin/Earth?img=NASAmMM-l.evif&imgsize=320&dynimg=y&gamma=1.32&opt=-p&lat=&lon=&alt=&tle=&date=0&utc=&jd="
Url="http://fourmilab.ch/cgi-bin/Earth?img=NASAmMM-l.evif&imgsize=196&dynimg=y&gamma=1.32&opt=-l&lat=48.2&ns=North&lon=16.37&ew=East&alt=35785&tle=&date=0&utc=&jd="
Download=1
DownloadFile=.\\Earth.jpg
UserAgent=Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
DynamicVariables=1
FinishAction=[!UpdateMeter MTEarth][!Redraw]

[MTEarth]
; Group=NowPicText | MButtonsOnOff
Meter=Rotator
MeasureName=MSSun
ImageName=.\\DownloadFile\Earth.jpg
Antialias=1
; UpdateDivider=-1
StartAngle=(Rad(-180))
RotationAngle=(Rad(360))
OffsetX=(196 / 2)
OffsetY=(196 / 2)
X=r
Y=r
W=230
H=230
; Hidden=#Earth Pic#
DynamicVariables=1
You have UpdateDivider=-1 in your [MSSun] section which means it never updates, so you will not see any rotation.
You do not have the required permissions to view the files attached to this post.
User avatar
GTI.H
Posts: 75
Joined: December 15th, 2018, 3:35 am

Re: Updated Image of Spinning Earth

Post by GTI.H »

eclectic-tech wrote: December 19th, 2018, 3:03 pm You have UpdateDivider=-1 in your [MSSun] section which means it never updates, so you will not see any rotation.
Thank you so much eclectic-tech,

With your answers I can know what you understood and as I noticed, you did not understand correctly the issue, probably because I did not explain well.

I left UpdateDivider=-1 intentionally so that Measure [MSSun] should be updated by a FinishAction=[!UpdateMeasure MSSun].

The issue is not with the image rotation, the issue is that the rotated image is always the same and is not updated.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Updated Image of Spinning Earth

Post by eclectic-tech »

GTI.H wrote: December 19th, 2018, 4:59 pm Thank you so much eclectic-tech,

With your answers I can know what you understood and as I noticed, you did not understand correctly the issue, probably because I did not explain well.

I left UpdateDivider=-1 intentionally so that Measure [MSSun] should be updated by a FinishAction=[!UpdateMeasure MSSun].

The issue is not with the image rotation, the issue is that the rotated image is always the same and is not updated.
What is the value of the #UpdateEarthPic# variable in your skin? That determines the measure updates.

What is the skin Update rate in the [Rainmeter] section? If set to -1 then the skin never updates.

Do you know how often the website image is updated? No sense in downloading the same image.

I do not see how using a Rotator meter will give you meaningful results; the image rotates around it's center (Germany), which is not the rotation of the earth (as far as I remember from geography ;-) )

I will run the skin with my own variables, updating at a specific rate, and see what happens. The only reason I see for the image not to update would be the update rates (and update dividers) you use in the skin.

That is why seeing the entire code is preferable. But I understand not wanting to share at this point, but it makes it difficult to troubleshoot an incomplete skin. :uhuh: