Simulations of observations

Hi @jlipinski,

TopocentricFrame are defined with:

  • X axis in the local horizontal plane (normal to zenith direction) and following the local parallel towards East;
  • Y axis in the horizontal plane (normal to zenith direction) and following the local meridian towards North;
  • Z axis towards Zenith direction.

By convention azimuth is counted clockwise from the North direction, so positive towards the East (see TopocentricFrame#getAzimuth).

Given the arguments of the constructor of DoubleDihedralFieldOfView:

  • center vector, in your case (AZ, EL) = (180°, 45°) should give you : center = [0, -\sqrt(2)/2, \sqrt(2)/2]
  • axis1 and axis2: depends on how your sensor is rotated around the direction of the FOV center.
    If you want one of the side to be parallel to the local horizontal, you can choose axis1 = [1, 0, 0]
    Axis2 will be perpendicular to the 2 previous vector: axis2 = [0, \sqrt(2)/2, \sqrt(2)/2]
  • halfAperture1, halfAperture2: half aperture (in radians) of your FOV along each axis
  • margin can be set to 0.

You have to add another detector for this.

The GroundAtNightDetector with CIVIL_DAWN_DUSK_ELEVATION (you can ignore atmospheric refraction to begin with).
The g detection function is positive when the ground is at night:

CelestialBody sun = CelestialBodyFactory.getSun();
GroundAtNightDetector nightDetector = new GroundAtNightDetector(stationFrame, sun, GroundAtNightDetector.CIVIL_DAWN_DUSK_ELEVATION, null);

Then you want to combine both detectors, using a BooleanDetector.
The andCombine g function is positive if and only if the g functions of all detectors are positive.
However the GoundFieldOfView detector g function is negative when the object is in the FOV, you’ll need to negate that.
In the end, you will have:

BooleanDetector fovAtNightDetector = BooleanDetector.andCombine(BooleanDetector.notCombine(fovGroundDetector), nightDetector);

There is probably a more elegant way to do this using an EventEnablingPredicateFilter but I’m not sure how to do it right now, I’ll think about it when I have more time.

Hope this helps,
Maxime