Hi all,
As part of solving issue 1000, I had to convert a Frame
into an ExtendedPVCoordinatesProvider
, where the point considered is the origin of the frame.
The code is straightforward, just a few lines:
public TimeStampedPVCoordinates getPVCoordinates(final AbsoluteDate date, final Frame frame) {
return new TimeStampedPVCoordinates(date,
originFrame.
getTransformTo(frame, date).
transformPVCoordinates(PVCoordinates.ZERO));
}
}
I wonder if this should be made available on a larger scale, rather than hidden in a private enclosed class. I first thought we could have Frame
implement ExtendedPVCoordinatesProvider
but this seems to generate circular dependency to me, I would prefer Frame
to remain at a very low level. Another possibility could be a utility class.
What do you think?