Getting Access Data with EventsLogger

I’m using EventsLogger to collect access data,the code are as follows:

	 List<EventsLogger.LoggedEvent> allEvents = logger.getLoggedEvents();    

		 for (EventsLogger.LoggedEvent logged : allEvents) {
			 BooleanDetector detector_temp = (BooleanDetector) logged.getEventDetector();
//			    TopocentricFrame station = detector_temp.getTopocentricFrame();
			    SpacecraftState state = logged.getState();
//			    double azimuth = station.getAzimuth(state.getPVCoordinates().getPosition(),
//			                                        state.getFrame(),
//			                                        state.getDate());
//			    double elevation = station.getElevation(state.getPVCoordinates().getPosition(),
//			                                        state.getFrame(),
//			                                        state.getDate());
//			    System.out.println(station.getName() + " " +
//			                       (logged.isIncreasing() ? "raising" : "setting") + " " +
//			                       state.getDate() + " " +
//			                       FastMath.toDegrees(azimuth) + " " +
//			                       FastMath.toDegrees(elevation));
			    System.out.println( "station ID:"+String.valueOf(staID)+" satID :"+String.valueOf(sat.getSatID()) + " "+
	                       (logged.isIncreasing() ? "entering" : "leaving") + " " +
	                       state.getDate() + " " );

There are two problems concerned:
First,because I’m using BooleanDetector and have no idea how to retrieve the data like ElevationDetector.So I comment out some of the codes as you can see above.

BooleanDetector detector = BooleanDetector.andCombine(ed,  BooleanDetector.notCombine(fd)).withMaxCheck(10).withThreshold(1.0e-3).withHandler(handler);

Second,the access time results are not complete when the satellite was accessible at the very beginning of the computation period.The begin time of the first time-window is missing.I’m not sure if I have to deal with it myself or there is another way.

One method could be to check if the first event detected is a rise or set. Then you would know the state of the satellite at the beginning of the propagation interval.

Thanks for your quick reply and suggestion.I solved the problem just like your method.I created a sign list recording the rise/set status in the events.In the end of the access propagation,I check the first and the last satus.If the first status is “set”,then add the propagtion start time into the time list.If the last status is “rise”,then add the propagation end time into the time list.In the end, re arrange the time list to form a formatted time-window list.

It’s working but I was hoping to solve it a more elegant way.The EventsLogger seems useless now.For the time being I think your method is the most effecient way.Thanks again for your kind help!