Commit 634c0e6d authored by Oliver Bock's avatar Oliver Bock

Keep pulse profile visible if pulsar doesn't spin

parent 81a008a6
......@@ -789,12 +789,15 @@ void PulsarAnimationWidget::resetParameters()
void PulsarAnimationWidget::updatePulseProfile()
{
// avoid division by zero (keep profile visible if pulsar doesn't spin)
double pulsarRotationDelta = m_pulsarRotationDelta == 0.0 ? 0.01 : m_pulsarRotationDelta;
// prepare parameters (e.g. convert to radians where necessary)
const double i = deg2rad * m_pulsarSpinAxisInclination;
const double y = deg2rad * m_pulsarMagneticAxisInclination;
double phiOrb = deg2rad * (m_orbitRotationAngle + 90.0);
const double deltaPhiRot = deg2rad * 1.0;
const double deltaPhiOrb = deg2rad * deltaPhiRot * m_orbitRotationDelta / m_pulsarRotationDelta;
const double deltaPhiOrb = deg2rad * deltaPhiRot * m_orbitRotationDelta / pulsarRotationDelta;
const double rp = m_pulsarSemiMajorAxis;
const double xk = -m_cameraPosZ;
const double yk = -m_cameraPosX;
......
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