Home Page

 


EARLIER FEATURES

 


FEATURES CONTENTS

 


LATER FEATURES

 

Features Contents


9th December 2001

SCANNING FOR SATELLITES

Brian Grainger

email.gif (183 bytes)
brian@grainger1.freeserve.co.uk


 

The purpose of this article is threefold:

  • To show how far we have come since the dawn of the personal computer revolution.
  • To introduce the use of a computer in supporting another hobby.
  • To discuss programming the modern way - with Excel.

First, I will look at the background and why I came to write something in Excel. Next, I will discuss the Excel stuff in detail.

When I first had the idea for this article I was going to say that it all started back in December 2000. However, after a little thought, I realised it started much earlier than that. In April (2001), mankind celebrated the 40th anniversary of one of its boldest steps - the flight of Yuri Gagarin, the first man in space.

Back in 1961 I was 9 years old and then, as I suffered from asthma in my childhood years, I spent quite a lot of time away from school. I can remember on one such period of illness I watched the TV to see the parade for Yuri Gagarin in Moscow after his successful flight. I guess it was then that my interest in space took hold. I suspect all young boys find the idea of space travel and astronomy exciting, but most grow out of it. I didn't. I always remember that I wanted to work at Jodrell Bank, the radio telescope run by Manchester University. This was the only link with space that I knew of in the UK.

Later on, during the late 1960s, I was up at all hours of the night following the Apollo missions. I still have newspaper cuttings for every mission.

It is funny how life turns out because when I came to look for a job after leaving university I found one working at what was then Hawker Siddeley Dynamics. The job involved working on the design of Europe's first communication satellite! I had not gone specifically looking for work in the space industry. It was fortuitous and, when we nearly lost the contract, there was every chance of my being made redundant not long after I started! Politics reared its head, we got the contract and the rest is history. I have worked at the site on and off for all my working life and, after a period of contracting for the present incarnation - Astrium, I now work there full time again. While working in the space industry is not as glamorous as the outsider thinks, I have not lost my love for all things connected with space.

So we come to year 2000. The present big space project is the International Space Station, (ISS). I had followed its progress but not taken a lot of interest up to that time. Then, in December, the shuttle was to go to the ISS on one of its regular jaunts. This time was a bit special because it was going to bring some stuff to the station which would increase its size dramatically. The newspapers began to report that this would make the ISS big enough to see on the Earth, like a moving star, as it passed overhead. Indeed, there was lots of talk of it being like a new Star of Bethlehem, coming as it did during the Christmas period. Now it had become interesting to me. I love watching astronomical events and now here was a chance to watch something on a regular basis. The questions were - when and where to look?

In the dawn of personal computing we would have to rely on the newspapers to tell us the answer to that question and while they may do so for a day or two it would soon stop as it became old news. In today's age all information is available on the Internet, if you can just find it! Fortunately, my work at Astrium helped here.

The company intranet gave links to a few sites that would provide information on the track of the ISS. The first one I tried seemed quite good and I used its information to look for the ISS over the Christmas period. Despite the beautifully clear skies we had in the week between Christmas and the new year I was not at all convinced I had seen the ISS. I realise now there were a number of problems. First, the Internet site I was using did not give me precise enough information to ensure I looked in precisely the right direction. Second, the ISS orbit can vary, especially when the shuttle is visiting it, and this will alter the viewing times significantly. As I was at my mum's over the Christmas period my times were based on information a week old! If the orbit changed I might have been looking at the wrong time! For novices there was another problem. The planet Venus was very prominent in the Christmas sky, probably the brightest object. It often gets mistaken for things it isn't and some people, members of my family included, thought that this was the ISS.

During the period between new year and the next siting of the ISS in the night sky, mid February, I ironed out some of the problems I had. I decided to try one of the other Internet sites and this time I hit pay dirt. For those of you who want to view the ISS and other space objects I recommend a visit to Heavens Above at www.heavens-above.com.

You first of all define your viewing location, either precisely, using latitude and longitude, or by searching the extensive database of towns throughout the world. Once you have got to the front page based on your location it is a good idea to bookmark it (Netscape), or make it a favourite (IE). Then you will not have to repeat the process the next time you visit the site.

