It is currently March 29th, 2024, 8:32 am

Updated Image of Spinning Earth

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

Re: Updated Image of Spinning Earth

Post by balala »

eclectic-tech wrote: December 19th, 2018, 5:43 pm What is the skin Update rate in the [Rainmeter] section? If set to -1 then the skin never updates.
This wouldn't have too much sense. Although isn't impossible, nor useful is to set the Update to -1 on a skin which uses WebParser measures.
eclectic-tech wrote: December 19th, 2018, 5:43 pm the image rotates around it's center (Germany), which is not the rotation of the earth (as far as I remember from geography ;-) )
:thumbup:
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, 5:43 pm What is the value of the #UpdateEarthPic# variable in your skin? That determines the measure updates.
This I left as the user's choice, currently for testing I'm using UpdateEarthPic=(3600/4)
eclectic-tech wrote: December 19th, 2018, 5:43 pm What is the skin Update rate in the [Rainmeter] section? If set to -1 then the skin never updates.
I use default value:
[Rainmeter]
Update=1000
eclectic-tech wrote: December 19th, 2018, 5:43 pm Do you know how often the website image is updated? No sense in downloading the same image.
Yes, I tested first.
The image is generated on time according to our settings and to notice differences in weather observations of the earth from a distance, I suppose we need at least 15 minutes.
eclectic-tech wrote: December 19th, 2018, 5:43 pm 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 ;-) )
For a simple reason, viewpoint/references and also remember, the earth has other movements besides the rotation around its axis ;-).
eclectic-tech wrote: December 19th, 2018, 5:43 pm 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.
Please, do the test.
I'm testing here too, but it's time consuming because I have to wait for the update times.

Remenber:
The issue is not with the image rotation, the issue is that the rotated image is always the same and is not updated.

The downloaded image is always new and is different than previously downloaded then the image should be rotated and renewed with the new one.
eclectic-tech wrote: December 19th, 2018, 5:43 pm 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:
Yes, of course, I also understand your difficulty :bow:, I'm working from here too.
Last edited by GTI.H on December 20th, 2018, 12:15 am, edited 1 time in total.
User avatar
GTI.H
Posts: 75
Joined: December 15th, 2018, 3:35 am

Re: Updated Image of Spinning Earth

Post by GTI.H »

I made a Meter image equal to the Meter rotator and put them side by side, the meter image updates the old image by the new, the meter rotator does not.

I can almost say that the issue is with the meter rotator and not with any other part of the code.

We need a technique to force the rotator to change the image in its update.

* Edit:
I also noticed that the image that the rotator uses is only loaded on a !Refresh and not on !Update which does not happen with the image meter.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Updated Image of Spinning Earth

Post by eclectic-tech »

The rotator image is updating for me.

I created a duplicate skin with a Webparser UpdateRate of 86400 (once a day)

In the changing skin, I set the formula of [MSSun] to zero to eliminate any rotation change (only wanted to see the image change).
I set the skin update rate to 1000.
Set the Webparser UpdateRate to 900 (every 15 minutes).
Added a !Log bang to show in the Log on each webparser FinishAction.
Used a container meter to mask the globes (Sized to the downloaded image size of 196x196).

Loaded both skins at the same time...
The image on the left is the same code with an updaterate of 84600 (once a day).
The image on the right is the rotator meter after 2 hours; the image updated every 15 minutes.
earthrun.png
Spoiler has the 2 skin codes I used...
Code for right image (updates every 15 minutes)

Code: Select all

[Rainmeter]
Update=1000

[MSSun]
Measure=Calc
Formula=0
; 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=900
;#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][!Log "Updated Earth Image"]

[MTEarthMask]
Meter=Image
ImageName=.\\DownloadFile\EarthMask.png
Antialias=1

[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)
W=196
H=196
; Hidden=#Earth Pic#
DynamicVariables=1
Container=MTEarthMask
Code for left image (updates once per day)

Code: Select all

[Rainmeter]
Update=1000

[MSSun]
Measure=Calc
Formula=0
; 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=86400
;#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]

[MTEarthMask]
Meter=Image
ImageName=.\\DownloadFile\EarthMask.png

[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)
W=196
H=196
; Hidden=#Earth Pic#
DynamicVariables=1
Container=MTEarthMask
There must be something else causing the issue you are seeing because the rotator meter image is updating with every webparser update. :welcome:

Attached is the earthmask.png image I created (saved it in the DownloadFile folder)
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 »

Thank you very much eclectic-tech,

That's great news! :D
Dude, if this works for me, you did all the work!

Removing the black edges of the image Eath.jpg (Turning the rectangle into a circle) would be my next fight/issue.

Now I hope to analyze your code and see why mine does not work and yours works.

I use v4.2.0. Maybe this is the issue because, as far as I know, just to use mask I should use the higher version of mine.
What version of Rainmeter do you use?

* Edit:
I ran your skins and the mask did not work for me. Now I'll watch the updates.

* * Edit:
I can already say that the Skin on the right (And the one on the left, of course) did not update for me.
I will install the new version and return.
Last edited by GTI.H on December 20th, 2018, 11:47 pm, edited 3 times in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Updated Image of Spinning Earth

Post by eclectic-tech »

The container is used to mask the Rotator meter, that was not possible before the container feature was added.
So you need the at least beta r3266 available here.

I usually use the latest beta release (currently r3271) available at here; the Development Team is amazingly quick to correct any issues in releases, and I have never had any catastrophic issue using the beta in over 6 years.

A round globe is a much more appealing image! :thumbup:

Happy if this helps!
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 20th, 2018, 9:39 pm The container is used to mask the Rotator meter, that was not possible before the container feature was added.
So you need the at least beta r3266 available here.

I usually use the latest beta release (currently r3271) available at here; the Development Team is amazingly quick to correct any issues in releases, and I have never had any catastrophic issue using the beta in over 6 years.

A round globe is a much more appealing image! :thumbup:

Happy if this helps!
eclectic-tech, you helped a lot, you're the man! (or the woman!) :bow:

Your help was of great value, it would have been much more difficult without your help.

I installed the latest beta release (currently r3271) and everything worked without having to change my code.

Looks like I've found a bug that has already been fixed.
Finding out that the whole issue was just my version gave us a lot of work.

My Skin now works like a charm!
Issue solved! Thanks :thumbup:
Last edited by GTI.H on December 23rd, 2018, 8:40 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Updated Image of Spinning Earth

Post by eclectic-tech »

Happy to help you. Good to hear it is working now :great: