Atmosphere.cpp   Atmosphere.cpp 
skipping to change at line 209 skipping to change at line 209
float separation_angle = std::acos(_sunPos.dot(moonPos)); // angle between them float separation_angle = std::acos(_sunPos.dot(moonPos)); // angle between them
// qDebug("touch at %f\tnow at %f (%f)\n", touch_angle, separation_a ngle, separation_angle/touch_angle); // qDebug("touch at %f\tnow at %f (%f)\n", touch_angle, separation_a ngle, separation_angle/touch_angle);
// bright stars should be visible at total eclipse // bright stars should be visible at total eclipse
// TODO: correct for atmospheric diffusion // TODO: correct for atmospheric diffusion
// TODO: use better coverage function (non-linear) // TODO: use better coverage function (non-linear)
// because of above issues, this algorithm darkens more quickly than reality // because of above issues, this algorithm darkens more quickly than reality
// Note: On Earth only, else moon would brighten other planets' atmo spheres (LP:1673283) // Note: On Earth only, else moon would brighten other planets' atmo spheres (LP:1673283)
if ((core->getCurrentLocation().planetName=="Earth") && (separation_ angle < touch_angle)) if ((core->getCurrentLocation().planetName=="Earth") && (separation_ angle < touch_angle))
{ {
float dark_angle = moon_angular_size - sun_angular_size; float dark_angle = moon_angular_size - sun_angular_size;
float min = 0.0001f; // so bright stars show up at total ec lipse float min = 0.0025f; // 0.005f; // 0.0001f; // so bright st ars show up at total eclipse
if (dark_angle < 0.f) if (dark_angle < 0.f)
{ {
// annular eclipse // annular eclipse
float asun = sun_angular_size*sun_angular_size; float asun = sun_angular_size*sun_angular_size;
min = (asun - moon_angular_size*moon_angular_size)/a sun; // minimum proportion of sun uncovered min = (asun - moon_angular_size*moon_angular_size)/a sun; // minimum proportion of sun uncovered
dark_angle *= -1; dark_angle *= -1;
} }
if (separation_angle < dark_angle) if (separation_angle < dark_angle)
eclipseFactor = min; eclipseFactor = min;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/