diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 0a283fc59a0107a848ba3ea2d2595842ae79fdae..de131078e8ac2ebac5795f1a6d8afcd4252d1349 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -729,8 +729,7 @@ public class Rugged { DumpManager.endNicely(); // Impossible to find the sensor pixel in the given range lines (without atmosphere) - final String info = "in given range lines (with atmospheric refraction) between lines" + minLine + " and " + maxLine; - throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, info); + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, minLine, maxLine); } // set up the starting point of the fixed point method @@ -820,13 +819,12 @@ public class Rugged { if (sensorPixelGrid[uIndex][vIndex] == null) { // Impossible to find the sensor pixel in the given range lines - final String info = "in given range lines (with atmospheric refraction) between lines" + minLine + " and " + maxLine; - throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, info); + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, minLine, maxLine); } else { // Impossible to find the sensor pixel final double invLocationMargin = atmosphericRefraction.getComputationParameters().getInverseLocMargin(); - final String info = ": pixel = " + sensorPixelGrid[uIndex][vIndex].getPixelNumber() + " outside interval [ " + (-invLocationMargin) + " , " + (invLocationMargin + sensor.getNbPixels() - 1) + " [ (with atmospheric refraction margin = " + invLocationMargin + ")"; - throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, info); + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE, sensorPixelGrid[uIndex][vIndex].getPixelNumber(), + (-invLocationMargin), (invLocationMargin + sensor.getNbPixels() - 1), invLocationMargin); } } diff --git a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java index 190decacec01e2d07a98a3ab69a3eb75f946d65f..f6b6f3bc94c3b77b822fff77dc994f36dcfc9f23 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java @@ -85,7 +85,9 @@ public enum RuggedMessages implements Localizable { NO_LAYER_DATA("no atmospheric layer data at altitude {0} (lowest altitude: {1})"), INVALID_STEP("step {0} is not valid : {1}"), INVALID_RANGE_FOR_LINES("range between min line {0} and max line {1} is invalid {2}"), - SENSOR_PIXEL_NOT_FOUND("impossible to find sensor pixel {0}"); + SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES("impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1}"), + SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE("impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3})"); + // CHECKSTYLE: resume JavadocVariable check diff --git a/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java b/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java index 8e5639a3af2560762eebc1582490dfda7bf96130..65e3cae3cc49b4212db7e155955f58ecd4eaa3e1 100644 --- a/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java +++ b/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java @@ -186,9 +186,8 @@ public abstract class AtmosphericRefraction { } else { // Impossible to find the sensor pixel in the given range lines - final String info = "in given range lines (with atmospheric refraction) between lines" + - atmosphericParams.getMinLineSensor() + " and " + atmosphericParams.getMaxLineSensor(); - throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, info); + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, + atmosphericParams.getMinLineSensor(), atmosphericParams.getMaxLineSensor()); } } } diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 index a7c75c8597199af7458b4bb4f898510e8c2bd1ec..ecb9bd7eeb717b1f17404812f3f2687c62c2d80b 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 @@ -97,5 +97,8 @@ INVALID_STEP = skridt {0} er ikke gyldigt : {1} # range between min line {0} and max line {1} too small {2} INVALID_RANGE_FOR_LINES = interval mellem minimumslinje {0} og maksimumslinje {1} for lille {2} -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 index a8b2fb56e78e5118c8c5f33ee9a95f0e2b9a5cda..9cda208b301d4714b3970c91c49f8970059372b6 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 @@ -97,5 +97,8 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 index 9e0acd4ffd30af87013f9e4233c6baf4f76f05ff..97b94dfc34b4e354e86b3160489b5faa6a19208b 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 @@ -97,5 +97,8 @@ INVALID_STEP = step {0} is not valid : {1} # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = range between min line {0} and max line {1} is invalid {2} -# Impossible to find sensor pixel {0} -SENSOR_PIXEL_NOT_FOUND = impossible to find sensor pixel {0} +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 index 96a452f206228aa3210b9ebe6f69ed1f4b1a4ec2..b29c953a4b995bf04b1831ca1cd9508f87cb70a3 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 @@ -97,6 +97,8 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 index 410304d0e49f9f32241a143c27c9536018e5088b..7c9f324e05f7300fb994e2e02fce2a0fa64fd702 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 @@ -97,5 +97,8 @@ INVALID_STEP = le pas {0} n''est pas valable : {1} # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = l''écart entre la ligne min {0} et la ligne max {1} est non valide {2} -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = impossible de trouver le pixel senseur {0} +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = impossible de trouver le pixel senseur dans l''intervalle de lignes (avec réfraction atmosphérique) entre les lignes {0} et {1} + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = impossible de trouver le pixel senseur: pixel {0} en dehors de l''intervalle [ {1} , {2} [ (avec la marge pour la réfraction atmosphérique = {3}) diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 index 891edfa8d62efbb4fbe6c8fc1afc8ea4381ecf57..a459e9b0c12c9d9fa9b7115bca9b22861897c35b 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 @@ -97,5 +97,8 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> \ No newline at end of file +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 index 19ee2263e5fe2f02f2d35916859533f25f4ae2f3..7d55d0fa9b9c56674dc70d6cf484f9b418a0b789 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 @@ -95,7 +95,10 @@ NO_LAYER_DATA = nessun dato atmosferico all''altitudine {0} (altitudine più bas INVALID_STEP = Step {0} non valido: {1} # range between min line {0} and max line {1} too small {2} - INVALID_RANGE_FOR_LINES = Scarto fra la linea min {0} e la linea max {1} troppo piccolo {2} +INVALID_RANGE_FOR_LINES = Scarto fra la linea min {0} e la linea max {1} troppo piccolo {2} - # Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> \ No newline at end of file +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 index 702209844c4d208674b04bfd4463201d9056afc8..e8bd40390ffdc3f92377a4559605b941c1be0a32 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 @@ -97,5 +97,9 @@ INVALID_STEP = steget {0} er ikke gyldig: {1} # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = avstanden mellom min linje {0} og max linje {1} er ugyldig {2} -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> + diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 index ce0190cd0be141044bb877b66a6139f303bf1ce3..b77290b0947b2ccfb16cd14d47358e30880a837c 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 @@ -97,5 +97,9 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> -# Impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} -SENSOR_PIXEL_NOT_FOUND = <MISSING TRANSLATION> +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> + diff --git a/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java b/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java index b3366efd9377caab90d691071b74210c886ad7f3..d70b430c3538f73ca391e0c409ade68b28283132 100644 --- a/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java +++ b/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java @@ -30,7 +30,7 @@ public class RuggedMessagesTest { private final String[] LANGUAGES_LIST = { "da", "de", "en", "es", "fr", "gl", "it", "no", "ro" } ; @Test public void testMessageNumber() { - Assert.assertEquals(34, RuggedMessages.values().length); + Assert.assertEquals(35, RuggedMessages.values().length); } @Test diff --git a/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java b/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java index a5fa46c96c7d0a1ef20b3da00749164c206823e3..5a270b7afa75f59fdd12526f2e432ce34e9a0944 100644 --- a/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java +++ b/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java @@ -135,7 +135,7 @@ public class AtmosphericRefractionTest { ruggedWith.inverseLocation(sensorName, dummyGP, minLine, maxLine); Assert.fail("an exeption should have been thrown"); } catch (RuggedException re) { - Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, re.getSpecifier()); + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, re.getSpecifier()); } try { @@ -144,7 +144,7 @@ public class AtmosphericRefractionTest { 210, maxLine); Assert.fail("an exeption should have been thrown"); } catch (RuggedException re) { - Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, re.getSpecifier()); + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, re.getSpecifier()); } try { @@ -153,7 +153,7 @@ public class AtmosphericRefractionTest { minLine, 190); Assert.fail("an exeption should have been thrown"); } catch (RuggedException re) { - Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND, re.getSpecifier()); + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, re.getSpecifier()); } } @@ -298,7 +298,7 @@ public class AtmosphericRefractionTest { Assert.fail("An exception should have been thrown"); } catch (RuggedException re) { - Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND,re.getSpecifier()); + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE,re.getSpecifier()); } // Check the default margin is equal to the used one