Astronomical computing – Ep 2 - Angles
Tags: ruby, astronomy, programming
Published: 2022-04-14 11:23:33

Angles are one of the most important concepts in astronomy. Celestial objects are visible, from our point of view living on Earth, as laying on an imaginary sphere. This is the _celestial sphere_[<sup>[1]</sup>](#source-1), which by its name, states that objects' position on it can be described with angles.

![Celestial sphere](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/1095/2016/11/03154738/OSC_Astro_02_01_CSphere.jpg)

_source: [lumenlearning.com](https://courses.lumenlearning.com/astronomy/chapter/the-sky-above/)_

There are many astronomical coordinate systems but we will focus on the two most used.

## Horizontal coordinate system

The horizontal coordinate system[<sup>[2]</sup>](#source-2), also know as **altitude-azimuth system**, is quite easy to understand. It is basically describing the object's position as up-down and left-right.

As an observer, watching the celestial hemisphere from its center (as the whole sphere is not visible due to the ground), a coordinate can be described with two elements:

- **altitude**, the angle between the horizon and the object
- **azimuth**, the angle between the north and the object

A few important things must now be explained.

The horizon is actually called the **celestial horizon**, as it differs from the common horizon that includes the Earth topography. It is a horizontal plane on which the observer is standing.

The north is also called the _true north_, which is the direction towards the Earth's geographic North Pole.

These angles are described in **arc degrees**. These degrees are the one we know from school where 360° is a complete circle.

## Equatorial coordinate system

More difficult to apprehend, but extensively used in astronomy, the equatorial coordinate system[<sup>[3]</sup>](#source-3) uses spherical coordinates without distance coordinates, with a center being the center of Earth. It is therefore not based on the observer's point of view and appears to be fixed relatively to the background stars. The Earth rotation **doesn't affect the coordinates**.

Here are its two components:

- **declination**, which is the angular distance of the object perpendicular to the celestial equator
- **right ascension**, which is the angular distance, on the celestial equator, between the object and the vernal equinox.


Here again, a lot of information must be provided.

The **celestial equator**[<sup>[4]</sup>](#source-4) is the intersection between the celestial sphere and the plane made by the Earth equator.

The **vernal equinox**[<sup>[5]</sup>](#source-5) is one of the two point on the celestial equator where it intersects with ecliptic plane, which is the plane of the Earth's orbit around the Sun.

The declination is usually described in **degrees, minutes and seconds**, where the degree is an arc degree (1/360 of a full circle), the minute represents one sixtieth of a degree and the second represents one sixtieth of a minute.

The right ascension is usually described in **hours, minutes and seconds**, where 24 hours represent a full circle, the minute represents one sixtieth of a hour and the second represents one sixtieth of a minute.

![Ecliptic plane](https://upload.wikimedia.org/wikipedia/commons/6/61/AxialTiltObliquity.png)

_source: [wikimedia](https://commons.wikimedia.org/wiki/File:AxialTiltObliquity.png)_

# Many different units for many different angles

We learned that in astronomy we have to manipulate many angles, and more importantly many different units.

We talked about the arc degree, the degree manipulated with minutes and seconds, angles expressed in hours.

There is also the radian[<sup>[6]</sup>](#source-6), an angle unit used so that a corresponding 90° angle can also be written 2π rad.

Spoiler about the book, units are sometimes mixed up between formulas, which means we must be able to convert an angle from one unit to another.

Such functions will be the first step in our Ruby library and will be the main topic of the next episode.

_Happy hacking_

---

### Sources

- Cover picture: [British Museum](https://www.britishmuseum.org/collection/object/H_2000-0515-1)
- <a name="source-1"><sup>[1]</sup></a> [Celestial sphere](https://en.wikipedia.org/wiki/Celestial_sphere)
- <a name="source-2"><sup>[2]</sup></a> [Horizontal coordinate system](https://en.wikipedia.org/wiki/Horizontal_coordinate_system)
- <a name="source-3"><sup>[3]</sup></a> [Equatorial coordinate system](https://en.wikipedia.org/wiki/Equatorial_coordinate_system)
- <a name="source-4"><sup>[4]</sup></a> [Celestial equator](https://en.wikipedia.org/wiki/Celestial_equator)
- <a name="source-5"><sup>[5]</sup></a> [Equinox](https://en.wikipedia.org/wiki/Equinox_(celestial_coordinates))
- <a name="source-6"><sup>[6]</sup></a> [Radian](https://en.wikipedia.org/wiki/Radian)