diff --git a/include/GSkyDir.hpp b/include/GSkyDir.hpp index 8127284..4db83f8 100644 --- a/include/GSkyDir.hpp +++ b/include/GSkyDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyDir.hpp - Sky direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2014 by Juergen Knoedlseder * + * copyright (C) 2008-2017 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -101,12 +101,12 @@ private: double* xout, double *yout) const; // Private members - bool m_has_lb; //!< Has galactic coordinates - bool m_has_radec; //!< Has equatorial coordinates - double m_l; //!< Galactic longitude in radians - double m_b; //!< Galactic latitude in radians - double m_ra; //!< Right Ascension in radians - double m_dec; //!< Declination in radians + mutable bool m_has_lb; //!< Has galactic coordinates + mutable bool m_has_radec; //!< Has equatorial coordinates + double m_l; //!< Galactic longitude in radians + double m_b; //!< Galactic latitude in radians + double m_ra; //!< Right Ascension in radians + double m_dec; //!< Declination in radians // Sincos cache #if defined(G_SINCOS_CACHE) diff --git a/src/sky/GSkyDir.cpp b/src/sky/GSkyDir.cpp index 9e778bb..c24f5e7 100644 --- a/src/sky/GSkyDir.cpp +++ b/src/sky/GSkyDir.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyDir.cpp - Sky direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2017 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -811,6 +811,9 @@ void GSkyDir::equ2gal(void) const // Convert from equatorial to galactic euler(0, m_ra, m_dec, l, b); + // Signal that galactic coordinates are available + m_has_lb = true; + // Return return; } @@ -830,6 +833,9 @@ void GSkyDir::gal2equ(void) const // Convert from galactic to equatorial euler(1, m_l, m_b, ra, dec); + // Signal that equatorial coordinates are available + m_has_radec = true; + // Return return; }