diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java
index 403c05923e6005be4f945f2ba692cf3489295dff..efeaede472e4388622830dcd24ce50b38a2f58b8 100644
--- a/src/main/java/org/orekit/rugged/api/Rugged.java
+++ b/src/main/java/org/orekit/rugged/api/Rugged.java
@@ -512,6 +512,9 @@ public class Rugged {
             final Transform    inertToBody = scToBody.getInertialToBody(date);
             final Transform    approximate = new Transform(date, scToInert, inertToBody);
 
+            final Vector3D spacecraftVelocity =
+                    scToInert.transformPVCoordinates(PVCoordinates.ZERO).getVelocity();
+
             // compute localization of each pixel
             final GeodeticPoint[] gp = new GeodeticPoint[sensor.getNbPixels()];
             for (int i = 0; i < gp.length; ++i) {
@@ -522,7 +525,6 @@ public class Rugged {
                     // apply aberration of light correction
                     // as the spacecraft velocity is small with respect to speed of light,
                     // we use classical velocity addition and not relativistic velocity addition
-                    final Vector3D spacecraftVelocity = scToInert.transformPVCoordinates(PVCoordinates.ZERO).getVelocity();
                     lInert = new Vector3D(Constants.SPEED_OF_LIGHT, scToInert.transformVector(sensor.getLos(i)),
                                           1.0, spacecraftVelocity).normalize();
                 } else {