**Intro to STK with Hubble**

This homework will help you get started in simple Astronautics calculations using the Systems Tool Kit and Python. We will use the Hubble Space Telescope as our orbiting body around the Earth.

The Hubble is one of the largest man-made space telescopes. It's been orbiting the earth since 1990. To read more about it go to: http://en.wikipedia.org/wiki/Hubble_Space_Telescope

The homework will help you calculate some interesting orbital properties of the HST like its orbital velocity and period. One of the main goals of this homework is to get you started with some tools that can help you through the class. The first thing to do is use a simple calculator and go trough the astronautics equations that you learned in class and get the relevant numbers. Then verify your numbers using STK and Python.

The objective of this homework is to compute the orbital velocity and period of the HST (make sure you use the right units):

1)

**Find the orbital velocity (at nu = 90deg)**

2)

**Find the orbiting period**

The orbit period is given in seconds. Convert to minutes and hours to get a better feeling of it how long it takes for the HST to orbit the Earth once.

**Systems Tool Kit (STK)**

Note: STK only works on Windows

- Go to the AGI website and get registered to download the Free version of STK: http://www.agi.com/products/stk/modules/default.aspx/id/stk-free

- Follow the instructions to install STK

- Open STK. Create a new scenario, give it a name and use the defaults start and stop dates

- Insert an STK object: satellite: From standard object database

- Search for the Hubble Space Telescope. Select the result and click insert. You should be connected to the internet to allow the software to download the right database for the HST. Then close all the insert windows untill you're left with just the main STK views. At this point you should see a 3D window and a 2D window showing the orbit of the HST

- Click the blue 'start' button on the control toolbar to see the satellite move. Then click pause.

- Now click the yellow 'Real-time animation mode' button and then the 'play' button again. Now you are seing the actual position of the satellite at this exact moment.

- Now right click on the satellite icon on the Object browser on the left and select 'Report & Graph Manager'. This will bring up a list of different types of reports you can get about the satellite. Explore the list of installed styles.

- Ok, now let's double click on the 'Classic Orbit Elements' report (not the graph). This will bring up a new window with different columns: Time, Semi-major Axis, etc.

- Now let's create a new custom report: click on the 3rd icon in the styles toolbar. Give it a name like 'me419'

- Select 'Classical Elements' -> 'J2000' then double click on
- Time
- Apogee Altitude
- Perigee Altitude
- Apogee Radius
- Perigee Radius
- Semi-major axis
- Eccentricity
- Period

- Select 'Cartesian velocity' -> 'J2000' and double click on speed.

- Save this report.

- Do the math with the given equations to confirm these results (for your own sake). Done!

**Python**

- Install Enthought Canopy Express from
__https://www.enthought.com/downloads/__.

- Open the editor and create a new file.

- Read the following mini tutorial and try some commands in the prompt.

- Type in the necessary equations and check the results with print statements. Don't forget to hit run (ctr + R or Cmd + R).

- Save the python script you just made. done!

## Extra help to get started with python and numpy.

First of all python is free! Then, I think of python as a super cool programming language that is also a super calculator. It allows you to do higher level math calculations but it can also help find cheaper airplane tickets in the Internet (ask me if you're interested). Here is a short tutorial to get you started with python after you have installed canopy.

**variables in python**

you can basically use any typical variable name in python such as 'perigee' or 'radius_earth'. Try to give descriptive variable names so your code is easily readable by others.

**assign numerical values to variables**

it's as easy as you'd expect

perigee = 418.0

important note: in python 2.7 an integer number (such as '18') is treated differently than a floating number (such as '18.0'). To do math with floating numbers in python 2.7 you can't have integers in the mix. So that's why I usually initialize my integer variables with a '.0' at the end so I won't get strange results. You should try to see what I mean.

**math calculations in python**

To do math in python is also very simple and as expected

Examples:

Rp = perigee + radius_earth

R = a*(1-e**2)/(1+e*cos(nu))

important note: in python the exponent operator is '**' instead of '^' as in other programming languages. Here is a short list of the operators you can use in python:

__http://www.tutorialspoint.com/python/python_basic_operators.htm__

**print your results**

The way you print in python 2 is different from python 3. This example is for python 2:

print 'Period = ',P,' min'

**last but not the least: numpy**

numpy is a python library that helps you do math. You can read more about it here: __http://wiki.scipy.org/Tentative_NumPy_Tutorial__

For now you just need to import this python library and use it blindly. On the first line of your script type:

from numpy import *

this will import all the functionality of numpy into your python script. For this homework it's specially useful to be able to use the constant 'pi' and also for the function 'cos'. Otherwise you would have to make your own 'pi' and 'cos'.