User avatar
sapnho
Posts: 210
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Show day and light world map on the Raspberry Pi

Tue Nov 11, 2014 8:41 pm

I have searched the web but have found no documentation on how to get a Day and Night World Map like this one http://www.timeanddate.com/worldclock/sunearth.html on a Raspberry Pi.

So, what I would like to have is to have this up during the day and obviously changing it with the time, so not a static picture but a dynamic one.

Any guidance from the experts?
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

tbd.pi
Posts: 34
Joined: Sat Aug 11, 2012 11:21 am
Location: NJ,USA
Contact: Website

Re: Show day and light world map on the Raspberry Pi

Tue Nov 11, 2014 9:26 pm

You mean you want to serve this, or just access a map that looks like that on the pi? Creating one of those maps isn't a pi specific problem, although you will have to look at how you sync the clock on the pi (I've not needed to do that yet) as it doesn't have a RTC and wouldn't be accurate unless you set it.

User avatar
DougieLawson
Posts: 36106
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Show day and light world map on the Raspberry Pi

Tue Nov 11, 2014 9:37 pm

http://aa.usno.navy.mil/imagery/earth/m ... &minute=35
Works with UTC. You may be able to use that to generate the images for you, ready to use.

Or take a look at http://www.fourmilab.ch/homeplanet/ and see if you can port the Visual C code to the Raspberry Pi.
Last edited by DougieLawson on Tue Nov 11, 2014 9:41 pm, edited 1 time in total.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Show day and light world map on the Raspberry Pi

Tue Nov 11, 2014 9:38 pm

apt-get install sunclock

Note: I've built this from source in the past, but now it is available "the easy way".
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

W. H. Heydt
Posts: 10883
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Show day and light world map on the Raspberry Pi

Tue Nov 11, 2014 9:39 pm

tbd.pi wrote:You mean you want to serve this, or just access a map that looks like that on the pi? Creating one of those maps isn't a pi specific problem, although you will have to look at how you sync the clock on the pi (I've not needed to do that yet) as it doesn't have a RTC and wouldn't be accurate unless you set it.
The Pi defaults to setting its clock from NTP servers. On the whole, it probably keeps better time than your watch. It also adjusts between Standard Time and DST automatically (a feature I dearly love with the Pi I use as an alarm clock).

User avatar
B.Goode
Posts: 8514
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Show day and light world map on the Raspberry Pi

Tue Nov 11, 2014 9:57 pm

Joe Schmoe wrote:apt-get install sunclock

Note: I've built this from source in the past, but now it is available "the easy way".
+1

Don't look for anything else until you have tried this.


PS: you might need to persuade it to install by prefixing with 'sudo'

User avatar
sapnho
Posts: 210
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Show day and light world map on the Raspberry Pi

Wed Nov 12, 2014 6:30 am

Code: Select all

apt-get install sunclock
That is certainly a great app but ideally I would like to use genuine satellite pictures rather than graphics similar to what this guy has done https://www.youtube.com/watch?v=4M-C9WHew9w. I tried to contact him but he hasn't answered yet.
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
B.Goode
Posts: 8514
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Show day and light world map on the Raspberry Pi

Wed Nov 12, 2014 8:41 am

From man sunclock
The Sunclock
package includes a resizable and zoomable vector map . External Earth
maps can also be loaded (starting with version 3.51, formats .jpg,
.gif, .png, .xpm or .xpm.gz, .vmf can be read [.vmf is the specific
vector map format of sunclock]).
and
- File Selector window. It can be accessed by clicking on the upper
part of the main window with the middle mouse button. It allows one to
select the Earth image file (in formats *.vmf *.xpm, *.xpm.gz, *.jpg,
*.gif, *.png) to be loaded.

User avatar
sapnho
Posts: 210
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Show day and light world map on the Raspberry Pi

Fri Nov 14, 2014 7:45 pm

Still too difficult to me without detailed instructions. I really wonder what Tim Cortini was using. :?:
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
sapnho
Posts: 210
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Show day and light world map on the Raspberry Pi

Fri Nov 14, 2014 8:10 pm

That's the kind of image that would be ideal, just the dynamic photo: http://www.die.net/earth/
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
davidcoton
Posts: 4139
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Show day and light world map on the Raspberry Pi

Fri Nov 14, 2014 9:49 pm

You seem to have found your own answer :). Contact the guy at the web site to get his permission, then download the image to your RPi at regular intervals, as negotiated, and display it. It just depends how "real time" you want to get.
Signature retired

User avatar
sapnho
Posts: 210
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Show day and light world map on the Raspberry Pi

Sat Nov 15, 2014 6:17 am

Yep, I already contacted him, waiting for a response. It's updated every 30 min, that's near time enough for a world view.
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

MagicJohansson
Posts: 1
Joined: Mon Dec 11, 2017 1:10 pm

Re: Show day and light world map on the Raspberry Pi

Mon Dec 11, 2017 1:19 pm

Hello guys

A real newbie with Raspberry here but programming is what I have done all my life so this is a little embarrassing :-/

I am trying to compile the sunclock_3.57 that I have downloaded here : https://github.com/mdoege/Sunclock

The compile however stops with an error :

readvmf.c:353:7: error: request for member 'have' in something not a a struct or union
i=gzgetc(fd);
^

And the a whole list of the same error asking for different members.

I also get the following:
/usr/include/zlib.h:1391:21 note: expected 'gzFile' but argument is of type 'struct gzFile_s **'

What am I doing wrong here and what should I do ?
And before You tell me to install the compiled version using apt-get I need to modify the code for my needs :-)

Thank You
Magic

Return to “General discussion”