Moonrise and Moonset

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Moonrise and Moonset

Post by Art »

Here's a compact sample for calculating Moon rise and Moon set
given input of the time, geo coordinates, and timezone.

Keep in mind that it wants timezone in hour west of Greenwich,
not east like we're used to. It's a very literal BASIC translation,
labels are given names of their BASIC line numbers, etc.

There may be reason to use it, and it's hard to find one so easy.
http://rapidshare.com/files/86198998/lunar.zip.html
I can't think of a use in too many programs, but there may be some.

A bank robbery planner maybe, you might want to do it in the dark,
but be sure to have some moonlight. (ps Not how to code for the PSP!)
Art.
If not actually, then potentially.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Sun Rise and Sun Set

Post by Art »

Now for Sun rise and Sun set, there isn't much preperation needed
for this program:
http://personal.inet.fi/cool/jjlammi/rscalc.c
It's a copy & paster, but it does want the timezone the way we are used to in PSP land.

There is a little trap you can be saved from you from if you want to use it.
Different version toolchains over the last couple of years can produce different results, and I think I've nailed it to how you find the time zone.

http://forums.ps2dev.org/viewtopic.php? ... t=timezone

It appears at some stage the SDK Gods solved the problem and Localtime is now correct. You can make sure with code in that thread.
Cheers, Art.
If not actually, then potentially.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

There's a clock out using the moonrise/set calculation. Maybe they'll add the sunrise/set as well. :)
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

That might be mine, It's done the Sunrise and set for a fair time,
I only lately added the moon times.
There's also SatFinder in LUA which has an implementation of it's own
that does both.
If not actually, then potentially.
Post Reply