Once you hit the main page you choose what you want to see. At this time I wanted to view the ISS so clicking on the ISS link gives you a list of viewing periods at your location for the next 10 days. You can look further forward than that but the times are based on the ISS orbit on the day you interrogate so the further forward you look the more likely it is to be incorrect.

For each viewing period the list gives the date, magnitude (brightness), start time and position, time and position of maximum altitude and end time and position. Times are given in local time, taking into account summer time etc. For newcomers a little explanation of some of the data is necessary.

Magnitude is a measure of brightness. The LOWER the number the brighter. ISS varies between -0.8 to +2. I live in an area with a fair amount of extraneous light. I can see anything less than 0 easily. Initially, anything above 1 was tricky but now I can see down to magnitude 3 if I try hard.

The position is given by two numbers denoting Azimuth and Altitude. On the list page Azimuth is a rotation based on a compass point. On the details pages Azimuth is given as an exact number of degrees where North is 0, East is 90, South 180, West 270 and so on. If it says Azimuth is NW (315) then look to the horizon to the NW.

Altitude is a measure, from the horizon, of how far up in the sky the object is, measured as an angle to the observer. 0 degrees would be flat on the horizon, 90 degrees would be directly overhead. Now this will be useful later on but at the moment it is a little redundant because if one clicks the appropriate viewing date from the list you will go to the details page for that pass of ISS. You will then see a sky map showing the path and direction of the ISS along with the times and figures. Print the page out and you can use it to match against the night sky when looking for the ISS. It helps if you know some of the constellations of stars but if you do not then you will find that you get to know them soon enough!

That is all you need to view the ISS and I encourage you to try it. At the time of posting this article to the web, 9th December 2001, we are just about to start a new cycle of evening sitings. At this time of year the ISS will be visible between 16:00-19:00. The best is if you can get to see it pass over in the twilight sky before the stars have come out. If the shuttle is attached, as now, it will appear much brighter.

The ISS orbits the earth in about 90 minutes and you may think that you should see it every 90 minutes when it is dark. This is not the case however. For the ISS, or any other object without its own light source, to shine, the sun has to be in such a position to reflect light off the object. This only happens for a period of about 2 hours after sunset or 2 hours before sunrise.

ISS is roughly on a 2 month cycle. It is viewable in the night sky for about 2 weeks, gradually shifting from a dim low path to a bright high overhead path after the first week and then returning to a dim low path in the second week before it disappears altogether. There is then 2 weeks or more where it is not seen at all. Subsequent to this there is a period of just over a week where it is visible in the morning sky. There then follows a much shorter period when it cannot be seen and then it returns to the night sky again.

Things are significantly different in the summer months when the night and morning sky are very close together! For example there are some days in June where the ISS can be seen on four orbits because sunset and sunrise are not so far apart. The norm in winter is two orbits at most and usually one.

Now, the weather in Stevenage had not been very great during the winter and spring of 2001. Cloudy skies were the norm. This meant that in mid-February I got to see the ISS precisely 4 times in the two week viewing window. None of them were great views but at least I could confirm that I HAD seen it!

The next viewing period, the second and third week of April, was no better. Again I got to see the ISS 4 times. Two of those were on the same night, Good Friday, when I was visiting my mum in Wivenhoe. The night sky is lovely in my mum's garden and as long as the neighbour's security lights do not come on there is very little extraneous light.

After Easter I was back in Stevenage and I viewed my last pass on the 18th April. It was then I noticed something strange. I viewed the ISS, which was fairly low in the sky on a west to south path, and then afterwards, while having a general look around, I saw a moving object going south to north directly overhead. I thought it may be a satellite so I made a note of the time and had a look at the satellite pages on Heavens Above the next day. I was right. I had seen the SL-16 rocket.

Seeing my first satellite opened up a whole new area of interest. Satellites can be seen on most nights so whenever the skies were clear I could look for something. Each day I would take a list of the viewable objects brighter than 3.5 magnitude and, if the skies were likely to be clear, I would print off the map for the brightest. To date I have seen 141 satellite passes. I should stress they are not all different satellites and some nights I see more than one. I have to make the most of when the night skies are clear! Spotting is much easier in summer, although you have to stay up late to make the most of it.

Now, with my policy of printing one map of the brightest satellite only I had a slight problem. If the skies stayed clear and I wanted to try viewing some of the dimmer satellites I would not have a map. Of course, I could always go on the Internet and download another map but this is not always convenient, especially if the next view is a short period away. What I needed was a way to draw my own sky map. I decided that the best way of doing this was to use the charting, (graphing), facilities of Excel.

What I want to do here is write a computer program to produce a sky map from some input of satellite position data. The only difference is that, whereas in the past I would have used BASIC or Comal to program my computer, this time I am going to take advantage of Excel. I can use its facilities to deal with a lot of the presentation details that would be quite complicated if I programmed from scratch. Why use Excel? Well, I want to draw a picture of a satellite path based on the co-ordinates of the satellite along that path. This sounded like a graph to me so I used a tool that would enable me to draw graphs, or charts as Excel would have it, easily.

As with any program there is input, processing and output to deal with.

The spreadsheet I have created is a template and holds all input, processing and output. When I wish to draw a satellite path I load the template spreadsheet, make adjustments to the input cells and then print the result or copy it to the clipboard. The template remains unchanged so that all the formula do not get lost.

Starting with input, I want to provide the altitude and azimuth information for 3 or 4 points on the path of the satellite. The following is an example of a possible input.

Altitude

Direction

Azimuth

48

S

180

72

ESE

112.5

10

NNE

22.5

10

NNE

22.5

The azimuth can be input explicitly or can be calculated, as in the example above, from the direction via the following lookup table.

E

90

ENE

67.5

ESE

112.5

N

0

NE

45

NNE

22.5

NNW

337.5

NW

315

S

180

SE

135

SSE

157.5

SSW

202.5

SW

225

W

270

WNW

292.5

WSW

247.5

In my spreadsheet I use column I and J for the lookup table with rows 10 to 25 for the data. I merge cells I9 and J9 and use the merged cell to give a title to the table, 'Direction to Azimuth Lookup Table'. The whole lot is formatted with a thick border.

With the lookup table defined the input data can be set in the spreadsheet, columns H to J. Row 3 is used for the headings, 'Altitude', 'Direction' and 'Azimuth'. Rows 4 to 7 are used for data. Note that the following formula are used:

H7=H6
I7=I6
J4=LOOKUP(I4,$I$10:$J$25)

The formula in J4 is copied to J5-J7

With the input data defined this way the bare minimum 3 points of data, with only direction information for azimuth, can be defined. The 4th data point will be taken as a repeat of the third. If a 4th data point exists then simply overwrite the formula in row 7. Similarly, if azimuth information is given explicitly then the formula in column J can be overwritten.

It is now time to talk about processing. I have points of data defined by altitude and azimuth. The altitude is a number from 0 to 90, representing the angle of the point in the sky to the ground. If we imagine the sky laid out flat above us then this is like a point in the radius of a circle. The azimuth value goes from 0 at the horizon or EDGE of the circle to 90 overhead or at the CENTRE of the circle. Although we are squashing the sky a bit to make it flat I am going to assume the values 0 to 90 are linear along the radius. The azimuth value is the angle the radius makes with the North pointing radius of the circle.

Now Heavens Above choose to show their maps 'back-to-front' with their East point to the LEFT of North and the West point to the RIGHT of North. I guess this is normal in drawing sky maps because the Daily Telegraph do it as well. I am going to follow the same approach, although it is easily changeable. This means the Azimuth angle is measured anticlockwise from North at 0 to East at 90, South at 180, West at 270 and back to North at 360.

Strictly speaking we have a co-ordinate system similar to Polar Co-ordinates. The Polar Co-ordinate system is not one that Excel understands so we have to convert it to the X-Y co-ordinate system, (with the origin at the centre). A bit of trigonometry will help in doing this - you see, that maths at school was not wasted!

The magnitude of X is given by rSinA where r is (90-altitude) and A is the Azimuth in radians. Remember, r is 0 at the edge and 90 at the centre of the circle.

The magnitude of Y is given by rCosA.

The only thing to consider now is what sign is wanted, plus or minus. The following table was worked out based on the 'back-to-front' sky chart.

Azimuth

Sign(Sin)

Sign(Cos)

Required Sign(X)

Required Sign(Y)

0-90

+

+

-

+

91-180

