Skip to content

apollo-ng/cloudmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Global Cloudmap Repo

This repo serves as a distribution point for near realtime and archive access to global cloudmaps you can use with xplanet (see https://github.com/apollo-ng/xfce-planet) or as blender textures. Full pull not recommended :)

Usage

Latest near realtime cloudmap

You can simply get the latest image from:

https://raw.githubusercontent.com/apollo-ng/cloudmap/master/global.jpg

If you want to automate the process, this snippet avoids abusing githubs delivery infrastructure and traffic budget:

#!/bin/sh

PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# Get latest remote checksum
ORIGINSHA=$(wget https://raw.githubusercontent.com/apollo-ng/cloudmap/master/global.sha256 --no-cache -q -O - | awk {'print $1;'})

# Generate local checksum
if [ -e clouds.jpg ];
then
    LOCALSHA=$(sha256sum clouds.jpg | awk {'print $1;'})
fi

# Check if we're behind origin
if [ "${ORIGINSHA}" != "${LOCALSHA}" ];
then

    # Download raw global.jpg from master
    wget https://raw.githubusercontent.com/apollo-ng/cloudmap/master/global.jpg?${ORIGINSHA} --no-cache -q -O global.jpg

    # Generate checksum of downloaded file
    NEWSHA=$(sha256sum global.jpg | awk {'print $1;'})

    # Check if download's chksum corresponds to origin
    if [ "$NEWSHA" == "$ORIGINSHA" ];
    then
        mv global.jpg clouds.jpg
    else
        rm global.jpg
    fi
fi

Cloudmap archive

To get archived images, just check out the specific commit(s) for the timestamp(s) you're interested in.

Operation

HOWTO make near realtime cloudmaps of our world yourself

The whole process is set up to work completely autonomously, pulling the latest images from the following satellites, to get full planet coverage (except polar regions)

Source Birds

Source image distribution

Dundee Satellite Receiving Station, Dundee University, UK http://www.sat.dundee.ac.uk/

Software

https://github.com/jmozmoz/cloudmap

OPS

Just a cronjob, running every three hours beginning at 0115 executing:

#!/bin/bash

PREFT=$(stat -c %Y global.jpg)
nice -n 19 /usr/local/bin/create_map -c CreateCloudMap.ini
POSTFT=$(stat -c %Y global.jpg)

if [ "${PREFT}" != "${POSTFT}" ];
then
    TIMESTAMP=$(ls -altr raw/*.jpeg | tail -n1 | awk {'print $9;'})
    arTS=(${TIMESTAMP//_/ })

# Parse and pad dundee's unpadded file timestamps (yikes!)
    YEAR=${arTS[0]:4:8};
    MONTH=$(printf "%02d\n" ${arTS[1]});
    DAY=$(printf "%02d\n" ${arTS[2]});
    HOUR=$(printf "%04d\n" ${arTS[3]});
    TIMESTAMP="${YEAR}-${MONTH}-${DAY}T${HOUR}Z"

    /usr/bin/sha256sum global.jpg > global.sha256
    git add global.jpg
    git add global.sha256
    git commit -m "Autogenerated global cloudmap @ ${TIMESTAMP}"
    git push

fi

License

Since we all paid for construction & launch of those birds with our tax money the images belong to everyone. The actual creative work of stitching the images together is done by software, which cannot claim anything because it has no rights. Therefore you can do whatever you want with these images.

Support

Created and operated by Apollo-NG Mobile Hackerspace https://apollo.open-resource.org/

About

Distribution of fresh global cloudmaps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published