Commit e1ac98db authored by Alexander Lapshin's avatar Alexander Lapshin

.

parent e3ee204c
......@@ -41,7 +41,15 @@ static void InitDataA(BNOAstroBase& ab, myXML::Document& doc, bool noAtm = false
static void InitDataA(BNOAstroBase& ab, std::string configFile, bool noAtm = false, bool loadPlanets = false)
{
ab.SetCfgFile(configFile.c_str());
if (configFile == "%ASTROBASE%") {
const char* env_astro = std::getenv("ASTROBASE");
if (!strlen(env_astro)) {
throw (Exp() << "no env variable ASTROBASE found");
}
configFile = std::string(env_astro);
}
ab.SetCfgFile(configFile.c_str());
if (ab.Init(TimeGD(1, 1, 1957, 0, 0, 0, 0), TimeGD(1, 1, 2500, 0, 0, 0, 0), noAtm, loadPlanets)){
SetAstroBase(ab);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment