It is currently April 26th, 2024, 11:37 pm

Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Mor3bane »

Thanks Yincognito,

I am happy to say that is quite similar to what I just finished testing.

Code: Select all


[MoonNight]
Meter=Rotator
MeasureName=SinceMoonset
ImageName=#@#moon1.png
X=0
Y=0
W=350
H=350
ImageTint=
StartAngle=(RAD(135))
RotationAngle=((RAD(225+([SinceMoonset]/86400))-0.5))
OffsetX=90
OffsetY=90
Hidden=0
This was derived from a visual comparison to the working model pbutler6 provided.
Since I am awful at math, I will track the tracking, and let you know how Im tracking.
Its beddy-bye time for me.

Oh, this is also based on the dayside/nightside model pbutler6 was using.

Cheers.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Yincognito »

Mor3bane wrote: August 22nd, 2020, 3:49 pm Thanks Yincognito,

I am happy to say that is quite similar to what I just finished testing.

Code: Select all


[MoonNight]
Meter=Rotator
MeasureName=SinceMoonset
ImageName=#@#moon1.png
X=0
Y=0
W=350
H=350
ImageTint=
StartAngle=(RAD(135))
RotationAngle=((RAD(225+([SinceMoonset]/86400))-0.5))
OffsetX=90
OffsetY=90
Hidden=0
This was derived from a visual comparison to the working model pbutler6 provided.
Since I am awful at math, I will track the tracking, and let you know how Im tracking.
Its beddy-bye time for me.

Oh, this is also based on the dayside/nightside model pbutler6 was using.

Cheers.
Hm, I don't know. The formula for [SinceMoonset] (i.e. #MoonUp#=0 ? (TimeNowStamp-#Moonset#)/(#Moonrise#-#Moonset#) : 100) already divides a value appropriately to (#Moonrise#-#Moonset#) and from what I can tell the value should be in the range of 0 to 1 (not sure why the "else" in the conditional sets it to 100 when 1 would be better suited IMHO), so I'm not sure dividing it again by 86400 makes much sense (it could have made sense if it was only the raw/undivided difference and the difference in seconds would be greater than a full day). But then, if you deem it accurate, who am I to argue with your own eyes? :D

EDIT: It turns out I was right - just looked at the log and [SinceMoonrise] now has a value of 0.73 (it's 19:12 now where I live, and this is correct since moonrise was at 10:11 today and moonset will be at 22:14, which makes the fomula roughly (19-10)/(22-10)=9/12=0.75, i.e. very close to the measure value of 0.73), so it clearly makes no sense to divide it (again) to 86400, and this is true for [SinceMoonset] as well. Unless you altered these formulas yourself in the meantime, that is - but I doubt that. So, my final verdict is that you set the RotationAngle incorrectly. Also why not just set StartAngle to RAD(225) in the first place, instead of adding 90 degrees to 135? Totally pointless, in my view - no offense. :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
pbutler6
Posts: 100
Joined: April 27th, 2020, 8:10 pm

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by pbutler6 »

The value is 100 to make the sun and moon in the wrong half of the hemisphere 100% complete. If you make it 1, then it will be 1% complete and there will be 2 suns and 2 moons.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Yincognito »

pbutler6 wrote: August 22nd, 2020, 5:44 pm The value is 100 to make the sun and moon in the wrong half of the hemisphere 100% complete. If you make it 1, then it will be 1% complete and there will be 2 suns and 2 moons.
Ah yes, you used this as a "validator" as well, in a way. But if you make it 1 does NOT make it 1% complete, it makes it 100% complete, as 1 is the maximum value (thus, 100%) in the 0...1 interval (in which your formula values and multiplicators range). What you did with setting it to 100 was actually setting the value out of the valid 0...1 range used in your formulas, in effect making it more or less invalid (so it doesn't show). Try replacing 100 with 1.1 or even 1.5 and you'll see what I mean, it's the same effect, no sun and moon double occurences. 1.1 is 110 % in the context of the 0...1 interval, therefore more or less invalid when it comes to the formulas.

By the way, percentual values in Rainmeter measures and meters are not the numbers in the 0...100 interval, but numbers in the 0...1 interval. A "percentual" value of 50 doesn't mean 50% for Rainmeter, but 5000%. The 50% as a "percentual value" is 0.5 actually.

To better illustrate this let's use the Percentual value of a measure's section variable
:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[MeasureTest]
Measure=Calc
Formula=0.5
UpdateDivider=-1
DynamicVariables=1

---Meters---

[MeterTest]
Meter=STRING
X=0
Y=0
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
Text="Test = [MeasureTest:%]"
DynamicVariables=1
As you can see, 0.5 is 50% as a percentual value. 50 will be 100% simply because the actual percentual value of 5000% is "out of range" (the range of 0% to 100%, that is). Of course, by setting the MinValue and MaxValue on the measure things change accordingly, but by default this is how Rainmeter calculates percentual values, in the range of 0...1.

Disregard the part about percentual values, you're not using actual percentual values - but in practice you do multiply things with values between 0 and 1 in the formulas, so that part is correct, IMHO.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Mor3bane »

I think there may be some variance in my version. This is due to the rotator not being a big sundial sized image but a little one that has a particular aspect which indicates toward the middle of the sundial, just for aesthetics sake, but ya, I am always open to making things more precise.

I havent tried any changes yet as I want to see where things lead by allowing the pngs to do their little dances. :lol:
solidissunhollowismoon-1.PNG
pbutler6s working skin.PNG
You do not have the required permissions to view the files attached to this post.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Yincognito »

Mor3bane wrote: August 22nd, 2020, 7:13 pm I think there may be some variance in my version. This is due to the rotator not being a big sundial sized image but a little one that has a particular aspect which indicates toward the middle of the sundial, just for aesthetics sake, but ya, I am always open to making things more precise.

I havent tried any changes yet as I want to see where things lead by allowing the pngs to do their little dances. :lol:

solidissunhollowismoon-1.PNG
pbutler6s working skin.PNG
Be sure to put some music for the PNGs then, so they can dance better to the beat... 8-)
Image
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Mor3bane »

Dont mind meme, Ime just grooving to my own 'special' music.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
pbutler6
Posts: 100
Joined: April 27th, 2020, 8:10 pm

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by pbutler6 »

Mor3Bane -- I'm trying to guess where you are from the clock. It looks like your close to Brisbane Australia. Am I right?
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Yincognito »

Mor3bane wrote: August 22nd, 2020, 7:13 pmI think there may be some variance in my version. This is due to the rotator not being a big sundial sized image but a little one that has a particular aspect which indicates toward the middle of the sundial, just for aesthetics sake, but ya, I am always open to making things more precise.
Yep, I was getting a bit ahead of myself on your:

Code: Select all

StartAngle=(RAD(135))
RotationAngle=((RAD(225+([SinceMoonset]/86400))-0.5))
options. For some reason I was thinking of them as being in the place of MeasureName (and value) - which they are obviously not. They are still pointless though, as [SinceMoonset] value being nearly always between 0 and 1 (you can check the Log to be sure about that) and 1/86400 is more or less 0, the value of RotationAngle will be in effect (RAD(225)-0.5) all the time as it can be seen below, where the behavior and values are simulated:

Code: Select all

[Variables]

[Rainmeter]
Update=100
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[SinceMoonset]
Measure=Calc
Formula=(SinceMoonset>1?0:(SinceMoonset+0.01))
DynamicVariables=1

[RotationAngle]
Measure=Calc
Formula=((RAD(225+(SinceMoonset/86400))-0.5))
DynamicVariables=1

[RotationAngleSimple]
Measure=Calc
Formula=(RAD(225)-0.5)
DynamicVariables=1

[RotationAngleRadiansOnly]
Measure=Calc
Formula=(RAD(196.3521))
DynamicVariables=1

---Meters---

[MeterTest]
Meter=STRING
X=0
Y=0
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
Text="SinceMoonset = [SinceMoonset]#CRLF#RotationAngle = [RotationAngle]#CRLF#RotationAngleSimple = [RotationAngleSimple]#CRLF#RotationAngleRadiansOnly = [RotationAngleRadiansOnly]"
DynamicVariables=1
[RotationAngle] is what you now calculate, [RotationAngleSimple] is the actual result of the calculation, and it's clear that they are both the same, irrespective of the value of [SinceMoonset]. That being said, I have no idea of what that 0.5 means, the whole thing could be even more simplified by just setting the RotationAngle to (RAD(196.3521)), because that's what you get in the end (not that 196.3521 degrees would make any sense either)... :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Weather Json [new stuff] Moon Position on a 24 hour Roundline/Rotator ?

Post by Mor3bane »

pbutler6 - yep near Brisbane. :phhht Im really disguising my code to prevent detection by Mr Bean. But I left my tinfoil hat at the zoo so I can just tell you I am really in Madagascar. :rolmfao:

Yincognito - Ive decided to calculate and display the moon1.png according to the sundial day/night Roundlines. I think that way the moon will appear in the arc relative to the actual appearance of the rise/set, rather than by the time the moon is rising and setting. If the latter were the case, my skin would simply never be correct. So the former will place the moon on its own arc based on the day/night event horizons.

Its still not really smick. But closer to a decent version.
Last edited by Mor3bane on August 22nd, 2020, 8:24 pm, edited 1 time in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.