Thomas,

Thanks for improving the fallback moon phase calculation for those who 
haven't installed pyephem. Happily, with the help of Gary, you, and others, 
I've done that.

Reading your post, though, I find it interesting that something as well 
studied and modeled as moon phases doesn't have a well accepted algorithm 
that can be applied. The different values provided by different web sites 
who offer the result of calculating it shows that lack. It makes you wonder 
about the accuracy of other astronomical calculations, often provided with 
many significant digits. It reminds us that precision doesn't guarantee 
accuracy!

Best,
Phil

On Monday, September 17, 2018 at 10:04:00 AM UTC-4, Thomas Keffer wrote:
>
> I've changed the formula used to calculate the moon phase if you have not 
> installed pyephem. For 15-Sept-2018, this version gives 37% illumination 
> (versus 24% for the old version).
>
> Interesting project. I learned a lot about lunations and how to calculate 
> the phases of the moon. The root problem is that the time between new moons 
> is not a constant value. So, as time marches on, the approximations get 
> worse and worse.
>
> This new version starts with the first new moon of 2018 (16-Jan-2018) and 
> calculates forward from that.
>
> Commit 0220656 
> <https://github.com/weewx/weewx/commit/0220656bc86785b51684d7eb20dfd3a991dee8f7>
>
> -tk
>
> On Sun, Sep 16, 2018 at 4:45 AM Philip Kutzenco <[email protected] 
> <javascript:>> wrote:
>
>> Gary,
>>
>> OK. It's working now! 
>>
>> Interestingly - "sudo pip uninstall ephem" and "sudo pip uninstall 
>> pyephem" gave not-installed errors. However, "pip uninstall ephem" and "pip 
>> uninstall pyephem" both did uninstalls. It appears that installing without 
>> privileges puts the files in /home/pi/.local/lib/python2.7/site-packages/ .
>> After uninstalling both, I installed pyephem with sudo, restarted weewx 
>> and now am showing 46% moon illumination on both the standard skin and the 
>> belchertown skin.
>>
>> Thanks for your (and everyone else's) help.
>>
>> Now if someone can help explain the inconsistency between the DarkSky API 
>> download and the DarkSky.net forecast for my location I'd be grateful. 
>> If I see no answer to that, I can move that question to a new topic. 
>>
>> Best,
>> Phil
>>
>> On Sunday, September 16, 2018 at 1:14:28 AM UTC-4, gjr80 wrote:
>>>
>>> On Sunday, 16 September 2018 12:39:53 UTC+10, Philip Kutzenco wrote:
>>>>
>>>>
>>>> Plus that doesn't explain why weewx is still indicating 24% on Standard 
>>>> and Belchertown skins for me.
>>>>
>>>>
>>> Let's deal with the second problem first. It appears that installing 
>>> ephem and pyephem as an unprivileged causes issues, particularly for 
>>> WeeWX (well it does on my Debian stretch VM). I would also be using 
>>> pyephem and not ephem. First off let's uninstall ephem and pyephem:
>>>
>>> $ sudo pip uninstall ephem
>>> $ sudo pip uninstall pyephem
>>>
>>> answer y to any y/n prompts
>>>
>>> Now install pyephem making sure you have privileges:
>>>
>>> $ sudo pip install pyephem
>>>
>>> and finally restart WeeWX:
>>>
>>> $ sudo systemctl restart weewx
>>>
>>> Wait for a report cycle to complete then check you pages again.
>>>
>>> Gary
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to