Bug #235

'CelestialBody' does not have 'getPVCoordinates'

Added by Yongjun Moon over 1 year ago. Updated over 1 year ago.

Status:ResolvedStart date:2016-03-18
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

I know CelestialBody HAS getPVCoordinates in JAVA, but I can't use the method.

For example, in Python,

sun = CelestialBodyFactory.getSun()
dir(sun)

then, I got
['class', 'delattr', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'le', 'lt', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'jobject', 'bodyOrientedFrame', 'boxfn', 'cast', 'class', 'class', 'equals', 'gM', 'getBodyOrientedFrame', 'getClass', 'getGM', 'getInertiallyOrientedFrame', 'getName', 'hashCode', 'inertiallyOrientedFrame', 'instance', 'name', 'notify', 'notifyAll', 'toString', 'wait', 'wrapfn']

History

#1 Updated by Petrus Hyvönen over 1 year ago

  • Status changed from New to Resolved

Hi,

Yes, this is a bit odd, I am not sure of the exact reason that this happens but likely related to that CelestialBody is an interface. What one needs to do is to point out which interface you would like to see by casting it:

sun = CelestialBodyFactory.getSun() # Here we get it as an CelestialBody
sun = PVCoordinatesProvider.cast_(sun) # But we want the PVCoord interface

Best Regards
/Petrus

Also available in: Atom PDF