Skip to content

NormAngle gets stuck on certain compilers when the angle input is infinity #71

@kmchen12

Description

@kmchen12
double NormAngle(double angle)
{
	while (angle < -PI) angle += PI2;
	while (angle >= PI) angle -= PI2;
	return angle;
}

When compiling on Windows,
I frequently encounter an issue with Satellite No. 59 where the calculation:
a = 1 / (2 / r - v2 / (CGCS2000_SQRT_GM * CGCS2000_SQRT_GM)); results in a negative number.

This causes an inf value to be passed into Alm->w = NormAngle(w);, which hangs the program.
Interestingly, this issue does not occur on WSL using the exact same settings."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions