Sunrise/Sunset

21 Dec 2012

I'm trying to make a sunrise/sunset calculator based on the gps location with mbed, does anyone have an idea on how to do that?

Thanks

21 Dec 2012

depends of the accuracy you want, if you want the few seconds of oscillation season dependant or only the average théorical

I think first get the maths from an astronomical guy then design the fonctionnality you want and the way you want to use it :

warning before/just time , day light mimic with a pwm output, time display......

with the GPS you won't have any pb to get the exact time

nice project

22 Dec 2012

There's an example of a sunrise / sunset calculator written in Oberon on the Cortex-M3 section of our Astrobe forum:

http://www.astrobe.com/forum

You can build it using Astrobe for Cortex-M3 so that it will run on an LPC1768 MCU.

Regards, Chris

Chris Burrows CFB Software http://www.astrobe.com

22 Feb 2013

thanx, i'll look at that

22 Feb 2013

I don't know whether it's possible for your project to be internet connected, but it may be possible to use some online API to give you the sunrise and sunset times.

EDIT: http://www.earthtools.org/webservices.htm#sun

Steve

22 Feb 2013

i want to connect a gps module to the mbed to acquire the hour, and the position data needed to do the calculations, since this project will be used to send data via gsm, i'm tryin to reduce the costs to the minimum :).

22 Feb 2013

Have a look at this basic code. It uses decimal Latitude, Longitude, and timezone offset. Timezone can be calculated too.

http://www.thebackshed.com/forum/forum_posts.asp?TID=4434&KW=sunrise

25 Feb 2013

Tnx Charles, i've seen some codes in all kind's of languages, but all these programs don't do exactly what i need, that's why i'm still trying to make one... I have an mbed connected to a gps module, and i need it to get the coordinates from te gps and do the math, accurate at least to the minute...

25 Feb 2013

Your welcome Renato. I doubt your are going to find a program that does exactly what you want. I think you will find the building blocks to write your own.You could use ModGPS to parse NEMA and provide coordinates. When connected to the 1PPS output the time setting becomes very accurate. There is also a time zone library but I have no experience with it. Write your own code to calculate sunrise/sunset.