# Project: Building My Own Sky

## Recommended Posts

Building My Own Sky

See the sky-map below. It’s a screenshot of an Excel chart, the current state of my project to be able to produce my own star-charts. It’s useful, and continues to be a huge learning exercise.

I’m a relative newcomer to this sport hobby, having really only indulged it from last Summer (2017). Like most of us I imagine, finding the way around the sky to begin with was something of a challenge, not least finding suitable alignment stars to point my first goto telescope. To be fair, Skywatcher did supply a sheaf of printed A4 star-charts for the purpose, but I didn’t find them useful.

Of course I found and installed various Apps on my phone, and they certainly showed me what, for instance, “that bright star low-ish North-East was” (Capella, in September, from SW Ireland). The Apps got me going, but I felt that, a bit like using a satnav to navigate, I was “getting there but not really learning the way”. I felt I needed to know this stuff without relying on an App.

I set about building my own planning spreadsheet. How difficult could it be? Just a matter of harvesting the coordinates of the brightest stars and asterisms; noting my own earthly position, wherever that may be; and with a bit of maths simply plotting what I should expect to see if I’m looking in a certain direction. Easy. After all it’s only one set of coordinates (lat,lon) rotating within another set (RA,Dec). Oh, and the “where I’m looking” orientation (alt, az) and choosing a projection to plot a chart. Ah, and the fact that 24 hours doesn’t quite measure out a single Earth rotation and 365(.25) days doesn’t quite make a year either, made it start to appear a bit more involved than I’d first thought.

I got there in the end. My approach to all such things is to avoid if possible just finding and copying the relevant formulae from the internet. Mostly - except for the planets - I was eventually able to derive for myself the relevant maths, and used the internet to check. For the planets, though, and to a certain extent the timekeeping (sidereal time vs layman’s time), “self-derivation” was beyond me: I do not have years of measurements or satellites so they did need to be looked up. I found a beautifully clear guide, Paul Schlyter’s, to working out the Planets’ movements: good, with the relevant adjustments, to a couple of arcminutes apparently.

All this I coded up using C and C++ into a library of functions (an xll) for use in Excel.

There came a point at which I’d got the Sun and planets in their right places, or so I thought: everything seemed to match what I expected to see, wherever and whenever I placed my virtual self. One test was to verify the Total Solar Eclipse of 11th August 1999, which I personally experienced at Falmouth. Unfortunately, my chart suggested that although they came close, the Sun and Moon were never closer than 0.5 degrees that day. The full width of the Moon apart! Oh dear. I was going to have to tell everyone there that day that it was a mass delusion; computers do not lie.

After a good few days code-trawling I found a well-camouflaged bug, and was relieved that the Eclipse did happen after all. Phew!

Inevitably my spreadsheet has grown far beyond my first intention (just a few alignment stars and main asterisms). It’s now become my personal “take-anywhere sky”, and building it has taught me a huge amount about astronomy in general, the “shape” of the night sky, and some of the maths which describes it all.

Features I’ve included so far:

-          9,000-odd stars up (down?) to and beyond 7 mag, including, apparently, all stars up to 5.5 mag;

-          Planets’ positions, phases and future trajectories across the background of stars;

-          RA/Dec adjustments for the precession of Earth’s axis;

-          RA/Dec adjustments for objects’ Proper Motion;

-          Vmag brightness-extinction due to increased air-mass away from Zenith;

-          Rise and set times and charts for any object (my SGL icon is a plot of the movement of Venus’ alt & az through the year at a given time of day);

-          A selection of chart projection-types;

-          “Filter-ability” of stars by apparent magnitude to simulate a given level of LP;

-          “Top-down” view of the Solar System, my 2D orrery.

It’s now my essential tool for any planning, analysis or reference. Whenever I’m reading and I come across an astronomy allusion, I need to check it out. I’ve recently read Winston Churchill’s “My Early Life” (superb, by the way), and for 12th December 1899 he describes the state of the Moon and using Orion to guide his escape from PoW camp in Pretoria. Naturally, I placed myself then and there to check it out.

Herewith a couple of illustrated examples to show what I’ve found out whilst building and using it.

Mars Neptune Alignment

Getting my future planet-trajectory feature working, I noticed that Mars is due to very closely align with Neptune on 7th Dec 2018, coming within a couple of arc-minutes, and at the time of writing Mars is in the midst of a retrograde action:

Light Pollution Simulated

