Rise
The Vieneo Province
Loading...
Searching...
No Matches
Tests/VehicleVisibilityTests.cpp

Source at documentation-generation time. See Test catalog for fixture associations.

1#include "../Viewscreen/VehicleVisibility.h"
3static_assert(AcrossCloudDeck(14,0),"ground vehicles hidden from above");
4static_assert(AcrossCloudDeck(0,14),"upper vehicles hidden from below");
5static_assert(AcrossCloudDeck(9.99f,10.01f),"opposite sides near cloud top");
6static_assert(AcrossCloudDeck(10.01f,9.99f),"symmetric near cloud top");
7static_assert(!AcrossCloudDeck(14,117),"upper vehicles remain visible");
8static_assert(!AcrossCloudDeck(0,9),"lower vehicles remain visible");
9static_assert(!AcrossCloudDeck(10,14) && !AcrossCloudDeck(14,10),"boundary remains visible");
10static_assert(!AcrossCloudDeck(0,10) && !AcrossCloudDeck(10,0),"lower boundary remains visible");
11static_assert(!AcrossCloudDeck(-1,1),"negative terrain altitude is on lower side");
constexpr bool AcrossCloudDeck(float observerMslKm, float targetMslKm, float topMslKm=10.f)