+

-

-

-

181-270

-

-

+

-

271-360

-

+

+

+

Using the results of the table we have:

X = -SinA
Y = CosA

If a 'normal' sky, instead of a 'back-to-front' one is wanted, just reverse the sign of X.

The processing can now be added to the spreadsheet. I chose a scaling factor of 10/90 for the radius of my circle so that X and Y will be from -10 to +10.

In the spreadsheet, columns K to M are used for the processing. Row 3 is used for the headings, 'R', 'X' and 'Y'. Rows 4 to 7 are used for processing formula. Note that the following formula are used:

K4= 10*(90-H4)/90
L4= -K4*SIN(RADIANS(J4))
M= K4*COS(RADIANS(J4))

The formulae in K4 to M4 are copied to the corresponding elements of rows 5 to 7.

That's all the processing dealt with. All we have to do now is take the results in K4:M7 and plot a chart from them.

Here are the steps I took to create the chart, using the Chart Wizard to start with and then prettying up the result.

  1. Before starting, check that the width of columns B-F are 7
  2. All rows are height 12.75 except 2 and 8 which are 13.50 and 9 which is 37.50
  3. Cells B17-F17 are merged into one with the chart title 'SKY CHART OF SATELLITE TRACK' centred within it.
  4. Start the Chart Wizard
  5. Choose a scatter graph with data points connected by smooth lines and move the Wizard on
  6. The Data Range is chosen to be $L$3:$M$7 with the series in columns. Move the Wizard on.
  7. The following Chart Options are taken:
  8. Titles:

    All blank

    Axes:

    Tick against Value X axis and Value Y axis

    Gridline:

    All blank

    Legend:

    All blank

    Data Label:   

    None

    Move the Wizard on.

  9. For Location choose 'As object in sheet' and finish the Wizard.
  10. Move and size the Chart Area of the chart drawn so that it almost covers cells B2:F16. Leave a gap round the edges so that you can select these cells later.
  11. Move and size the Plot area so it falls just inside the chart area.
  12. Click on each axis in turn and from the right click context menu choose Format axis
  13. On the Scale tab first deselect all the Auto selections and then set the following values:

    Minimum:

    -10

    Maximum:

    10

    Major unit:

    5

    Minor unit:

    5

    Value (?) axis crosses at:

    0

    Click OK so the formats are put in place.

  14. Before removing the axes from view it is a good idea to draw the circle. Show the drawing toolbar, click the oval object and while pressing the shift key draw a rough circle on the chart. Position the circle so the horizontal diameter is along the x-axis. Drag each tip of the circle to the end of each axis. Finally format the circle, (use the context menu to Format Object), so that the Fill colour is 'none'.
  15. Draw some text boxes for the compass position labels and move them into place.
  16. Now remove the axes from view by formatting each axis in turn. On the Pattern tab click 'None' to all options.
  17. At this stage the plot area is shaded grey. Use the right click context menu to format the plot area and select 'none' to both border and area options. All shading will now disappear. Format the chart area in a similar way but choose white for the area option.
  18. If you want to apply some borders to the cells enclosing the chart to make it stand out then this is the last thing to do. This is why a little gap was left round the edge of the chart area, so that the cells could be selected.

My final spreadsheet had a button placed on it, over cells L9:M10, and a macro to copy the chart to the clipboard was assigned to the button. Here is the macro code:

Sub SkyChart2Clipboard()

'

' SkyChart2Clipboard Macro

' Macro recorded 25/04/01 by Brian Grainger

'

'

 

Range("B2:F16").Select

 

Selection.Copy

 

Range("A1").Select

End Sub

Why did I do this? Well, when I create a sky map like this I usually want to print it as an overlay to a previously printed map from Heavens Above. To do this I need to copy the map into Word, hence the button to copy it to the clipboard. I can then open up Word and paste the contents of the clipboard into a page as a picture. After resizing the inserted picture to the size of a Heavens Above map I can print it out.

As you can see, Excel is very versatile for doing tasks that would have required quite complicated programming in days gone by. It is not just a number cruncher. The presentation facilities it has can be used to great effect.

The spreadsheet, as described above, can be downloaded by clicking here:
star2xy.xls

Happy satellite spotting!


 

 

 

 


TOP