16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 17:59:18 +02:00

Merge remote-tracking branch 'tmj/master' into sim

This commit is contained in:
milek7
2020-10-18 23:35:14 +02:00
244 changed files with 54164 additions and 11636 deletions

View File

@@ -293,10 +293,14 @@ void cMoon::irradiance() {
void
cMoon::phase() {
// calculate moon's age in days from new moon
float ip = normalize( ( simulation::Time.julian_day() - 2451550.1f ) / 29.530588853f );
m_phase = ip * 29.53f;
SYSTEMTIME lt = simulation::Time.data();
if ((lt.wMonth==5)&&(lt.wDay==4)) //May the forth be with you!
m_phase = 50;
else {
// calculate moon's age in days from new moon
float ip = normalize( ( simulation::Time.julian_day() - 2451550.1f ) / 29.530588853f );
m_phase = ip * 29.53f;
}
}
// normalize values to range 0...1