Skip to content

Instantly share code, notes, and snippets.

@Zyro9922
Last active December 21, 2020 12:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zyro9922/ab1edb0e2b868d2621a9a50743f25929 to your computer and use it in GitHub Desktop.
Save Zyro9922/ab1edb0e2b868d2621a9a50743f25929 to your computer and use it in GitHub Desktop.

GSoC 2017

Syed Ali Hasan | Boost.Astronomy

Organization: Boost C++

Hello, my name is Syed Ali Hasan and I have been working with Boost C++ on Boost.Astronomy project towards the development of a generic and dynamic system for interconversion of coordinate systems.

https://summerofcode.withgoogle.com/projects/#6257590620651520

Introduction

To fix the position of any astronomical object, we must have a frame of reference, or coordinate system, which assigns a different pair of numbers to every point in the sky. The two numbers, or coordinates, usually refer to ‘how far round’ and ‘how far up’, just as do the longitude and latitude of an object on the Earth’s surface.

Coordinate System and interconversion between them is a fundamental tool of Astronomy and hence had to be included.

Overview of my work/contribution

My major contribution was to do research in the field of Astronomy and Coordinate Systems and give the library a direction towards it's goal.

1. Coordinate System

Coordinate System Framework

Developed four fundamental Coordinate Systems. Each system takes its name from the fundamental plane which it uses as a reference This framework contains Base class coord_sys and the four Coordinate System

  1. Equatorial Coordinate System equatorial_ra_coord.hpp & equatorial_ha_coord.hpp
  2. Horizon Coordinate System horizon_coord.hpp
  3. Ecliptic Coordinate System ecliptic_coord.hpp
  4. Galactic Coordinate System galactic_coord.hpp

2. Coordinate System Conversion Utilities

Time Functionalities

Utility.hpp

To achieve a generalised coordinate transformation we need to represent our information in Matrices. Conversion between different coordinate systems is achieved merely by changing the numbers in the matrices. This included implementing GST, LST and the following matrices

  • Coordinates to Column Vector
  • HA Declination and Horizontal matrix
  • HA Dec and RA Dec matrix
  • Ecliptic to RA Dec matrix
  • RA Dec to Ecliptic matrix
  • Galactic to RA Dec matrix
  • RA Dec to Galactic matrix
  • Extract coordinate from the resultant column vector
  • Obliquity of Ecliptic

3. Coordinate Conversion Graph

Graph Conversion Framework + Tests

This involved development of a generic and dynamic framework that accepts the required input from user i.e. Coordinate System with other information such as User's Geographical Location, Obliquity and Sidereal Time and the Coordinate System we want to convert to. I have used Boost Graph Library to implement the framework and perform a Breadth First Search on the graph to traverse from one node to another. During traversal the respective matrices are multiplied using Basic Linear Algebra Library.

https://drive.google.com/file/d/1tvMU1TUTACUeZ6IL-k5_dvFYUtU0Rs_p/view?usp=sharing

Future Development

Addition of Coordinate Frames.

Note to future developers

This is an awesome project that lies at the intersection of C++ Development and applied Mathematics. You are not only expected to be good with concepts in C++ such as Template Meta Programming, this project also demands you to have some fundamental knowledge of Astronomy.

These references might be useful.

Conclusion

To my mentor, Pranam Lashkari, I want to thank you for giving me this opportunity and supporting both on and off the project. Your support and advice have helped shape my career. You have been truly amazing.

To my colleague and very good friend Gopi, your enthusiasm towards Computer Science, Astronomy, and Software Development is truly inspiring and you've definitely made this whole journey more exciting.

The experience of working with BoostC++ and with such amazing people has evolved me in various aspects of Software Development, Mathematics, and working as a team. This whole journey has been awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment