DoubleDihedraFieldOfView Usage

Hey Guys,

I have a use case for the DoubleDihedraFieldOfView where I am given the definition of the rectangle like this:

Lower Left Az + El
Upper Left Az + El
Upper Right Az + El
Lower Right Az + El

I’ve then taken these values and computed the necessary boresite vector as well as the dihedra angles in this manner:

``````double boresiteAz = Math.toRadians((lowerLeftAzLimit + upperRightAzLimit) / 2.0);
double boresiteEl = Math.toRadians((lowerLeftElLimit + upperRightElLimit) / 2.0);
Vector3D boresite = azElToCartesian(boresiteAz, boresiteEl);

Vector3D azAxis = Vector3D.PLUS_I;
Vector3D elAxis = Vector3D.PLUS_J;

double azHalfAngle = boresiteAz - minAz;
double elHalfAngle = boresiteEl - minEl;

DoubleDihedraFieldOfView ddfov = new DoubleDihedraFieldOfView(boresite, azAxis, elHalfAngle, elAxis, azHalfAngle, 0);
``````

In some cases my azimuth range goes beyond the 180 degree range that is allowed by the FoV provider, and so I’ve tried creating two separate fields of view where I split the azimuth limits down the middle and then create two adjacent rectangles (processed the same way as above, but with the new azimuth limits) - see below:

``````    private DoubleDihedraFieldOfView computeRectangularFOV(double boresiteAz, double boresiteEl, double minAz, double minEl){

Vector3D boresite = azElToCartesian(boresiteAz, boresiteEl);

Vector3D azAxis = Vector3D.PLUS_I;
Vector3D elAxis = Vector3D.PLUS_J;

double azHalfAngle = boresiteAz - minAz;
double elHalfAngle = boresiteEl - minEl;

return new DoubleDihedraFieldOfView(boresite, azAxis, elHalfAngle, elAxis, azHalfAngle, 0);
}

private List<DoubleDihedraFieldOfView> computeRectangularFOVs() {

List<DoubleDihedraFieldOfView> fovs = new ArrayList<>();

double azRng = Math.abs(upperRightAzLimit - lowerLeftAzLimit);
if (azRng > 180.0){

double boresiteEl = Math.toRadians((lowerLeftElLimit + upperRightElLimit) / 2.0);

double maxAz1 = Math.toRadians((lowerLeftAzLimit + upperRightAzLimit) / 2.0);
double boresiteAz1 = (minAz1 + maxAz1) / 2.0;

double minAz2 = maxAz1;
double boresiteAz2 = (minAz2 + maxAz2) / 2.0;
} else{
double boresiteAz = Math.toRadians((lowerLeftAzLimit + upperRightAzLimit) / 2.0);
double boresiteEl = Math.toRadians((lowerLeftElLimit + upperRightElLimit) / 2.0);
}

return fovs;
}
``````

My problem is when I use the DoubleDihedraFoV in a GroundFieldOfViewDetector, there are no generated LoggedEvents. I have tried using the Propagation tutorial example both with a CircularFieldOfView and the DoubleDihedraFieldofView, and the Circular one generates the expected entry/exit LoggedEvents, but Double Dihedra version didn’t when given identical field of regard definitions (i.e. 0-90 elevation, 0-360 azimuth), where it split the FOR into two 180 degree swaths. My example below uses a custom container class, SensorLimits, containing the code i listed just above this.

``````     SensorLimits lims = new SensorLimits(sta1Frame, 0., 350., 0., 90.);
for (FieldOfView fov : lims.getFoV()) {
GroundFieldOfViewDetector sta1Visi = new GroundFieldOfViewDetector(sta1Frame, fov)
.withHandler((s, d, increasing) -> {
return Action.CONTINUE;
});