Hi,
I am working on a project wherein I need the heliocentric states of Earth and Mars expressed in EME2000 frame. I am guessing the way to approach this to obtain the Earth and Mars using frame = sun.getInertiallyOrientedFrame()
and then transform it to EME2000. The way I went about this is as follows:
# Obtain Earth and Mars positions
earth = CelestialBodyFactory.getEarth()
earthpvprovider = PVCoordinatesProvider.cast_(earth)
mars = CelestialBodyFactory.getMars()
marspvprovider = PVCoordinatesProvider.cast_(mars)
sun = CelestialBodyFactory.getSun()
eci = sun.getInertiallyOrientedFrame()
eme2000 = FramesFactory.getEME2000()
earthp = earthpvprovider.getPVCoordinates(EPOCH_DEP.get_absolutedate(), eci).getPosition()
earthv = earthpvprovider.getPVCoordinates(EPOCH_DEP.get_absolutedate(), eci).getVelocity()
marsp = marspvprovider.getPVCoordinates(EPOCH_ARR.get_absolutedate(),eci).getPosition()
marsv = marspvprovider.getPVCoordinates(EPOCH_ARR.get_absolutedate(),eci).getVelocity()
transform_epoch = eci.getTransformTo(eme2000, EPOCH_DEP.get_absolutedate())
transform_arrival = eci.getTransformTo(eme2000, EPOCH_ARR.get_absolutedate())
earthp_eme2000 = transform_epoch.transformPosition(earthp)
But I am getting the following error. Can somebody explain where I am going wrong here? Thanks!
AttributeError Traceback (most recent call last)
/tmp/ipykernel_21945/3051891755.py in <module>
16 transform_arrival = eci.getTransformTo(eme2000, EPOCH_ARR.get_absolutedate())
17
---> 18 earthp_eme2000 = transform_epoch.transformPosition(earthp)
19
20 lambert = IodLambert(CelestialBodyFactory.getSun().getGM())
AttributeError: 'Transform' object has no attribute 'transformPosition'