diff --git a/rugged-api/src/main/java/org/orekit/rugged/api/LineOfSightAlgorithm.java b/rugged-api/src/main/java/org/orekit/rugged/api/LineOfSightAlgorithm.java
deleted file mode 100644
index 2fcf9af598e55829b888c6c4789c837b1fb1b496..0000000000000000000000000000000000000000
--- a/rugged-api/src/main/java/org/orekit/rugged/api/LineOfSightAlgorithm.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright 2013-2014 CS Systèmes d'Information
- * Licensed to CS Systèmes d'Information (CS) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * CS licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.orekit.rugged.api;
-
-/** Enumerate for line-of-sight intersection algorithm.
- * @author Luc Maisonobe
- */
-public enum LineOfSightAlgorithm {
-
-    /** Bernardt Duvenhage's algorithm.
-     * <p>
-     * The algorithm is described in the 2009 paper:
-     * <a href="http://researchspace.csir.co.za/dspace/bitstream/10204/3041/1/Duvenhage_2009.pdf">Using
-     * An Implicit Min/Max KD-Tree for Doing Efficient Terrain Line of Sight Calculations</a>.
-     * </p>
-     */
-    DUVENHAGE;
-
-}
diff --git a/rugged-api/src/main/java/org/orekit/rugged/api/Rugged.java b/rugged-api/src/main/java/org/orekit/rugged/api/Rugged.java
index 9478170147659283f783816065a54af8422905a1..9ada0eee9537e46716be292f9977e9f8acdec651 100644
--- a/rugged-api/src/main/java/org/orekit/rugged/api/Rugged.java
+++ b/rugged-api/src/main/java/org/orekit/rugged/api/Rugged.java
@@ -16,11 +16,50 @@
  */
 package org.orekit.rugged.api;
 
+import java.io.File;
+import java.util.List;
+
 /** Main interface to Rugged library.
  * @author Luc Maisonobe
  */
 public interface Rugged {
 
+    /** Enumerate for ellipsoid. */
+    enum Ellipsoid {
+        GRS80, WGS84, IERS96, IERS2003
+    }
+
+    /** Enumerate for inertial frames. */
+    enum InertialFrame {
+        GCRF, EME2000, MOD, TOD, VEIS1950
+    }
+
+    /** Enumerate for body rotating frames. */
+    enum BodyRotatingFrame {
+        ITRF, GTOD
+    }
+
+    /** Set up general context.
+     * <p>
+     * This method is the first one that must be called, otherwise the
+     * other methods will fail due to uninitialized context.
+     * </p>
+     * @param orekitDataDir top directory for Orekit data
+     * @param ellipsoid reference ellipsoid
+     * @param inertialFrameName inertial frame
+     * @param bodyRotatingFrame body rotating frame
+     * @param positionsVelocities satellite position and velocity
+     * @param pvInterpolationOrder order to use for position/velocity interpolation
+     * @param quaternions satellite quaternions
+     * @param aInterpolationOrder order to use for attitude interpolation
+     * @exception RuggedException if data needed for some frame cannot be loaded
+     */
+    void setGeneralContext(File orekitDataDir, Ellipsoid ellipsoid,
+                           InertialFrame inertialFrame, BodyRotatingFrame bodyRotatingFrame,
+                           List<SatellitePV> positionsVelocities, int pvInterpolationOrder,
+                           List<SatelliteQ> quaternions, int aInterpolationOrder)
+        throws RuggedException;
+
     /** Set up the tiles management.
      * @param updater updater used to load Digital Elevation Model tiles
      * @param maxCachedTiles maximum number of tiles stored in the cache
@@ -30,23 +69,25 @@ public interface Rugged {
     /** Direct localization of a sensor line.
      * @param sensorName name of the sensor
      * @param lineNumber number of the line to localize on ground
-     * @param algorithm algorithm to use for line-of-sight/DEM intersection computation
      * @return ground position of all pixels of the specified sensor line
-     * @exception RuggedException if line cannot be localized
+     * @exception RuggedException if line cannot be localized,
+     * if {@link #setGeneralContext(File, InertialFrame, BodyRotatingFrame, Ellipsoid)} has
+     * not been called beforehand, or if {@link #setOrbitAndAttitude(List, List)} has not
+     * been called beforehand
      */
-    GroundPoint[] directLocalization(String sensorName, int lineNumber,
-                                     LineOfSightAlgorithm algorithm)
+    GroundPoint[] directLocalization(String sensorName, int lineNumber)
         throws RuggedException;
 
     /** Inverse localization of a ground point.
      * @param sensorName name of the sensor
      * @param ground point to localize
-     * @param algorithm algorithm to use for line-of-sight/DEM intersection computation
      * @return sensor pixel seeing ground point
-     * @exception RuggedException if line cannot be localized
+     * @exception RuggedException if line cannot be localized,
+     * if {@link #setGeneralContext(File, InertialFrame, BodyRotatingFrame, Ellipsoid)} has
+     * not been called beforehand, or if {@link #setOrbitAndAttitude(List, List)} has not
+     * been called beforehand
      */
-    SensorPixel inverseLocalization(String sensorName, GroundPoint groundPoint,
-                                    LineOfSightAlgorithm algorithm)
+    SensorPixel inverseLocalization(String sensorName, GroundPoint groundPoint)
         throws RuggedException;
 
 }
