1
0
Fork 0

Untied the /environment/moonlight property.

This commit is contained in:
Edward d'Auvergne 2017-05-29 09:45:20 +02:00
parent 24a148880c
commit a0dc7b5ba3
2 changed files with 6 additions and 1 deletions

View file

@ -72,10 +72,11 @@ void Ephemeris::init()
tieMoonPos("/ephemeris/moon/lat-deg", _impl->get_moon(), &MoonPos::getLat);
tieMoonPos("/ephemeris/moon/age", _impl->get_moon(), &MoonPos::getAge);
tieMoonPos("/ephemeris/moon/phase", _impl->get_moon(), &MoonPos::getPhase);
tieMoonPos("/environment/moonlight", _impl->get_moon(), &MoonPos::getIlluminanceFactor);
_latProp = fgGetNode("/position/latitude-deg", true);
_moonlight = fgGetNode("/environment/moonlight", true);
update(0.0);
}
@ -102,4 +103,7 @@ void Ephemeris::update(double)
{
SGTime* st = globals->get_time_params();
_impl->update(st->getMjd(), st->getLst(), _latProp->getDoubleValue());
// Update the moonlight intensity.
_moonlight->setDoubleValue(_impl->get_moon()->getIlluminanceFactor());
}

View file

@ -51,6 +51,7 @@ public:
private:
SGEphemeris* _impl;
SGPropertyNode* _latProp;
SGPropertyNode* _moonlight;
};
#endif // of FG_ENVIRONMENT_EPHEMERIS_HXX