First off, hi everyone. I am an orekit newbee so sorry if these questions have an obvious solution, but:
Using Conda install (recently) w/orekit 12.0.1 and python 3.11.8.final.0
Consider the following scenario: Propagating a satellite and finding the AOS+LOS times of several ground stations (TopocentricFrame) using ElevationDetector.
Questions:
- If only using the EventsLogger and iterating through events after propagation, how do I identify the ElevationDetector involved in the event? The event.getEventDetector() method returns an object with different id than the originally created ElevationDetector.
Using EventHandler.eventOccurred() should return an Action, but I cannot find the python definition?I found the correct import in the examples, but I have problem making it work:
class TestHandler(EventHandler):
# Without __init__() orekit throws NotImplementedError: ('instantiating java class', <class '<...>.TestHandler'>)
def __init__(self):
pass
def eventOccurred(self, s: SpacecraftState, detector: EventDetector, increasing: bool):
print(f"Event: {increasing}")
return Action.CONTINUE
# Adding the event handler using this:
ed = (ElevationDetector(site.frame).
withConstantElevation(radians(site.min_elevation)).
withHandler(TestHandler()))
I get the following error:
orekit.JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
java.lang.NullPointerException
at org.orekit.propagation.events.AbstractDetector.init(AbstractDetector.java:105)
at org.orekit.propagation.events.EventsLogger$LoggingWrapper.init(EventsLogger.java:214)
at org.orekit.propagation.events.EventState.init(EventState.java:148)
at org.orekit.propagation.analytical.AbstractAnalyticalPropagator.propagate(AbstractAnalyticalPropagator.java:135)