Index: trunk/Mars/mcore/nova.h
===================================================================
--- trunk/Mars/mcore/nova.h	(revision 18594)
+++ trunk/Mars/mcore/nova.h	(revision 18820)
@@ -1,4 +1,7 @@
 #ifndef MARS_Nova
 #define MARS_Nova
+
+#include <map>
+#include <string>
 
 #include <libnova/solar.h>
@@ -10,12 +13,44 @@
 namespace Nova
 {
-    typedef ln_lnlat_posn LnLatPosn;
-    typedef ln_rst_time   RstTime; // Note that times are in JD not Mjd
-    //typedef ln_hrz_posn   HrzPosn;
-    //typedef ln_equ_posn   EquPosn;
+    typedef ln_rst_time RstTime; // Note that times are in JD not Mjd
 
     struct ZdAzPosn;
     struct RaDecPosn;
 
+    const static ln_lnlat_posn kORM
+#ifndef __CINT__
+        = { -(17.+53./60+26.525/3600), 28.+45./60+42.462/3600 } // 2200m
+#endif
+    ;
+    const static ln_lnlat_posn kHAWC
+#ifndef __CINT__
+        = { -97.3084, 18.9947 } // 4100m;
+#endif
+    ;
+    const static ln_lnlat_posn kSPM
+#ifndef __CINT__
+        = { -115.4637, 31.0439 } // 2800m;
+#endif
+    ;
+
+    struct LnLatPosn : public ln_lnlat_posn
+    {
+        LnLatPosn() { }
+        LnLatPosn(const ln_lnlat_posn &pos) : ln_lnlat_posn(pos) { }
+        LnLatPosn(const std::string &obs)
+        {
+#ifndef __CINT__
+            static const std::map<std::string, ln_lnlat_posn> lut =
+            {
+                { "orm",  kORM  },
+                { "hawc", kHAWC },
+                { "spm",  kSPM  },
+            };
+
+            const auto it = lut.find(obs);
+            *this = it==lut.end() ? ln_lnlat_posn({0,0}) : it->second;
+#endif
+        }
+    };
 
     // Warning: 0deg=South, 90deg=W
@@ -61,15 +96,4 @@
 
     EquPosn::EquPosn(const RaDecPosn &rd) { ra = rd.ra*15; dec = rd.dec; }
-
-
-
-    const LnLatPosn &ORM()
-    {
-        //static LnLatPosn obs;
-        //obs.lng = -(17.+53./60+26.525/3600);
-        //obs.lat =   28.+45./60+42.462/3600;
-        const static LnLatPosn obs = { -(17.+53./60+26.525/3600), 28.+45./60+42.462/3600 };
-        return obs;
-    }
 
     HrzPosn GetHrzFromEqu(const EquPosn &equ, const LnLatPosn &obs, double jd)
@@ -81,5 +105,5 @@
     HrzPosn GetHrzFromEqu(const EquPosn &equ, double jd)
     {
-        return GetHrzFromEqu(equ, ORM(), jd);
+        return GetHrzFromEqu(equ, kORM, jd);
     }
 
@@ -92,5 +116,5 @@
     EquPosn GetEquFromHrz(const HrzPosn &hrz, double jd)
     {
-        return GetEquFromHrz(hrz, ORM(), jd);
+        return GetEquFromHrz(hrz, kORM, jd);
     }
 
@@ -103,8 +127,8 @@
     RstTime GetSolarRst(double jd, double hrz=LN_SOLAR_STANDART_HORIZON)
     {
-        return GetSolarRst(jd, ORM(), hrz);
-    }
-
-    RstTime GetLunarRst(double jd, const LnLatPosn &obs=ORM())
+        return GetSolarRst(jd, kORM, hrz);
+    }
+
+    RstTime GetLunarRst(double jd, const LnLatPosn &obs=kORM)
     {
         RstTime rst;
@@ -171,5 +195,5 @@
         double fEarthDist;
 
-        SolarObjects(const double &jd, const LnLatPosn &obs=Nova::ORM())
+        SolarObjects(const double &jd, const LnLatPosn &obs=Nova::kORM)
         {
             fJD = jd;
