[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orekit Users] My EventDetector class can't correct detecting event?
- To: orekit-users@orekit.org
- Subject: [Orekit Users] My EventDetector class can't correct detecting event?
- From: beowulf zhang <beowulf.zhang@gmail.com>
- Date: Tue, 31 May 2011 00:21:40 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=JL2n3oUZm7iXU0kJSYUJnLG0F7/2x6TTB7w22w8vhOM=; b=AAQHbdehEEhXaMzcEjj2gaIgXx31kiLN56GET2qdlbYwNjicbtE3sdlnPftI/O/Mto HPGU6uXCMawlmUGeA8M3MhNLnEa5rmZS18l11G09cxR0yDEjgK93KyvLKERXPDDmYEUF dV7cpoL6Cbk3t69cJBUZupe8JFpsc+k5AIdf4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=qIBx1k3RNevmm8gMUS1FWXlsbTwLLapEQaHUDzncf0gOGFYCWptITdgWk5FSeCBlb7 JBeY6g37h44epQdhB8ir0kbSdE/uU5V+hRvaQmMHoZ1E8y3UXi09dbZVxQ92Ozf+0VqY u60aMLdqMGLfp6VGoSFDkrlwTyu9aQCBMDGYU=
I write a class CWAxisYDetector derived from AbstractDetector, the code is:
public class CWAxisYDetector extends AbstractDetector {
private LocalOrbitalFrame locOrbFrm;
private AbsoluteDate initDate;
protected CWAxisYDetector(Orbit targOrb, LocalOrbitalFrame lof,
AbsoluteDate iDate) {
super(targOrb.getKeplerianPeriod() / 3, 1.0e-13 *
targOrb.getKeplerianPeriod());
this.locOrbFrm = lof;
this.initDate = iDate;
}
public int eventOccurred(SpacecraftState s, boolean increasing)
throws OrekitException {
System.out.println(s.getDate().durationFrom(initDate));
return CONTINUE;
}
public double g(SpacecraftState s) throws OrekitException {
return s.getPVCoordinates(locOrbFrm).getPosition().getX();
}
}
but this class can't correct detecting event, and in some integrate
step getinig error information:
Exception in thread "main"
org.apache.commons.math.MathRuntimeException$4: function values at
endpoints do not have different signs. Endpoints: [0.539, 0.539],
Values: [0, 0]
at org.apache.commons.math.MathRuntimeException.createIllegalArgumentException(MathRuntimeException.java:305)
at org.apache.commons.math.analysis.solvers.BrentSolver.solve(BrentSolver.java:219)
at org.apache.commons.math.ode.events.EventState.evaluateStep(EventState.java:229)
at org.apache.commons.math.ode.events.CombinedEventsManager.evaluateStep(CombinedEventsManager.java:152)
at org.apache.commons.math.ode.nonstiff.RungeKuttaIntegrator.integrate(RungeKuttaIntegrator.java:172)
at org.orekit.propagation.numerical.NumericalPropagator.propagate(NumericalPropagator.java:419)
at fr.cs.examples.propagation.SlaveMode.main(SlaveMode.java:136)
why?