Jvinniec / CppEphem

CppEphem is a self-contained ephemeris package written in C++. It allows computation of celestial coordinate and date conversions and planet ephemerides by leveraging the Standards of Fundamental Astronomy (SOFA) software (included in the repo). It is C++11 compatible.
2 stars 2 forks source link

Add Ecliptic coordinates #30

Closed Jvinniec closed 5 years ago

Jvinniec commented 5 years ago

The PR adds ecliptic coordinates to the list of coordinate systems supported by CESkyCoord. This resolves issue #18.

Also added in this PR is a new coordinate conversion executable called convcoord. This method also supports supplying angles in Hours:Min:Sec and Deg:arcmin:arcsec formats by supplying the delim parameter which specifies the delimiter used. Converting coordinates on the command line can now be done as follows:

$ convcoord --icrs=83.633,22.0145 --to=galactic

******************************************
 Results of ICRS -> Galactic conversion
******************************************
Galactic Coordinates (output)
    Longitude      : 184.557410 degrees
    Latitude       : -5.784425 degrees
ICRS Coordinates (input)
    Right Ascension: 83.633000 degrees
    Declination    : +22.014500 degrees
Julian Date        : 2458708.273043

$ convcoord --icrs=05:34:31.94,22:00:52.2 --delim=: --to=galactic

******************************************
 Results of ICRS -> Galactic conversion
******************************************
Galactic Coordinates (output)
    Longitude      : 184.557452 degrees
    Latitude       : -5.784359 degrees
ICRS Coordinates (input)
    Right Ascension: 83.633083 degrees
    Declination    : +22.014500 degrees
Julian Date        : 2458708.278080

$ convcoord --icrs=83.633,22.0145 --to=observed --longitude=0 --latitude=42 --juliandate=$(cal2jd 20000101.5)

******************************************
 Results of ICRS -> Observed conversion
******************************************
Observed Coordinates (output)
    Azimuth        : 17.097633 degrees
    Zenith         : +113.972797 degrees
    Altitude       : -23.972797 degrees
ICRS Coordinates (input)
    Right Ascension: 83.633000 degrees
    Declination    : +22.014500 degrees
Julian Date        : 2451545.000000
Observer Info
    Longitude      : 0.000000 deg
    Latitude       : +42.000000 deg
    Elevation      : 0.000000 meters
    Pressure       : 1013.250000 hPa
    Temperature    : 15.050000 Celsius
    Relative Humid.: 0.000000

This executable will replace the existing coordinate conversion routines going forward. This means that all the coordinate conversion executables (e.g. cirs2icrs and obs2gal) are deprecated and will be removed in a future release.