News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MoonPhase

Started by Darrel, May 17, 2006, 06:46:57 PM

Previous topic - Next topic

Darrel

For the astronomy buff in you.  :8)

Unzip MoonPhase and MoonPhaseUpdate to the same folder. Run MoonPhaseUpdate once and it will place a link to MoonPhase on your desktop and update it every 3 hours with the current phase of the moon. Run MoonPhase to see the phase of the moon for any specified time.

Regards,

Darrel

Edit: The original c-source code can be found at moontool. Fixed an error after first 3 downloads.

See Astro for improved version.

[attachment deleted by admin]

Mark Jones

Neat Darrel, it installed a scheduled task on XP SP2 and runs beautifully. Is the task supposed to run every 5 minutes though?
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

P1

I can see where you get ~longitude correction by time zone.  What corrects for latitude?  Do you plan any corrections based on the orbital plane to l&l location?

Regards,  P1  :8)      Escapee from the Master Science of Physics.  Electronics bribed me.

Darrel

If MoonPhaseUpdate is run while MoonPhase is being run, it can't rewrite the icon to the current phase so it will try again in 5 minutes. If MoonPhase is not running it deletes the scheduled task and makes a new one for 3 hours later.

P1,

You have more insight than me. I came across moontool a year or so ago and thought it needed its icon updated and displayed on the desktop to suit my expectations. I have no plans of attempting to modify the program any more. If you would like I will gladly post the source code.

We have several clocks, cuckoo clocks, and a GrandFather clock at the house. The GF has a moon dial on it. I recorded one of the cuckoo clocks and made a digital cuckoo clock. It sits at the top center of the screen as a topmost window and cuckoos every half hour, has several display options and an alarm. The alarm is naturally "The Cuckoos Song" from Laurel and Hardy (2 of my favorites). Its size is 49 KB.

I ended up using the IShellLink interface to get the desktop icon to update.

Regards,

Darrel

Mark Jones

Uh-Oh Darrel, mine's still scheduled to run every 5 minutes, even though MoonPhase.exe has been closed for a half-hour. :wink
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Darrel

Mark It's scheduled to run every 5 minutes but its next start time is 3 hours from its last successful update. Most of the time it will say it has never been run, unless it runs while Moonphase is running. If you turn off your computer for a week or so, when you turn your computer back on MoonPhaseUpdate will run within 5 minutes.

Regards,

Darrel

P1

Quote from: Darrel on May 17, 2006, 08:49:48 PMIf you would like I will gladly post the source code.
Yes, I would be interested. 

IShellLink interface is way I do all my link files.

TIA,  Regards,  P1  :8)

Mark Jones

Ok Darrel, I'll check it again when I can.

Earlier I rebooted and installed a new video driver, then locked the workstation and left. I just unlocked computer and was greeted with moonphaseupdate.exe exception 0xC0000005 at address 0x00401A38, which appears to be the service update routine. Next run time is in 5 minutes.

Update: It ran again in 5 minutes, same result. Again, same in 5 minutes. It will not run now, it exceptions repeatedly on 0x00401A38.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Darrel

Here's the source code. If any of it is too vague let me know.

Mark was MoonPhase running when the error occured in MoonPhaseUpdate?

Regards,

Darrel

[attachment deleted by admin]

six_L

Darrel,
excellent code.
:U
regards

Darrel


caseys

hehe good stuff. was looking for source :D - here i found
Uf, never been so hard to understand