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.
Moonrise and Moonset
Moonrise and Moonset
If not actually, then potentially.
Sun Rise and Sun Set
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.
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.