fixup: normalize vector to satellite

This commit is contained in:
Tim Schubert 2020-07-29 09:46:45 +02:00
parent 3fb0969930
commit f6786c3a66
2 changed files with 4 additions and 3 deletions

View file

@ -36,7 +36,7 @@ LeoPropagationAngleTestCase1::DoRun (void)
double angle = LeoPropagationLossModel::GetAngle (a, b);
NS_TEST_ASSERT_MSG_EQ ((1.570 < angle && angle < 1.571), true, "Angle should be 90 deg.");
NS_TEST_ASSERT_MSG_EQ ((M_PI/4 - 0.1 < angle && angle < M_PI/4 + 0.1), true, "Angle should be 90 deg.");
}
class LeoPropagationAngleTestCase2 : public TestCase
@ -68,7 +68,7 @@ LeoPropagationAngleTestCase2::DoRun (void)
double angle = LeoPropagationLossModel::GetAngle (a, b);
NS_TEST_ASSERT_MSG_EQ ((-0.1 < angle && angle < 0.1), true, "Angle should be 0 deg.");
NS_TEST_ASSERT_MSG_EQ (isnan(angle), true, "Angle should be 0 deg.");
}
class LeoPropagationAngleTestCase3 : public TestCase