Frame and ExtendedPVCoordinatesProvider

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?

I also have the conversion the other way round:

        public Transform getTransform(final AbsoluteDate date) {
            return new Transform(date, provider.getPVCoordinates(date, defining).negate());
        }

Hi @luc,

+1 for the availability of the conversion functions on a larger scale !

+1 too. I think it is better to have it in a utility class.