It follows for the example in “simulations of Observations” (Simulations of observations)
earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2010, True)
earth = OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, earthFrame)
utc = TimeScalesFactory.getUTC()
satellites = []
satellites.append({"satname" : "ADEOS 2",
"tle_line1" : "1 27597U 02056A 23292.82900545 .00000751 00000-0 32003-3 0 9998",
"tle_line2" : "2 27597 98.6603 235.9627 0001869 56.8550 303.2810 14.28048440 85804"})
satellites.append({"satname" : "Starlink-4522",
"tle_line1" : "1 53388U 22097A 23271.93975095 .00016889 00000-0 10762-2 0 9999",
"tle_line2" : "2 53388 53.2169 171.8279 0001571 122.4076 237.7068 15.08857317 63249"})
satellites.append({"satname" : "Starlink-2733",
"tle_line1" : "1 48645U 21044H 23271.94144011 .00013105 00000-0 89686-3 0 9997",
"tle_line2" : "2 48645 53.0563 169.3229 0001526 104.7477 255.3681 15.06408749130050"})
satellites.append({"satname" : "Starlink-1584",
"tle_line1" : "1 46044U 20055T 23272.14091619 .00007340 00000-0 51088-3 0 9996",
"tle_line2" : "2 46044 53.0554 173.4112 0001705 89.1092 271.0092 15.06419315173853"})
satellites.append({"satname" : "Starlink-1302",
"tle_line1" : "1 45375U 20019R 23272.14555380 .00018655 00000-0 12690-2 0 9998",
"tle_line2" : "2 45375 53.0541 213.4058 0001370 95.7398 264.3748 15.06369552195202"})
satellites.append({"satname" : "Starlink-3299",
"tle_line1" : "1 50831U 22001AE 23272.27601560 .00004205 00000-0 28215-3 0 9997",
"tle_line2" : "2 50831 53.2172 215.3839 0001265 92.3413 267.7724 15.08840448 96952"})
station = GeodeticPoint(latitude, longitude, altitude)
stationFrame = TopocentricFrame(earth, station, "Lausanne")
sun = CelestialBodyFactory.getSun()
groundStation = GroundStation(stationFrame)
t_beginning = AbsoluteDate(2023, 10, 18, 0, 22, 0.0, utc)
t_end = AbsoluteDate(2023, 10, 20, 8, 22, 0.0, utc)
fov = DoubleDihedraFieldOfView(center, axis1, ha1, axis2, ha2, 0.0)
fovGroundDetector = GroundFieldOfViewDetector(stationFrame, fov).withHandler(ContinueOnEvent())
fovGroundDetector = fovGroundDetector.withMaxCheck(1.)
nightDetector = GroundAtNightDetector(stationFrame, sun, GroundAtNightDetector.CIVIL_DAWN_DUSK_ELEVATION,
None).withHandler(ContinueOnEvent())
eclipseDetector = EclipseDetector(sun, Constants.SUN_RADIUS, earth).withPenumbra().withHandler(ContinueOnEvent())
fovAtNightDetector = BooleanDetector.andCombine([BooleanDetector.notCombine(fovGroundDetector),
nightDetector,
eclipseDetector]).withHandler(ContinueOnEvent()).withMaxCheck(1.)
generator = Generator()
step = 60.0
for sate in satellites:
myTLE = TLE(sate["tle_line1"], sate["tle_line2"])
propagator = TLEPropagator.selectExtrapolator(myTLE)
sat = generator.addPropagator(propagator)
azElBuilder = AngularAzElBuilder(None, groundStation, [1., 1.], [1., 1.], sat)
scheduler = EventBasedScheduler(azElBuilder, FixedStepSelector(step, utc), generator.getPropagator(sat), fovAtNightDetector, SignSemantic.FEASIBLE_MEASUREMENT_WHEN_POSITIVE)
generator.addScheduler(scheduler)
measurements = generator.generate(t_beginning, t_end)
I can also give you the code in java if you prefer