[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] Instantiating TLEPropagator Fails

Hi Luc

That did the trick!  I'll keep in mind to look for the factory pattern rather than trying to use the constructor directly where the constructor is protected.


- MikeC

This e-mail and message, including all attachments, is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, or the employee, or agent responsible to the intended recipient, you are hereby notified that any disclosure, distribution, dissemination, downloading, copying, or taking of action based on the contents of this message is prohibited. If you have received this e-mail in error, please notify the sender of the e-mail, and delete the e-mail immediately from your computer.

On Mar 8, 2014, at 12:46 PM, MAISONOBE Luc <luc.maisonobe@c-s.fr>

michael.corvin@kinetx.com a écrit :


Hi Michael,

First, compliments to the team on a very, very well architected library!  I am

Thank a lot for these kind words.

just exploring how to use it, instantiating the objects within Matlab.  I've
been using the Keplerian propagator successfully, but can't understand why I'm
getting the following error when trying to instantiate a TLEPropagator:

code fragment:

%% ITRF Earth Frame
ITRF = FramesFactory.getITRF2008()
earth = OneAxisEllipsoid(const.re, const.flattening, ITRF)

%% ISS current TLE from Celestrak
tleLine = ...
   {'1 25544U 98067A   14066.59481438  .00023344  00000-0  39858-3 0  8248'
   '2 25544  51.6482 243.1693 0003329 216.1098 255.4889 15.51194691875564'}
issTLE = TLE(tleLine{1},tleLine{2})

issMass = 500000.0; % kg

%% Attitude provider
issAttitude = BodyCenterPointing(ITRF)

%% TLE Propagator
issPropagator = TLEPropagator(issTLE, issAttitude, issMass)

All of the objects get created ok up to the issPropagator, which throws:

"No constructor 'org.orekit.propagation.analytical.tle.TLEPropagator' with
matching signature found."

issTLE is of class TLE,
issAttitude is of class BodyCenterPointing < implements AttitudeProvider
issMass is of class double

( I did try passing java.lang.Double(issMass) to be certain it's passed as a
java double, but that should be happening anyway the way Matlab invokes Java?)

According to the Java doc and looking at the source for TLEPropagator that
should work?  Or what am I missing?

The constructor you try to use is protected, so U guess the error is due to access restrictions. Instead of calling it, you should use the static factory method

TLEPropagator selectExtrapolator(tle, attitudeProvider,mass)

best regards,

Merci beaucoup et salutations de l'Arizona!

This message was sent using IMP, the Internet Messaging Program.