Class BaseInterpolation

    • Method Detail

      • interpolateBetweenAlignedNoCopy

        protected abstract List<ISTInterpolationEvent> interpolateBetweenAlignedNoCopy​(ISTInterpolationEvent first,
                                                                                       ISTInterpolationEvent second)
        This method assumes that the events are already aligned and that it is not supposed to add them to the results.
        Parameters:
        first - The first event to be used for interpolation between
        second - The second event to be used for interpolation between
        Returns:
        A list of event reports that were created as a
      • createInterpolatedSTEvent

        protected abstract ISTInterpolationEvent createInterpolatedSTEvent​(org.joda.time.DateTime startTime,
                                                                           org.joda.time.DateTime endTime,
                                                                           EventType type,
                                                                           org.locationtech.jts.geom.Coordinate[] i_coordinates)
        This method is used to produce and verify the polygon of an event with the input data.
        Parameters:
        startTime - The start time of the event
        endTime - The end time of the event
        type - The type of the event
        i_coordinates - The coordinates of the polygon to use in the event
        Returns:
      • interpolateTrajectory

        protected ISTInterpolationTrajectory interpolateTrajectory​(ISTInterpolationTrajectory inTrajectory)
        Interpolates new event reports between the reports contained within the input trajectory and returns a new trajectory object with the new data. The original event reports are copied and temporally aligned with a epoch and a set cadence rate. The original trajectory shall remain unedited.
        Parameters:
        inTrajectory - The input trajectory that is to be interpolated.
        Returns:
        An interpolated trajectory that is a representation of the input if it had reports at the desired cadence rate.
      • interpolateBetween

        protected List<ISTInterpolationEvent> interpolateBetween​(ISTInterpolationEvent first,
                                                                 ISTInterpolationEvent second)
        Interpolates new event reports between the two reports that are passed in and returns a list of the interpolated polygon representations. The original event reports are copied to be the first and last elements in the returned list. They are also temporally aligned with an epoch and a set cadence rate. The original objects shall remain unedited.
        Parameters:
        first - The first element to interpolate between
        second - The end element to interpolate between
        Returns:
        A list of interpolated polygon objects between the two input objects
      • projectEventForward

        protected ISTInterpolationEvent projectEventForward​(ISTInterpolationEvent ev,
                                                            org.joda.time.DateTime time)
        Method projects an event forward using the approximate differential rotation of the sun
        Parameters:
        ev - The event to project forward
        time - The new time to project the location of the event at
        Returns:
        A new interpolated event projected forward in time
      • projectEventBack

        protected ISTInterpolationEvent projectEventBack​(ISTInterpolationEvent ev,
                                                         org.joda.time.DateTime time)
        Method projects an event back using the approximate differential rotation of the sun
        Parameters:
        ev - The event to project backwards
        time - The new time to project the location of the event at
        Returns:
        A new interpolated event project back in time
      • linearInterpolate

        protected double linearInterpolate​(double x_0,
                                           double x_n,
                                           double factor)
        Linearly interpolates a 1D variable (between x_0 and x_n). factor is the step size Say you have x_0 = 1, x_n = 11, factor=0.4, your interpolated result will be 5
        Parameters:
        x_0 - - minimum bound
        x_n - - maximum bound
        factor - - the factor of linear interpolation (factor must be between 0 and 1)
        Returns:
        - interpolated result