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

RE: [Orekit Users] Re. how to deletgate Orbit class??



Thanks for the suggestions. Yes, Propagator is more convenient to work with than Orbit, because it is an interface. However, the Propagator.propagate methods return SpacecraftState objects. The problem is the SpacecraftState class which uses an Orbit object to do all its work.

Again, if Orbit were an interface, instead of a class, this would be much easier.   Unfortunately, just writing a new class that implements PVCoordinatesProvider would be insufficient, because of the SpacecraftState issue. If SpacecraftState used a PVCoordinatesProvider instead of an Orbit, that would also make what I am trying to do much easier.

So... I would like to post a request for a future enhancement, that Orbit be converted into an interface.

I think that I have made it work as is, subclassing Orbit and overriding everything in Orbit with delegation so that the base class is non-functional (except for the constructor).

Jim


________________________________________
From: orekit-users-request@orekit.org [orekit-users-request@orekit.org] on behalf of Ward, Evan [Evan.Ward@nrl.navy.mil]
Sent: Thursday, January 25, 2018 6:09 AM
To: orekit-users@orekit.org
Subject: Re: [Orekit Users] Re. how to deletgate Orbit class??

Hi Jim,

Welcome to the Orekit mailing lists.

On Wed, 2018-01-24 at 23:02 +0100, schatzman-james@n-ask.com wrote:

There are some errors in the previous code. The methods that return
PVCoordinates need to be to fixed to called the apply() method in BiasModel to
apply the biases, and the methods that take otherFrame/outputFrame make this
slightly harder. Oh well!


It looks like you're only applying the bias in the getPVCoordinates method. Have you considered extending PVCoordinatesProvider instead of Orbit? The Orbit class hierarchy is used to represent different types of orbital elements at a single instant in time, though they can be either osculating or mean elements. From my limited understanding of your problem I think you would be better served implementing a PVCP or extending a Propagator if you need event detection and step handlers. Is there a reason it needs to be an Orbit?

Best Regards,
Evan



So... I can fix that, but I am still concerned about the issues of the
constructor and the protected methods. I could tweak the Orekit source code.
Maybe that would work. I have made some other tweaks but updating my own
version of Orekit as the official version gets updated is a pain.

I am still hoping that there is some way to do this in virgin Orekit. Any
suggestions?

Thanks!

Jim