 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Thu Jan 24, 2008 9:25 pm Post subject: Moonrise and Moonset |
|
|
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. |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Thu Jan 24, 2008 9:38 pm Post subject: 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=3587&highlight=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. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Fri Jan 25, 2008 8:43 am Post subject: |
|
|
| There's a clock out using the moonrise/set calculation. Maybe they'll add the sunrise/set as well. :) |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Fri Jan 25, 2008 10:45 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|