Commit 65345d70 authored by Petrus Hyvönen's avatar Petrus Hyvönen
Browse files

orekit 7.0

parent ec15cd20
/** Copyright 2002-2012 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// this file was created by SCC and is largely a derived work from the
// original file AlignmentDetector.java created by CS Systèmes d'Information
package org.orekit.python;
import org.orekit.propagation.events.AlignmentDetector;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.SpacecraftState;
import org.orekit.utils.PVCoordinatesProvider;
import org.orekit.errors.OrekitException;
/** Finder for satellite/body alignment events.
* <p>This class finds alignment events.</p>
* <p>Alignment means the conjunction, with some threshold angle, between the satellite
* position and the projection in the orbital plane of some body position.</p>
* <p>The default implementation behavior is to {@link EventDetector.Action#STOP stop} propagation when
* alignment is reached. This can be changed by overriding the
* {@link #eventOccurred(SpacecraftState, boolean) eventOccurred} method in a
* derived class.</p>
* @see org.orekit.propagation.Propagator#addEventDetector(EventDetector)
* @author Pascal Parraud
*/
public class PythonAlignmentDetector extends AlignmentDetector {
/** Serializable UID. */
private static final long serialVersionUID = -5512125598111644915L;
/** Part of JCC Python interface to object */
private long pythonObject;
/** Part of JCC Python interface to object */
public void pythonExtension(long pythonObject)
{
this.pythonObject = pythonObject;
}
/** Part of JCC Python interface to object */
public long pythonExtension()
{
return this.pythonObject;
}
/** Part of JCC Python interface to object */
public void finalize()
throws Throwable
{
pythonDecRef();
}
/** Part of JCC Python interface to object */
public native void pythonDecRef();
/* Below this is specific class stuff */
/** Build a new alignment detector.
* <p>The orbit is used only to set an upper bound for the max check interval
* to period/3 and to set the convergence threshold according to orbit size.</p>
* @param orbit initial orbit
* @param body the body to align
* @param alignAngle the alignment angle (rad)
*/
public PythonAlignmentDetector(final Orbit orbit,
final PVCoordinatesProvider body,
final double alignAngle) {
super(orbit, body, alignAngle);
}
/** Build a new alignment detector.
* <p>The orbit is used only to set an upper bound for the max check interval
* to period/3.</p>
* @param threshold convergence threshold (s)
* @param orbit initial orbit
* @param body the body to align
* @param alignAngle the alignment angle (rad)
*/
public PythonAlignmentDetector(final double threshold,
final Orbit orbit,
final PVCoordinatesProvider body,
final double alignAngle) {
super(threshold, orbit, body, alignAngle);
}
/** Handle an alignment event and choose what to do next.
* <p>The default implementation behavior is to {@link EventDetector.Action#STOP stop} propagation
* when alignment is reached.</p>
* @param s the current state information : date, kinematics, attitude
* @param increasing if true, the value of the switching function increases
* when times increases around event.
* @return {@link EventDetector.Action#STOP} or {@link EventDetector.Action#CONTINUE}
* @exception OrekitException if some specific error occurs
*/
public native Action eventOccurred(final SpacecraftState s, final boolean increasing)
throws OrekitException;
}
/** Copyright 2002-2012 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// this file was created by SCC and is largely a derived work from the
// original file AltitudeDetector.java created by CS Systèmes d'Information
package org.orekit.python;
import org.orekit.bodies.BodyShape;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.AltitudeDetector;
import org.orekit.errors.OrekitException;
/** Finder for satellite altitude crossing events.
* <p>This class finds altitude events (i.e. satellite crossing
* a predefined altitude level above ground).</p>
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation when ascending and to
* {@link EventDetector.Action#STOP stop} propagation
* when descending. This can be changed by overriding the
* {@link #eventOccurred(SpacecraftState, boolean) eventOccurred} method in a
* derived class.</p>
* @see org.orekit.propagation.Propagator#addEventDetector(EventDetector)
* @author Luc Maisonobe
*/
public class PythonAltitudeDetector extends AltitudeDetector {
/** Serializable UID. */
private static final long serialVersionUID = -1552109617025755015L;
/** Part of JCC Python interface to object */
private long pythonObject;
/** Part of JCC Python interface to object */
public void pythonExtension(long pythonObject)
{
this.pythonObject = pythonObject;
}
/** Part of JCC Python interface to object */
public long pythonExtension()
{
return this.pythonObject;
}
/** Part of JCC Python interface to object */
public void finalize()
throws Throwable
{
pythonDecRef();
}
/** Part of JCC Python interface to object */
public native void pythonDecRef();
/* Below this class specifics */
/** Build a new altitude detector.
* <p>This simple constructor takes default values for maximal checking
* interval ({@link #DEFAULT_MAXCHECK}) and convergence threshold
* ({@link #DEFAULT_THRESHOLD}).</p>
* @param altitude threshold altitude value
* @param bodyShape body shape with respect to which altitude should be evaluated
*/
public PythonAltitudeDetector(final double altitude, final BodyShape bodyShape) {
super(altitude, bodyShape);
}
/** Build a new altitude detector.
* <p>This simple constructor takes default value for convergence threshold
* ({@link #DEFAULT_THRESHOLD}).</p>
* <p>The maximal interval between altitude checks should
* be smaller than the half duration of the minimal pass to handle,
* otherwise some short passes could be missed.</p>
* @param maxCheck maximal checking interval (s)
* @param altitude threshold altitude value (m)
* @param bodyShape body shape with respect to which altitude should be evaluated
*/
public PythonAltitudeDetector(final double maxCheck,
final double altitude,
final BodyShape bodyShape) {
super(maxCheck, altitude, bodyShape);
}
/** Build a new altitude detector.
* <p>The maximal interval between altitude checks should
* be smaller than the half duration of the minimal pass to handle,
* otherwise some short passes could be missed.</p>
* @param maxCheck maximal checking interval (s)
* @param threshold convergence threshold (s)
* @param altitude threshold altitude value (m)
* @param bodyShape body shape with respect to which altitude should be evaluated
*/
public PythonAltitudeDetector(final double maxCheck,
final double threshold,
final double altitude,
final BodyShape bodyShape) {
super(maxCheck, threshold, altitude, bodyShape);
}
/** Handle an altitude event and choose what to do next.
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation when ascending and to
* {@link EventDetector.Action#STOP stop} propagationwhen descending.</p>
* @param s the current state information : date, kinematics, attitude
* @param increasing if true, the value of the switching function increases
* when times increases around event
* @return {@link EventDetector.Action#STOP} or {@link EventDetector.Action#CONTINUE}
* @exception OrekitException if some specific error occurs
*/
public native Action eventOccurred(final SpacecraftState s, final boolean increasing)
throws OrekitException;
}
/** Copyright 2002-2012 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// this file was created by SCC and is largely a derived work from the
// original file ApsideDetector.java created by CS Systèmes d'Information
package org.orekit.python;
import org.orekit.orbits.Orbit;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.ApsideDetector;
import org.orekit.errors.OrekitException;
/** Finder for apside crossing events.
* <p>This class finds apside crossing events (i.e. apogee or perigee crossing).</p>
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation at apogee crossing
* and to {@link EventDetector.Action#STOP stop} propagation
* at perigee crossing. This can be changed by overriding the
* {@link #eventOccurred(SpacecraftState, boolean) eventOccurred} method in a
* derived class.</p>
* <p>Beware that apside detection will fail for almost circular orbits. If
* for example an apside detector is used to trigger an {@link
* org.orekit.forces.maneuvers.ImpulseManeuver ImpulseManeuver} and the maneuver
* change the orbit shape to circular, then the detector may completely fail just
* after the maneuver has been performed!</p>
* @see org.orekit.propagation.Propagator#addEventDetector(EventDetector)
* @author Luc Maisonobe
*/
public class PythonApsideDetector extends ApsideDetector {
/** Serializable UID. */
private static final long serialVersionUID = -7542434866922384844L;
/** Part of JCC Python interface to object */
private long pythonObject;
/** Part of JCC Python interface to object */
public void pythonExtension(long pythonObject)
{
this.pythonObject = pythonObject;
}
/** Part of JCC Python interface to object */
public long pythonExtension()
{
return this.pythonObject;
}
/** Part of JCC Python interface to object */
public void finalize()
throws Throwable
{
pythonDecRef();
}
/** Part of JCC Python interface to object */
public native void pythonDecRef();
/** Build a new instance.
* <p>The orbit is used only to set an upper bound for the
* max check interval to period/3 and to set the convergence
* threshold according to orbit size</p>
* @param orbit initial orbit
*/
public PythonApsideDetector(final Orbit orbit) {
super(orbit);
}
/** Build a new instance.
* <p>The orbit is used only to set an upper bound for the
* max check interval to period/3</p>
* @param threshold convergence threshold (s)
* @param orbit initial orbit
*/
public PythonApsideDetector(final double threshold, final Orbit orbit) {
super(threshold, orbit);
}
/** Handle an apside crossing event and choose what to do next.
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation at apogee
* crossing and to {@link EventDetector.Action#STOP stop} propagation
* at perigee crossing.</p>
* @param s the current state information : date, kinematics, attitude
* @param increasing if true, the value of the switching function increases
* when times increases around event.
* @return {@link EventDetector.Action#STOP} or {@link EventDetector.Action#CONTINUE}
* @exception OrekitException if some specific error occurs
*/
public native Action eventOccurred(final SpacecraftState s, final boolean increasing)
throws OrekitException;
}
/** Copyright 2002-2012 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// this file was created by SCC and is largely a derived work from the
// original file CircularFieldOfViewDetector.java created by CS Systèmes d'Information
package org.orekit.python;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.CircularFieldOfViewDetector;
import org.orekit.utils.PVCoordinatesProvider;
import org.orekit.errors.OrekitException;
/** Finder for target entry/exit events with respect to a satellite sensor field of view.
* <p>This class handle fields of view with a circular boundary.</p>
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation at fov entry and to
* {@link EventDetector.Action#STOP stop} propagation
* at fov exit. This can be changed by overriding the
* {@link #eventOccurred(SpacecraftState, boolean) eventOccurred} method in a
* derived class.</p>
* @see org.orekit.propagation.Propagator#addEventDetector(EventDetector)
* @see DihedralFieldOfViewDetector
* @author V&eacute;ronique Pommier-Maurussane
*/
public class PythonCircularFieldOfViewDetector extends CircularFieldOfViewDetector {
/** Serializable UID. */
private static final long serialVersionUID = 4571340030201230951L;
/** Part of JCC Python interface to object */
private long pythonObject;
/** Part of JCC Python interface to object */
public void pythonExtension(long pythonObject)
{
this.pythonObject = pythonObject;
}
/** Part of JCC Python interface to object */
public long pythonExtension()
{
return this.pythonObject;
}
/** Part of JCC Python interface to object */
public void finalize()
throws Throwable
{
pythonDecRef();
}
/** Part of JCC Python interface to object */
public native void pythonDecRef();
/** Build a new instance.
* <p>The maximal interval between distance to fov boundary checks should
* be smaller than the half duration of the minimal pass to handle,
* otherwise some short passes could be missed.</p>
* @param maxCheck maximal interval in seconds
* @param pvTarget Position/velocity provider of the considered target
* @param center Direction of the fov center, in spacecraft frame
* @param halfAperture Fov half aperture angle
*/
public PythonCircularFieldOfViewDetector(final double maxCheck,
final PVCoordinatesProvider pvTarget, final Vector3D center, final double halfAperture) {
super(maxCheck, pvTarget, center, halfAperture);
}
/** Handle an fov event and choose what to do next.
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation at entry and to
* {@link EventDetector.Action#STOP stop} propagation at exit. This can
* be changed by overriding the {@link #eventOccurred(SpacecraftState, boolean)
* eventOccurred} method in a derived class.</p>
* @param s the current state information : date, kinematics, attitude
* @param increasing if true, the value of the switching function increases
* when times increases around event, i.e. target enters the fov (note that increase
* is measured with respect to physical time, not with respect to propagation which
* may go backward in time)
* @return one of {@link EventDetector.Action#STOP}, {@link EventDetector.Action#RESET_STATE},
* {@link EventDetector.Action#RESET_DERIVATIVES} or {@link EventDetector.Action#CONTINUE}
* @exception OrekitException if some specific error occurs
*/
public native Action eventOccurred(final SpacecraftState s, final boolean increasing)
throws OrekitException;
}
/** Copyright 2002-2012 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// this file was created by SCC and is largely a derived work from the
// original file DihedralFieldOfViewDetector.java created by CS Systèmes d'Information
package org.orekit.python;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.orekit.propagation.events.CircularFieldOfViewDetector;
import org.orekit.propagation.events.DihedralFieldOfViewDetector;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.events.handlers.EventHandler;
import org.orekit.utils.PVCoordinatesProvider;
import org.orekit.errors.OrekitException;
import org.orekit.propagation.SpacecraftState;
/** Finder for body entering/exiting dihedral FOV events.
* <p>This class finds dihedral field of view events (i.e. body entry and exit in FOV).</p>
* <p>The default implementation behavior is to {@link
* org.orekit.propagation.events.handlers.EventHandler.Action#CONTINUE continue}
* propagation at entry and to {@link
* org.orekit.propagation.events.handlers.EventHandler.Action#STOP stop} propagation
* at exit. This can be changed by calling
* {@link #withHandler(EventHandler)} after construction.</p>
* @see org.orekit.propagation.Propagator#addEventDetector(EventDetector)
* @see CircularFieldOfViewDetector
* @author V&eacute;ronique Pommier-Maurussane
*/
public class PythonDihedralFieldOfViewDetector extends DihedralFieldOfViewDetector {
/** Serializable UID. */
private static final long serialVersionUID = 4571340030201230951L;
/** Part of JCC Python interface to object */
private long pythonObject;
/** Part of JCC Python interface to object */
public void pythonExtension(long pythonObject)
{
this.pythonObject = pythonObject;
}
/** Part of JCC Python interface to object */
public long pythonExtension()
{
return this.pythonObject;
}
/** Part of JCC Python interface to object */
public void finalize()
throws Throwable
{
pythonDecRef();
}
/** Part of JCC Python interface to object */
public native void pythonDecRef();
/** Build a new instance.
* <p>The maximal interval between distance to FOV boundary checks should
* be smaller than the half duration of the minimal pass to handle,
* otherwise some short passes could be missed.</p>
* @param maxCheck maximal interval in seconds
* @param pvTarget Position/velocity provider of the considered target
* @param center Direction of the FOV center
* @param axis1 FOV dihedral axis 1
* @param halfAperture1 FOV dihedral half aperture angle 1
* @param axis2 FOV dihedral axis 2
* @param halfAperture2 FOV dihedral half aperture angle 2
*/
public PythonDihedralFieldOfViewDetector(final double maxCheck,
final PVCoordinatesProvider pvTarget, final Vector3D center, final Vector3D axis1, final double halfAperture1,
final Vector3D axis2, final double halfAperture2) {
super(maxCheck, pvTarget, center, axis1, halfAperture1, axis2, halfAperture2);
}
/** Handle an fov event and choose what to do next.
* <p>The default implementation behavior is to {@link
* EventDetector.Action#CONTINUE continue} propagation at entry and to
* {@link EventDetector.Action#STOP stop} propagation at exit. This can
* be changed by overriding the {@link #eventOccurred(SpacecraftState, boolean)
* eventOccurred} method in a derived class.</p>
* @param s the current state information : date, kinematics, attitude
* @param increasing if true, the value of the switching function increases
* when times increases around event, i.e. target enters the fov (note that increase
* is measured with respect to physical time, not with respect to propagation which
* may go backward in time)
* @return one of {@link EventDetector.Action#STOP}, {@link EventDetector.Action#RESET_STATE},
* {@link EventDetector.Action#RESET_DERIVATIVES} or {@link EventDetector.Action#CONTINUE}
* @exception OrekitException if some specific error occurs
*/
public native Action eventOccurred(final SpacecraftState s, final boolean increasing)
throws OrekitException;
}
/** Copyright 2014 SSC and 2002-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with