Pascal,
I am extremely sorry about the name.
At first I didn’t have any idea about what to give in the argument as for free parameters, but OREKIT threw me a exception saying that it can’t be none other than “central attraction coefficient”. I wish there was some more example code/snippet in the site for better understanding.
Also, the states that I passed on as argument is a list not an array, I assume the error could be from free parameters (not sure though).
Regards,
Justin
From: pascal parraud
Sent: Thursday, March 30, 2017 11:34
To: justin4leb@gmail.com; orekit-users@orekit.org
Subject: Re: [Orekit Users] Mimic TLEPropagator with Numerical?
Hi Justin,
Only to say I'm not Paul, I'm Pascal, one of the developpers of OREKIT.
I don't know anything about Python, but it seems you pass an array of SpacecraftState while the method expects a List, but maybe it is OK with Python.
The free parameters are the parameters that will be adapted by the process to get the best fitting, in your case you say that you want to adjust the central attraction coefficient (mu), which seems correct (but weird) as you only consider the attraction of the central body for the numerical propagator (you don't add any other force).
By the way, please answer the oerkit-users list, you may receive more appropriate answers from Python experts.
Regards,
Pascal
Le 30/03/2017 à 16:58, justin4leb@gmail.com a écrit :
Hello Paul,
Thank you for your time. I am still having errors using list of SpacecraftState generated from TLEPropagator.
Also, I’m finding it difficult to understand “free parameters” as argument. Can you help me out?
For your reference:
Here is the code:
from org.orekit.python import PythonEventHandler, PythonOrekitFixedStepHandler
class StatesHandler(
PythonOrekitFixedStepHandler): states = []
def init(self,s0, t):
pass
def handleStep(self,currentState, isLast):
self.states.append(
currentState)
def getStates(self):
return self.states
propagator_tleA = TLEPropagator.
selectExtrapolator(objA_tle) pvA_init = propagator_tleA.propagate(epo_
objA).getPVCoordinates() initialOrbitA = CartesianOrbit(pvA_init, inertialFrame, epo_objA, mu)
tleStepHandler = StatesHandler()
propagator_tleA.setMasterMode(
60., tleStepHandler) propagator_tleA.propagate(epo_
objA.shiftedBy(2.*period_objA) ) tleStates = tleStepHandler.getStates()
odeIntegratorBuilder = DormandPrince853IntegratorBuil
der(0.001, 1000.0, 1.e-2) builder = NumericalPropagatorBuilder(
initialOrbitA, odeIntegratorBuilder, PositionAngle.TRUE, 1.e-2) fitter = JacobianPropagatorConverter(
builder, 1.e-6, 5000) fp = "central attraction coefficient"
numpropA = fitter.convert(tleStates, False, fp)
Getting this error:
InvalidArgsErrorTraceback (most recent call last)
<ipython-input-8-f3a296acdfd7> in <module>()
3 fitter = JacobianPropagatorConverter(
builder, 1.e-6, 5000) 4 fp = "central attraction coefficient"
----> 5 numpropA = fitter.convert(tleStates, False, fp)
InvalidArgsError: (<type 'JacobianPropagatorConverter'>
, 'convert', ([<SpacecraftState: org.orekit.propagation. SpacecraftState@318ba8c8>,.... , <SpacecraftState: org.orekit.propagation. SpacecraftState@7ed7259e>], False, 'central attraction coefficient'))
Thank you in advance.
Regards,
Justin
From: pascal parraud
Sent: Thursday, March 30, 2017 03:56
To: orekit-users@orekit.org
Subject: Re: [Orekit Users] Mimic TLEPropagator with Numerical?
Hello Justin,
It looks like a bug, I can't understand why a resetState is called when creating a sample of SpacecraftState for the initialization of the conversion.
You can bypass the issue by making the conversion from a list of SpacecraftState generated by yourself from the TLEPropagator (take a look at the private method createSample from the AbstractPropagatorConverter class, you can also comment the instruction "source.resetInitialState(
initialState);" which causes the exception). Regards,
Pascal
Le 29/03/2017 à 18:49, justin4leb@gmail.com a écrit :
Evan,
I tried similar method using the reference you gave. But unfortunately, TLEPropagator is causing some error. Here is the code I used:
odeIntegratorBuilder = DormandPrince853IntegratorBuil
der(0.001, 1000.0, 1.e-2) builder = NumericalPropagatorBuilder(
initialOrbitA, odeIntegratorBuilder, PositionAngle.TRUE, 1.e-2) fitter = JacobianPropagatorConverter(
builder, 1.e-6, 5000) numpropA = fitter.convert(propagator_
tleA, 2*T_objA, 251, "central attraction coefficient")
and the error it says is:
JavaError: org.orekit.errors.
OrekitException: reset state not allowed Java stacktrace:
org.orekit.errors.
OrekitException: reset state not allowed at org.orekit.propagation.
analytical.tle.TLEPropagator. resetInitialState( TLEPropagator.java:473) at org.orekit.propagation.
conversion. AbstractPropagatorConverter. createSample( AbstractPropagatorConverter. java:265) at org.orekit.propagation.
conversion. AbstractPropagatorConverter. convert( AbstractPropagatorConverter. java:149)
Can you comment on this?
Thank you.
Regards,
Justin
From: Ward, Evan
Sent: Wednesday, March 29, 2017 09:55
To: orekit-users@orekit.org
Subject: Re: [Orekit Users] Mimic TLEPropagator with Numerical?
On Wed, 2017-03-29 at 09:41 -0400, Justin Leblanc wrote:
> Hello Evan,
>
> Thank you for your time. I never tried PropagatorConverter yet, but I
> cam across it earlier. I would give a try now. But it would be more
> helpful if I have an example or more likely a
> "PropagatorConverterTest" to avoid programming errors also I could
> get a rough idea about timeSpan and nbpoints. Is it possible that you
> can provide me a sample code?
Try taking a look at [1]. It is part of the examples that come with the
library source. This particular example is converting from a
NumericalPropagator to a KeplerianPropagator, but the principle is the
same.
Best Regards,
Evan
[1] https://www.orekit.org/
forge/projects/orekit/ repository/revisions/m aster/entry/src/tutorials/
java/fr/cs/examples/ conversion/PropagatorConv ersion.java
>
> Thank you again for your help.
>
> Regards,
> Justin
>
> On Tue, Mar 28, 2017 at 4:12 PM, Ward, Evan <Evan.Ward@nrl.navy.mil>
> wrote:
> > Hi Justin,
> >
> > Welcome to Orekit.On Tue, 2017-03-28 at 21:01 +0200, justin4leb@gma
> > il.com wrote:
> > > Hello All,
> > >
> > > I am new in using OREKIT. I was wondering if its possible to
> > mimic
> > > TLEPropagator by incorporating similar force models into a
> > Numerical
> > > propagator. Basically, I am trying to replicate the results of
> > the
> > > "Satellite
> > > Orbital Conjunction Reports Assessing Threatening Encounters in
> > > Space" (SOCRATES) that are given in the celestrak
> > > website :http://celestrak.com/cgi-bin/
searchSOCRATES.pl?IDENT=NAM > > E&NA
> > > ME_TEXT1=&NAME_TEXT2=&ORDER=
MINRANGE&MAX=10 > > >
> > > I am able to get exact (very closer : +/-0.1 seconds) closest
> > > approach
> > > results, but not with a Numerical Propagator (with J2
> > perturbations).
> > > I am
> > > aware TLEprop is based on SGP4/SDP4 model but I wonder if it is
> > > possible to
> > > bring that model into Numerical. Because I would like to
> > experiment
> > > by
> > > applying small delta-Vs to the state to increase the closest
> > approach
> > > distance
> > > which cannot be done within a TLEPropagator.
> >
> > Try taking a look at the propagation.conversion package,
> > specifically
> > the PropagatorConverter and PropagatorBuilder. While you won't be
> > able
> > to recover the exact initial condition used to create the TLE
> > (TLE's
> > are a form of lossy compression) it should match to the accuracy of
> > the
> > TLE theory. You'll probably need to experiment with the timeSpan
> > and
> > nbPoints parameters to fit your use case.
> >
> > Best Regards,
> >
> > Evan
--