Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

cancel ×

4 comments

not sure (1)

stoolpigeon (454276) | more than 3 years ago | (#34623710)

this site seems to be able to get you where you want to go - they say it's done with javascript, which means you should be able to look at their code. http://www.csgnetwork.com/sunriseset.html [csgnetwork.com]

Not Javascript (1)

LordBodak (561365) | more than 3 years ago | (#34651460)

There's an Arduino library called Time Lord [swfltek.com] that will calculate sunrise and sunset times with a given lat/long. It's C++ but it looks like it wouldn't be too hard to convert just that calculation.

Re:Not Javascript (1)

Le Marteau (206396) | more than 3 years ago | (#34654920)

Thanks, Gents...

stoolpigeon's recommendation works, but it was copyrighted (which I didn't say was an issue, but it is). Translating from C++ was option "B" on a number of fronts.

But I did find a Perl package which works beautifully and is free: Astro-satpass [cpan.org] which can give the position of the sun, moon, planets, and even satellites, based on time, latitude, longitude and elevation.

Re:Not Javascript (1)

Le Marteau (206396) | more than 3 years ago | (#34655028)

Hmmm... link does not work. Anyway, it's findable at cpan.org, search for "Astro-Satpass"

And it gives star positions, too.

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...