forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Moonrise and Moonset

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Thu Jan 24, 2008 9:25 pm    Post subject: Moonrise and Moonset Reply with quote

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
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Thu Jan 24, 2008 9:38 pm    Post subject: Sun Rise and Sun Set Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Jan 25, 2008 8:43 am    Post subject: Reply with quote

There's a clock out using the moonrise/set calculation. Maybe they'll add the sunrise/set as well. :)
Back to top
View user's profile Send private message AIM Address
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Fri Jan 25, 2008 10:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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