Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] globe

1 view
Skip to first unread message

Steve Simon

unread,
Oct 1, 2004, 11:12:06 AM10/1/04
to
Friday afternnon toy.

Globe draws an map of the world rotated to present the
the iluminated side, thus you can judge who is asleep and
shouldn't be phoned ☺

Credit to Jef Poskanzer for the idea (ascii map version).

Relies on Doug McIlroy's map databases, which can be downloaded via:

mkdir /lib/map
cd /lib/map
hget http://www.cs.dartmouth.edu/~doug/wdbii.tar.gz | gunzip | tar x

-Steve

globe

r...@vitanuova.com

unread,
Oct 1, 2004, 11:20:10 AM10/1/04
to
> Globe draws an map of the world rotated to present the
> the iluminated side, thus you can judge who is asleep and
> shouldn't be phoned ☺

care should be taken... it gets light at 5am in summer around here!

BTW we already had the same contents of /lib/map here
which people might wish to check before downloading wdbii.tar.gz

andrey mirtchovski

unread,
Oct 1, 2004, 11:48:12 AM10/1/04
to
you guys and your proximity to GMT :)

globe won't work in canada, no matter how much i try to persuade it that
the great white north is still part of the colonies :)

please add a '-u' to the date to work for other time zones:

#!/bin/rc

gmt=`{date -u}
angle=`{echo $gmt | awk -F'[ :]' '{print (360*(($4*60+$5)/(24*60))-180)}'}
map orthographic -o 0 $angle 0 | plot

examples with and without '-u':

http://pages.cpsc.ucalgary.ca/~mirtchov/screenshtos/globe-u.gif
http://pages.cpsc.ucalgary.ca/~mirtchov/screenshtos/globe.gif

andrey

andrey mirtchovski

unread,
Oct 1, 2004, 11:51:17 AM10/1/04
to
for those of us in north america there's a similarly simple weather
monitoring service (it was very interesting to watch florida this
past month):

http://pages.cpsc.ucalgary.ca/~mirtchov/p9/nasat/

meteorological analysis not included :)

andrey mirtchovski

unread,
Oct 1, 2004, 11:55:55 AM10/1/04
to

Steve Simon

unread,
Oct 1, 2004, 1:11:26 PM10/1/04
to
> please add a '-u' to the date to work for other time zones:

Quite right,

I had a -u but must have deleted it when I
"tidied it up" prior to posting (Ugh).

-Steve

Steve Simon

unread,
Oct 2, 2004, 7:12:20 AM10/2/04
to
Ok,

After hassle from many 9fans I have rewritten globe to
work properly - though it is now C (attached).

-Steve

globe.c

andrey mirtchovski

unread,
Oct 2, 2004, 11:21:37 AM10/2/04
to
ouch, running 'map' with the output of the new globe hung my
machine. now i have to go to the university to reboot it and see why...

:(

Gorka Guardiola M, zquiz

unread,
Oct 4, 2004, 3:51:41 AM10/4/04
to

> All that's needed for it to work locally is:
>
> timezone=`{cat /adm/timezone/GMT}
>

I don't get it. Do you mean
timezone=`{cat /adm/timezone/local}
?


Tiit Lankots

unread,
Oct 4, 2004, 4:33:05 AM10/4/04
to

Your variant is a no-op. Think about how the timezone stuff works.

andrey mirtchovski

unread,
Oct 4, 2004, 12:00:11 PM10/4/04
to

> Look on the bright side. You're on the same continent as your university.
>
> -Jack

you're right... on the other hand the fact that i can run to the
university and reboot the machine every time i crash it is no excuse
for being stupid. this time it hung because it simply ran out of
processes calling the same script over and over again recursively.
this morning i faced a terminal spewing 'no procs' messages over and
over.

signed: silly

Axel Belinfante

unread,
Oct 4, 2004, 1:09:12 PM10/4/04
to
I tried to make a 'globeloop' that continously updates the globe
in the same plot (I used mapdemo for inspiration).

I found one little thing in globe.c:

> yaw = (tm->hour+ (tm->min/60) -12) * degperhour;
yaw = (tm->hour+ (tm->min/60.0) -12) * degperhour;

(without the .0 in 60.0 yaw would change once per hour on the hour)

I attached my current globeloop script; it assumes that
globe.c has been installed as games/globeangle .

I don't script in rc very often (guess it shows; feedback welcome)

Axel.


0 new messages