Rectangular field of View

I now want to modify the sensor type of the satellite in the event detector code so that the observation task can be completed. The type of sensor is rectangular, while half vertical angle and horizontal angle are both 5deg. I know how to use the DoubleDihedraFieldOfView class, but I don’t know which method to use. How to call this method? I also hope you can teach me.
/* Copyright 2002-2022 CS GROUP

  • Licensed to CS GROUP (CS) under one or more
  • contributor license agreements. See the NOTICE file distributed with
  • this work for additional information regarding copyright ownership.
  • CS licenses this file to You under the Apache License, Version 2.0
  • (the “License”); you may not use this file except in compliance with
  • the License. You may obtain a copy of the License at
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an “AS IS” BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

package org.orekit.tutorials.propagation;

import java.util.Locale;

import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.orekit.bodies.BodyShape;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.frames.Frame;
import org.orekit.frames.FramesFactory;
import org.orekit.frames.TopocentricFrame;
import org.orekit.orbits.KeplerianOrbit;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.analytical.KeplerianPropagator;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.TimeScalesFactory;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
import org.orekit.utils.PVCoordinates;

/** Orekit tutorial for special event detection.

  • This tutorial shows how to easily check for visibility between a satellite and a ground station.

  • @author Pascal Parraud
    public class VisibilityCheck {

    /** Private constructor for utility class. */
    private VisibilityCheck() {
    // empty

    /** Program entry point.

    • @param args program arguments (unused here)
      public static void main(final String args) {
      try {

       // configure Orekit
       final File home       = new File(System.getProperty("user.home"));
       final File orekitData = new File(home, "orekit-data");
       if (!orekitData.exists()) {
           System.err.format(Locale.US, "Failed to find %s folder%n",
           System.err.format(Locale.US, "You need to download %s from %s, unzip it in %s and rename it 'orekit-data' for this tutorial to work%n",
                             "", "",
       final DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
       manager.addProvider(new DirectoryCrawler(orekitData));
       //  Initial state definition : date, orbit
       final AbsoluteDate initialDate = new AbsoluteDate(2004, 01, 01, 23, 30, 00.000, TimeScalesFactory.getUTC());
       final double mu =  3.986004415e+14; // gravitation coefficient
       final Frame inertialFrame = FramesFactory.getEME2000(); // inertial frame for orbit definition
       final Vector3D position  = new Vector3D(-6142438.668, 3492467.560, -25767.25680);
       final Vector3D velocity  = new Vector3D(505.8479685, 942.7809215, 7435.922231);
       final PVCoordinates pvCoordinates = new PVCoordinates(position, velocity);
       final Orbit initialOrbit = new KeplerianOrbit(pvCoordinates, inertialFrame, initialDate, mu);
       // Propagator : consider a simple Keplerian motion (could be more elaborate)
       final Propagator kepler = new KeplerianPropagator(initialOrbit);
       // Earth and frame
       final Frame earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
       final BodyShape earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
       // Station
       final double longitude = FastMath.toRadians(45.);
       final double latitude  = FastMath.toRadians(25.);
       final double altitude  = 0.;
       final GeodeticPoint station1 = new GeodeticPoint(latitude, longitude, altitude);
       final TopocentricFrame sta1Frame = new TopocentricFrame(earth, station1, "station1");
       // Event definition
       final double maxcheck  = 60.0;
       final double threshold =  0.001;
       final double elevation = FastMath.toRadians(5.0);
       final EventDetector sta1Visi =
               new ElevationDetector(maxcheck, threshold, sta1Frame).
               withHandler((s, detector, increasing) -> {
                   System.out.println(" Visibility on " +
                                      detector.getTopocentricFrame().getName() +
                                      (increasing ? " begins at " : " ends at ") +
                   return increasing ? Action.CONTINUE : Action.STOP;
       // Add event to be detected
       // Propagate from the initial date to the first raising or for the fixed duration
       final SpacecraftState finalState = kepler.propagate(initialDate.shiftedBy(1500.));
       System.out.println(" Final state : " + finalState.getDate().durationFrom(initialDate));

      } catch (OrekitException oe) {