Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
This discussion has been archived. No new comments can be posted.

Coding question

Comments Filter:
  • 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]

  • 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.
    • 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.

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

        And it gives star positions, too.

To do nothing is to be nothing.

Working...