Class Rugged


  • public class Rugged
    extends Object
    Main class of Rugged library API.
    Author:
    Luc Maisonobe, Guylaine Prat, Jonathan Guinet, Lucie LabatAllee
    See Also:
    RuggedBuilder
    • Method Detail

      • getName

        public String getName()
        Get the Rugged name.
        Returns:
        Rugged name
        Since:
        2.0
      • getAlgorithm

        public IntersectionAlgorithm getAlgorithm()
        Get the DEM intersection algorithm.
        Returns:
        DEM intersection algorithm
      • getAlgorithmId

        public AlgorithmId getAlgorithmId()
        Get the DEM intersection algorithm identifier.
        Returns:
        DEM intersection algorithm Id
        Since:
        2.2
      • isLightTimeCorrected

        public boolean isLightTimeCorrected()
        Get flag for light time correction.
        Returns:
        true if the light time between ground and spacecraft is compensated for more accurate location
      • isAberrationOfLightCorrected

        public boolean isAberrationOfLightCorrected()
        Get flag for aberration of light correction.
        Returns:
        true if the aberration of light time is corrected for more accurate location
      • getRefractionCorrection

        public AtmosphericRefraction getRefractionCorrection()
        Get the atmospheric refraction model.
        Returns:
        atmospheric refraction model
        Since:
        2.0
      • getLineSensors

        public Collection<LineSensor> getLineSensors()
        Get the line sensors.
        Returns:
        line sensors
      • getMinDate

        public AbsoluteDate getMinDate()
        Get the start of search time span.
        Returns:
        start of search time span
      • getMaxDate

        public AbsoluteDate getMaxDate()
        Get the end of search time span.
        Returns:
        end of search time span
      • isInRange

        public boolean isInRange​(AbsoluteDate date)
        Check if a date is in the supported range.

        The support range is given by the minDate and maxDate construction parameters, with an overshootTolerance margin accepted (i.e. a date slightly before minDate or slightly after maxDate will be considered in range if the overshoot does not exceed the tolerance set at construction).

        Parameters:
        date - date to check
        Returns:
        true if date is in the supported range
      • getEllipsoid

        public ExtendedEllipsoid getEllipsoid()
        Get the observed body ellipsoid.
        Returns:
        observed body ellipsoid
      • directLocation

        public GeodeticPoint[] directLocation​(String sensorName,
                                              double lineNumber)
        Direct location of a sensor line.
        Parameters:
        sensorName - name of the line sensor
        lineNumber - number of the line to localize on ground
        Returns:
        ground position of all pixels of the specified sensor line
      • directLocation

        public GeodeticPoint directLocation​(AbsoluteDate date,
                                            Vector3D sensorPosition,
                                            Vector3D los)
        Direct location of a single line-of-sight.
        Parameters:
        date - date of the location
        sensorPosition - sensor position in spacecraft frame. For simplicity, due to the size of sensor, we consider each pixel to be at sensor position
        los - normalized line-of-sight in spacecraft frame
        Returns:
        ground position of intersection point between specified los and ground
      • dateLocation

        public AbsoluteDate dateLocation​(String sensorName,
                                         double latitude,
                                         double longitude,
                                         int minLine,
                                         int maxLine)
        Find the date at which sensor sees a ground point.

        This method is a partial inverse location focusing only on date.

        The point is given only by its latitude and longitude, the elevation is computed from the Digital Elevation Model.

        Note that for each sensor name, the minLine and maxLine settings are cached, because they induce costly frames computation. So these settings should not be tuned very finely and changed at each call, but should rather be a few thousand lines wide and refreshed only when needed. If for example an inverse location is roughly estimated to occur near line 53764 (for example using RoughVisibilityEstimator), minLine and maxLine could be set for example to 50000 and 60000, which would be OK also if next line inverse location is expected to occur near line 53780, and next one ... The setting could be changed for example to 55000 and 65000 when an inverse location is expected to occur after 55750. Of course, these values are only an example and should be adjusted depending on mission needs.

        Parameters:
        sensorName - name of the line sensor
        latitude - ground point latitude (rad)
        longitude - ground point longitude (rad)
        minLine - minimum line number
        maxLine - maximum line number
        Returns:
        date at which ground point is seen by line sensor
        See Also:
        inverseLocation(String, double, double, int, int), RoughVisibilityEstimator
      • dateLocation

        public AbsoluteDate dateLocation​(String sensorName,
                                         GeodeticPoint point,
                                         int minLine,
                                         int maxLine)
        Find the date at which sensor sees a ground point.

        This method is a partial inverse location focusing only on date.

        Note that for each sensor name, the minLine and maxLine settings are cached, because they induce costly frames computation. So these settings should not be tuned very finely and changed at each call, but should rather be a few thousand lines wide and refreshed only when needed. If for example an inverse location is roughly estimated to occur near line 53764 (for example using RoughVisibilityEstimator), minLine and maxLine could be set for example to 50000 and 60000, which would be OK also if next line inverse location is expected to occur near line 53780, and next one ... The setting could be changed for example to 55000 and 65000 when an inverse location is expected to occur after 55750. Of course, these values are only an example and should be adjusted depending on mission needs.

        Parameters:
        sensorName - name of the line sensor
        point - point to localize
        minLine - minimum line number
        maxLine - maximum line number
        Returns:
        date at which ground point is seen by line sensor
        See Also:
        inverseLocation(String, GeodeticPoint, int, int), RoughVisibilityEstimator
      • inverseLocation

        public SensorPixel inverseLocation​(String sensorName,
                                           double latitude,
                                           double longitude,
                                           int minLine,
                                           int maxLine)
        Inverse location of a ground point.

        The point is given only by its latitude and longitude, the elevation is computed from the Digital Elevation Model.

        Note that for each sensor name, the minLine and maxLine settings are cached, because they induce costly frames computation. So these settings should not be tuned very finely and changed at each call, but should rather be a few thousand lines wide and refreshed only when needed. If for example an inverse location is roughly estimated to occur near line 53764 (for example using RoughVisibilityEstimator), minLine and maxLine could be set for example to 50000 and 60000, which would be OK also if next line inverse location is expected to occur near line 53780, and next one ... The setting could be changed for example to 55000 and 65000 when an inverse location is expected to occur after 55750. Of course, these values are only an example and should be adjusted depending on mission needs.

        Parameters:
        sensorName - name of the line sensor
        latitude - ground point latitude (rad)
        longitude - ground point longitude (rad)
        minLine - minimum line number
        maxLine - maximum line number
        Returns:
        sensor pixel seeing ground point, or null if ground point cannot be seen between the prescribed line numbers
        See Also:
        RoughVisibilityEstimator
      • inverseLocation

        public SensorPixel inverseLocation​(String sensorName,
                                           GeodeticPoint point,
                                           int minLine,
                                           int maxLine)
        Inverse location of a point.

        Note that for each sensor name, the minLine and maxLine settings are cached, because they induce costly frames computation. So these settings should not be tuned very finely and changed at each call, but should rather be a few thousand lines wide and refreshed only when needed. If for example an inverse location is roughly estimated to occur near line 53764 (for example using RoughVisibilityEstimator), minLine and maxLine could be set for example to 50000 and 60000, which would be OK also if next line inverse location is expected to occur near line 53780, and next one ... The setting could be changed for example to 55000 and 65000 when an inverse location is expected to occur after 55750. Of course, these values are only an example and should be adjusted depending on mission needs.

        Parameters:
        sensorName - name of the line sensor
        point - geodetic point to localize
        minLine - minimum line number where the search will be performed
        maxLine - maximum line number where the search will be performed
        Returns:
        sensor pixel seeing point, or null if point cannot be seen between the prescribed line numbers
        See Also:
        dateLocation(String, GeodeticPoint, int, int), RoughVisibilityEstimator
      • distanceBetweenLOS

        public double[] distanceBetweenLOS​(LineSensor sensorA,
                                           AbsoluteDate dateA,
                                           double pixelA,
                                           SpacecraftToObservedBody scToBodyA,
                                           LineSensor sensorB,
                                           AbsoluteDate dateB,
                                           double pixelB)
        Compute distances between two line sensors.
        Parameters:
        sensorA - line sensor A
        dateA - current date for sensor A
        pixelA - pixel index for sensor A
        scToBodyA - spacecraft to body transform for sensor A
        sensorB - line sensor B
        dateB - current date for sensor B
        pixelB - pixel index for sensor B
        Returns:
        distances computed between LOS and to the ground
        Since:
        2.0
      • inverseLocationDerivatives

        public <T extends Derivative<T>> T[] inverseLocationDerivatives​(String sensorName,
                                                                        GeodeticPoint point,
                                                                        int minLine,
                                                                        int maxLine,
                                                                        DerivativeGenerator<T> generator)
        Inverse location of a point with derivatives.
        Type Parameters:
        T - derivative type
        Parameters:
        sensorName - name of the line sensor
        point - point to localize
        minLine - minimum line number
        maxLine - maximum line number
        generator - generator to use for building Derivative instances
        Returns:
        sensor pixel seeing point with derivatives, or null if point cannot be seen between the prescribed line numbers
        Since:
        2.0
        See Also:
        inverseLocation(String, GeodeticPoint, int, int)
      • getScToInertial

        public Transform getScToInertial​(AbsoluteDate date)
        Get transform from spacecraft to inertial frame.
        Parameters:
        date - date of the transform
        Returns:
        transform from spacecraft to inertial frame
      • getInertialToBody

        public Transform getInertialToBody​(AbsoluteDate date)
        Get transform from inertial frame to observed body frame.
        Parameters:
        date - date of the transform
        Returns:
        transform from inertial frame to observed body frame
      • getBodyToInertial

        public Transform getBodyToInertial​(AbsoluteDate date)
        Get transform from observed body frame to inertial frame.
        Parameters:
        date - date of the transform
        Returns:
        transform from observed body frame to inertial frame
      • getLineSensor

        public LineSensor getLineSensor​(String sensorName)
        Get a sensor.
        Parameters:
        sensorName - sensor name
        Returns:
        selected sensor
      • getScToBody

        public SpacecraftToObservedBody getScToBody()
        Get converter between spacecraft and body.
        Returns:
        the scToBody
        Since:
        2.0