diff --git a/rugged-api/src/main/java/org/orekit/rugged/api/RuggedException.java b/rugged-api/src/main/java/org/orekit/rugged/api/RuggedException.java
index 8dd97382a88a3731c49788fb72e091942f30282b..13e0ea9fd1ee87d9abe371fea31a77e3eb2d0331 100644
--- a/rugged-api/src/main/java/org/orekit/rugged/api/RuggedException.java
+++ b/rugged-api/src/main/java/org/orekit/rugged/api/RuggedException.java
@@ -62,7 +62,6 @@ public class RuggedException extends Exception {
 
     /** Copy constructor.
      * @param exception exception to copy from
-     * @since 5.1
      */
     public RuggedException(final RuggedException exception) {
         super(exception);
diff --git a/rugged-api/src/main/java/org/orekit/rugged/api/RuggedMessages.java b/rugged-api/src/main/java/org/orekit/rugged/api/RuggedMessages.java
index 4a26ad3833edb7497caf5a6c15e9611f28aa4446..12c8157618e8d703e750807fbf2c0dad6d6c5362 100644
--- a/rugged-api/src/main/java/org/orekit/rugged/api/RuggedMessages.java
+++ b/rugged-api/src/main/java/org/orekit/rugged/api/RuggedMessages.java
@@ -51,7 +51,8 @@ public enum RuggedMessages implements Localizable {
     // CHECKSTYLE: stop JavadocVariable check
 
     INTERNAL_ERROR("internal error, contact maintenance at {0}"),
-    OUT_OF_TILE_INDICES("no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)");
+    OUT_OF_TILE_INDICES("no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)"),
+    UNINITIALIZED_CONTEXT("general context has not been initialized");
 
     // CHECKSTYLE: resume JavadocVariable check
 
diff --git a/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 b/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8
index ba3b3ef6016f6f7b08f416008bcc4554aed61fba..6e089d03b9ffb5a220e61d1d598967570483b160 100644
--- a/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8
+++ b/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8
@@ -3,3 +3,6 @@ INTERNAL_ERROR = internal error, contact maintenance at {0}
 
 # no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)
 OUT_OF_TILE_INDICES = no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)
+
+# general context has not been initialized
+UNINITIALIZED_CONTEXT = general context has not been initialized
diff --git a/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 b/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8
index 64af7571f741c1f128d5928351610b3d1931b36a..3f7baea990447377a263ed4e0e85c03c4d795152 100644
--- a/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8
+++ b/rugged-api/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8
@@ -2,4 +2,7 @@
 INTERNAL_ERROR = erreur interne, contactez la maintenance à {0}
 
 # no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)
-OUT_OF_TILE_INDICES = aucune donnée aux indices {0}, {1}], la tuile ne couvre que de [0, 0] à [{2}, {3}] inclus
+OUT_OF_TILE_INDICES = aucune donnée aux indices [{0}, {1}], la tuile ne couvre que de [0, 0] à [{2}, {3}] inclus
+
+# general context has not been initialized
+UNINITIALIZED_CONTEXT = le contexte général n''a pas été initialisé
diff --git a/rugged-api/src/test/java/org/orekit/rugged/api/RuggedMessagesTest.java b/rugged-api/src/test/java/org/orekit/rugged/api/RuggedMessagesTest.java
index 384a488a43151ef32565afe677af30dcbc2f8557..543ac50cd16897f4c04ff83b5286530e072c0526 100644
--- a/rugged-api/src/test/java/org/orekit/rugged/api/RuggedMessagesTest.java
+++ b/rugged-api/src/test/java/org/orekit/rugged/api/RuggedMessagesTest.java
@@ -29,7 +29,7 @@ public class RuggedMessagesTest {
 
     @Test
     public void testMessageNumber() {
-        Assert.assertEquals(2, RuggedMessages.values().length);
+        Assert.assertEquals(3, RuggedMessages.values().length);
     }
 
     @Test