Skip to content

jgryffindor/astronomy-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astronomy Calculator

A c++ program for stellar calculations that queries the HYG-Database, which can be found at https://github.com/astronexus/HYG-Database .

This program

  • Uses rapidjson to query a converted version of the database. https://github.com/miloyip/rapidjson
  • Outputs to the console:
    • Right Ascension
    • Declination
    • Distance in Parsecs
    • Distance in AU
    • Distance in Meters
    • Luminosity
    • Spectral type
  • Converts Distance in Parsec to AU
  • Converts Distnace in AU to meters
  • Calculates Apparent Brightness in Watts/(Meters2)

The queries run very fast! I have plans to add all additional columns of the database and produce more robust assertions and error handling.

Assistance with improvements:

I'm all ears for information, critiques and pulls, especially with the following:

  • Header parser, to modularize the initial JSON parse as an #include.
  • Assertions and Error Handling

Visual Studio 2013 Notice

The program throws errors in VS2013 for a deprecated fopen method. To disable deprecation and avoid any errors add a preprocessor definition to the project proerties.

Preprocessor Definition - _CRT_SECURE_NO_WARNINGS

About

A c++ program for stellar calculations that queries the HYG 3.0 database.

Resources

License

Stars

Watchers

Forks

Packages

No packages published