Secondly, it also nicely illustrates the event which rekindled my passion for astronomy, dormant since my teenage years, which took place as I was walking home from a pub in Baltimore, SW Ireland in early December 2015. It was an incredible clear night, the main asterisms all but drowned-out in the blaze of stars. The following two charts go some way to illustrating the difference between what I saw in Baltimore’s sky and what I can see 19 miles from central London. I'l let you decide which is which.

Obviously all the analysis is equally possible, more so even, using one of the Apps, but for me the fact I’ve built my own tool makes it more fun and involving. The only thing that slightly frustrates me is that everything, all the software and all the skills required, I had 20 years ago, well before any of the Apps came out. I just hadn’t been bitten by this bug back then. I would strongly encourage anyone to do this for themselves, it would make a great school project for example. The ratio of enjoyment to learning has been high!

If you’ve managed to read this far without “TL;DNR”, thank you for your indulgence. Hopefully my virtual skies will not get cloudy.

Cheers, Magnus

my main resources:

Comprehensive star list from John Pratt’s site http://www.johnpratt.com/items/astronomy/mag_5_stars.html

Planet method from Paul Schlyter’s site http://astro.if.ufrgs.br/trigesf/position.html

Inspiration from Roger N Clark’s book “Visual Astronomy of the Night Sky”.

• Replies 30
• Created

Most impressive.

##### Share on other sites

Nice project

My A-level computer science project way back (25 yrs ago) was a star chart written using on a ZX Spectrum and BASIC - it also showed the positions of the Galilean moons for a given date and time

##### Share on other sites

Very clever - there were no home computers when I went to school.  Just whole rooms full of valves!

##### Share on other sites

6 minutes ago, Gina said:

Very clever - there were no home computers when I went to school.  Just whole rooms full of valves!

Thanks Gina. I remember in my computer science module at university (1983ish), I had to type my code (Fortran) into a terminal which had no monitor or screen, press "Run" and the "results" (usually some error) would get printed out in the next room!

##### Share on other sites

I programmed in Fortran (amongst other languages) at work.

##### Share on other sites

2 hours ago, Gina said:

Very clever - there were no home computers when I went to school.  Just whole rooms full of valves!

Computer studies at my school went something like this.

"Sir what's that grey box in the corner?"

"It's a computer!"

"What does it do?"

"I don't know some lads punch holes in bits of card, they feed them into that Computer, then they get a readout on that display."

"What do they do that for?"

"I don't know seems to be a waste of time to me, you can do the calculations quicker with a piece of paper and a pencil."

##### Share on other sites

3 hours ago, Captain Magenta said:

Thanks Gina. I remember in my computer science module at university (1983ish), I had to type my code (Fortran) into a terminal which had no monitor or screen, press "Run" and the "results" (usually some error) would get printed out in the next room!

I'm genuinely surprised by that.  I started my CS degree in 1985 and we had lots of green-screen terminals.  The server consoles in the machine room were teletype units though.

James

##### Share on other sites

Oh, and I still have my copy of Metcalf's "Effective Fortran 77"

James

##### Share on other sites

A most excellent project. Programming things yourself is good for two reasons (1) you learn loads and (2) it annoys the hello out of people who can't understand why anyone would do anything the hard way.

6 hours ago, Captain Magenta said:

“My Early Life” (superb, by the way)

Indeed! I read it in school and particularly enjoyed his present to a sick schoolfriend ?

2 hours ago, JamesF said:

I'm genuinely surprised by that.  I started my CS degree in 1985 and we had lots of green-screen terminals.  The server consoles in the machine room were teletype units though.

James

I started on punched cards in 1981, but there were greenscreen terminals. I did a pascal course and got access to them while the rest of my course struggled (and then I discovered I could log on to the greenscreens anyway)...

By 1983 we had Sirius PC clones as smart terminals.

##### Share on other sites

3 hours ago, JamesF said:

"Effective Fortran 77"

Isn't that an oxymoron?

Even our computer lecturers struggled with F0RTRAN extensions ?

##### Share on other sites

5 minutes ago, Stub Mandrel said:

Isn't that an oxymoron?

I can't deny that, to be fair :D

James

##### Share on other sites

21 minutes ago, Stub Mandrel said:

I did a pascal course

I've programmed in Pascal too.

##### Share on other sites

3 minutes ago, Gina said:

I've programmed in Pascal too.

I loved it, elegant and structured without being straightjacketed in format like F0RTRAN.

Algol was quite nice, I recall, like Pascal Light ?

Cobol - never sued it, apparently it was for those incapable of getting a grasp of BASIC.

Python - BASIC for grown ups, personally I think BBC BASIC for Windows is Python with consistency and much better and is probably the best high-level language combining the natural coding of BASIC with the most advanced options for structured programming, and how many other languages allow you to use in-line assembler on a PC without any fuss? (Not that I have a clue with Intel assembler).

##### Share on other sites

I loved Pascal too - and yes, the structured nature of it appealed to me.  I liked OOP and its modular structure.

Python - oh yes - used that too.

Embedded assembler - yup - that too.  I've used assembler for several different processors from 8 to 64 bit.

##### Share on other sites

My first job after leaving uni was working for one of the world's largest vendors of COBOL development tools, though I never learnt to program in COBOL.  Mostly it was C and assembler work.  The actual COBOL compiler was itself written in COBOL which seemed pretty masochistic to me at the time.  I'm really not sure it has many of the features of a language that you'd desire for writing a compiler.  Allegedly it was partly done to demonstrate the power of the language, but it always seemed more to me to say "Yeah, we know we needed a jeweller's screwdriver, but we just had this chainsaw handy".

I've barely scratched the surface of Python, but I've always struggled to get my head around the idea of whitespace being part of the syntax (not unlike COBOL, oddly enough).  For me spacing should be about readability.  I mean, where would the Obfuscated C Contest be if spaces were a required part of the syntax?

On the whole I seem to have a preference for strongly-typed compiled languages, though I don't get to use them so often these days.

James

##### Share on other sites

What a fantastic project Magnus and a very interesting read.  I absolutely understand your feelings of “g﻿etting there but not really l﻿earning th﻿e way﻿﻿﻿﻿”.  I've bought a scope, camera, mount and downloaded a few bits of software and suddenly I'm able to take stunning images of galaxies, nebula etc.  In a way I feel that the only 'skill' I need is in the image processing and I'm just starting to get to grips with that!
Sometimes it feels like I'm cheating but other times I just feel amazed at what is possible and grateful to be able to do it!  After all, no matter what we do in life we are using and building on the work of others.  I can't remember who was quoted as saying "If you want to make a pizza from scratch you first have to create a universe" ?

Thank you for taking the time to write this. I'd love to say that you have inspired me to do similar but I know I won't.  I'll just keep standing on the shoulders of the giants that came before me and try to remember to learn the way and enjoy the journey at the same time.

All the best

Michael

##### Share on other sites

15 hours ago, JamesF said:

I'm genuinely surprised by that.  I started my CS degree in 1985 and we had lots of green-screen terminals.  The server consoles in the machine room were teletype units though.

James

This was the Engineering Department, obviously the CS department was more up-to-date. I remember playing Defender on my (CS) friend's BBC Micro at the time and thought it odd I was being "taught" programming on such dinosaurs. I think I learned nothing from that course, I only got interested in coding again 8-10 years later when it became obvious it was going to be a hugely useful skill for my work, and luckily I had an experienced coder as a grad trainee so I got him to teach me most of what little I now know.

Magnus

##### Share on other sites

24 minutes ago, Captain Magenta said:

I remember playing Defender on my (CS) friend's BBC Micro at the time and thought it odd I was being "taught" programming on such dinosaurs.

BTDTGTTS!

I remember playing asteroids on an Acorn Atom at a computer club open day before I ever saw a Space Invaders machine.

##### Share on other sites

Not that anyone is bragging but I almost managed to code a working space invaders level in my 1k ZX81
I wish I'd stuck in at wasting my time writing games instead of working hard at my career - I might be a zillionaire by now ???

Michael

##### Share on other sites

The only thing that I can brag about computing is how little I know about it, I'm amazed that I can even communicate on SCL. I'm very skilled, but not clever!    ?

##### Share on other sites

Before the internet we had loads of private bulletin boards plus BT's Prestel.  I wrote a browser for both of these as Shareware and it was quite a success but was soon defunct when the internet took off and Microsoft released Internet Explorer.  It was mostly written in assembler for speed and compactness.

##### Share on other sites

I have no confidence that this will work...

##### Share on other sites

2 hours ago, Stub Mandrel said:

I have no confidence that this will work...

FANTASTIC!!!!!  This has brought back so many memories, mostly of swearing at the machine when I got killed but that's another story ??

Thank you - I'll let you know if I manage to get to level 2!

Michael

##### Share on other sites

Impressive work @Captain Magenta! I like the approach of working it out for yourself!

#### Archived

This topic is now archived and is closed to further replies.