Skip to content

Commit

Permalink
Updates for Python wrappers for 12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
petrushy committed Nov 3, 2023
1 parent da3fe0f commit 9a7666b
Show file tree
Hide file tree
Showing 21 changed files with 387 additions and 76 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.estimation.measurements.generation;

import org.orekit.estimation.measurements.ObservedMeasurement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2002-2021 CS GROUP
/* Copyright SSC 2023
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
Expand All @@ -15,8 +15,8 @@
* limitations under the License.
*/

// this file was created by SSC 2021 and is largely a derived work from the
// original java class
// This file was created by SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements


package org.orekit.files.ccsds.utils.generation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

package org.orekit.files.ccsds.utils.lexical;

;
import org.xml.sax.Attributes;

import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Contributed in the public domain.
* Licensed to CS Group (CS) under one or more
/* Copyright SSC 2023
* Licensed to CS GROUP (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
Expand All @@ -15,8 +15,8 @@
* limitations under the License.
*/

// this file was created by SCC 2020 and is largely a derived work from the
// original java class/interface
// This file was created by SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.forces.gravity.potential;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2002-2020 CS GROUP
/* Copyright SSC 2023
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
Expand All @@ -15,25 +15,33 @@
* limitations under the License.
*/

// this file was created by SCC 2020 and is largely a derived work from the
// original java class/interface
// This file was created by SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements


package org.orekit.forces.maneuvers.propulsion;

import org.hipparchus.CalculusFieldElement;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.propagation.SpacecraftState;
import org.orekit.forces.maneuvers.Control3DVectorCostType;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.ParameterDriver;

import java.util.List;

public class PythonAbstractConstantThrustPropulsionModel extends AbstractConstantThrustPropulsionModel implements ThrustPropulsionModel {

public class PythonAbstractConstantThrustPropulsionModel extends AbstractConstantThrustPropulsionModel {

/** Part of JCC Python interface to object */
private long pythonObject;
protected long pythonObject;
public void pythonExtension(long pythonObject) {
this.pythonObject = pythonObject;
}
public long pythonExtension() {
return this.pythonObject;
}
public void finalize() throws Throwable { pythonDecRef(); }
public native void pythonDecRef();

/**
* Generic constructor.
Expand All @@ -43,13 +51,8 @@ public class PythonAbstractConstantThrustPropulsionModel extends AbstractConstan
* @param direction initial thrust direction in S/C frame
* @param name name of the maneuver
*/
public PythonAbstractConstantThrustPropulsionModel(double thrust, double isp, Vector3D direction, String name) {
super(thrust, isp, direction, name);
}

@Override
public Vector3D getInitialThrustVector() {
return super.getInitialThrustVector();
public PythonAbstractConstantThrustPropulsionModel(double thrust, double isp, Vector3D direction, Control3DVectorCostType control3DVectorCostType, String name) {
super(thrust, isp, direction, control3DVectorCostType, name);
}


Expand All @@ -58,6 +61,8 @@ public Vector3D getInitialThrustVector() {
public native Vector3D getThrustVector();

// TODO: Check how to implement difference on these
// TODO: Is it needed with these defaults being exposed again?

@Override
public native Vector3D getThrustVector(AbsoluteDate date);

Expand Down Expand Up @@ -96,36 +101,12 @@ public <T extends CalculusFieldElement<T>> T getFlowRate(T[] parameters) {
/** {@inheritDoc} */
public native <T extends CalculusFieldElement<T>> T getFlowRate_T(T[] parameters);

/** 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();

///** {@inheritDoc} */
//@Override
//public native void init(SpacecraftState initialState, AbsoluteDate target);

/** {@inheritDoc} */
@Override
public native void init(SpacecraftState initialState, AbsoluteDate target);

/** {@inheritDoc} */
@Override
public List<ParameterDriver> getParametersDrivers() {
return null;
}
public native List<ParameterDriver> getParametersDrivers();
}
20 changes: 20 additions & 0 deletions src/main/java/org/orekit/frames/PythonFieldStaticTransform.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.frames;

import org.hipparchus.CalculusFieldElement;
Expand Down
21 changes: 20 additions & 1 deletion src/main/java/org/orekit/frames/PythonFrames.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.frames;

;
import org.orekit.time.UT1Scale;
import org.orekit.utils.IERSConventions;

Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/orekit/frames/encounter/PythonEncounterLOF.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.frames.encounter;

import org.hipparchus.CalculusFieldElement;
Expand Down
21 changes: 20 additions & 1 deletion src/main/java/org/orekit/gnss/metric/parser/PythonDataField.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.gnss.metric.parser;

;

public class PythonDataField implements DataField {
/** Part of JCC Python interface to object */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
package org.orekit.gnss.metric.parser;
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

;
package org.orekit.gnss.metric.parser;

public class PythonEncodedMessage implements EncodedMessage {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements

package org.orekit.propagation.conversion;

import org.hipparchus.CalculusFieldElement;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* Copyright SSC 2023
* Licensed to CS GROUP (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 SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements


package org.orekit.propagation.events;

import org.orekit.propagation.SpacecraftState;

public class PythonAdaptableInterval implements AdaptableInterval {

/** Part of JCC Python interface to object */
protected long pythonObject;
public void pythonExtension(long pythonObject) {
this.pythonObject = pythonObject;
}
public long pythonExtension() {
return this.pythonObject;
}
public void finalize() throws Throwable { pythonDecRef(); }
public native void pythonDecRef();

/** {@inheritDoc} */
@Override
public native double currentInterval(SpacecraftState state);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Copyright 2014 SSC and 2002-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright SSC 2014-2023
* Licensed to CS GROUP (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
Expand All @@ -15,8 +15,9 @@
* limitations under the License.
*/

// this file was created by SCC and is largely a derived work from the
// original file EventDetector.java created by CS Systèmes d'Information
// This file was created by SSC and updated by SSC in 2023 and is largely a derived work from the
// original java class/interface that it inherits/implements


package org.orekit.propagation.events;

Expand Down
Loading

0 comments on commit 9a7666b

Please sign in to comment.