From 7ea769f03fbf11982aef08e9f1399b8d49151e37 Mon Sep 17 00:00:00 2001 From: Jonathan Guinet <jonathan.guinet@csgroup.eu> Date: Wed, 29 May 2024 11:39:51 +0200 Subject: [PATCH] doc: Javadoc update --- .../orekit/rugged/errors/RuggedMessages.java | 72 +++++++++++- .../duvenhage/MinMaxTreeTile.java | 103 ++++++++++++++---- 2 files changed, 148 insertions(+), 27 deletions(-) diff --git a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java index f6b6f3bc..ce93b290 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java @@ -50,47 +50,113 @@ import org.hipparchus.exception.Localizable; */ public enum RuggedMessages implements Localizable { - // CHECKSTYLE: stop JavadocVariable check + /** INTERNAL_ERROR. */ INTERNAL_ERROR("internal error, please notify development team by creating an issue at {0}"), + + /** OUT_OF_TILE_INDICES. */ OUT_OF_TILE_INDICES("no data at indices [{0}, {1}], tile only covers from [0, 0] to [{2}, {3}] (inclusive)"), + + /** OUT_OF_TILE_ANGLES. */ OUT_OF_TILE_ANGLES("no data at latitude {0} and longitude {1}, tile covers only latitudes {2} to {3} and longitudes {4} to {5}"), + + /** NO_DEM_DATA. */ NO_DEM_DATA("no Digital Elevation Model data at latitude {0} and longitude {1}"), + + /** TILE_WITHOUT_REQUIRED_NEIGHBORS_SELECTED. */ TILE_WITHOUT_REQUIRED_NEIGHBORS_SELECTED("the tile selected for latitude {0} and longitude {1} does not contain required point neighborhood"), + + /** OUT_OF_TIME_RANGE. */ OUT_OF_TIME_RANGE("date {0} is out of time span [{1}, {2}] (UTC)"), + + /** UNINITIALIZED_CONTEXT. */ UNINITIALIZED_CONTEXT("general context has not been initialized (missing call to {0})"), + + /** EMPTY_TILE. */ EMPTY_TILE("tile is empty: {0} ⨉ {1}"), + + /** UNKNOWN_SENSOR. */ UNKNOWN_SENSOR("unknown sensor {0}"), + + /** LINE_OF_SIGHT_DOES_NOT_REACH_GROUND. */ LINE_OF_SIGHT_DOES_NOT_REACH_GROUND("line-of-sight does not reach ground"), + + /** LINE_OF_SIGHT_NEVER_CROSSES_LATITUDE. */ LINE_OF_SIGHT_NEVER_CROSSES_LATITUDE("line-of-sight never crosses latitude {0}"), + + /** LINE_OF_SIGHT_NEVER_CROSSES_LONGITUDE. */ LINE_OF_SIGHT_NEVER_CROSSES_LONGITUDE("line-of-sight never crosses longitude {0}"), + + /** LINE_OF_SIGHT_NEVER_CROSSES_ALTITUDE. */ LINE_OF_SIGHT_NEVER_CROSSES_ALTITUDE("line-of-sight never crosses altitude {0}"), + + /** DEM_ENTRY_POINT_IS_BEHIND_SPACECRAFT. */ DEM_ENTRY_POINT_IS_BEHIND_SPACECRAFT("line-of-sight enters the Digital Elevation Model behind spacecraft!"), + + /** FRAMES_MISMATCH_WITH_INTERPOLATOR_DUMP. */ FRAMES_MISMATCH_WITH_INTERPOLATOR_DUMP("frame {0} does not match frame {1} from interpolator dump"), + + /** NOT_INTERPOLATOR_DUMP_DATA. */ NOT_INTERPOLATOR_DUMP_DATA("data is not an interpolator dump"), + + /** DEBUG_DUMP_ALREADY_ACTIVE. */ DEBUG_DUMP_ALREADY_ACTIVE("debug dump is already active for this thread"), + + /** DEBUG_DUMP_ACTIVATION_ERROR. */ DEBUG_DUMP_ACTIVATION_ERROR("unable to active debug dump with file {0}: {1}"), + + /** DEBUG_DUMP_NOT_ACTIVE. */ DEBUG_DUMP_NOT_ACTIVE("debug dump is not active for this thread"), + + /** CANNOT_PARSE_LINE. */ CANNOT_PARSE_LINE("cannot parse line {0}, file {1}: {2}"), + + /** LIGHT_TIME_CORRECTION_REDEFINED. */ LIGHT_TIME_CORRECTION_REDEFINED("light time correction redefined, line {0}, file {1}: {2}"), + + /** ABERRATION_OF_LIGHT_CORRECTION_REDEFINED. */ ABERRATION_OF_LIGHT_CORRECTION_REDEFINED("aberration of light correction redefined, line {0}, file {1}: {2}"), + + /** ATMOSPHERIC_REFRACTION_REDEFINED. */ ATMOSPHERIC_REFRACTION_REDEFINED("atmospheric refraction correction redefined, line {0}, file {1}: {2}"), + + /** TILE_ALREADY_DEFINED. */ TILE_ALREADY_DEFINED("tile {0} already defined, line {1}, file {2}: {3}"), + + /** UNKNOWN_TILE. */ UNKNOWN_TILE("unknown tile {0}, line {1}, file {2}: {3}"), + + /** NO_PARAMETERS_SELECTED. */ NO_PARAMETERS_SELECTED("no parameters have been selected for estimation"), + + /** NO_REFERENCE_MAPPINGS. */ NO_REFERENCE_MAPPINGS("no reference mappings for parameters estimation"), + + /** DUPLICATED_PARAMETER_NAME. */ DUPLICATED_PARAMETER_NAME("a different parameter with name {0} already exists"), + + /** INVALID_RUGGED_NAME. */ INVALID_RUGGED_NAME("invalid rugged name"), + + /** UNSUPPORTED_REFINING_CONTEXT. */ UNSUPPORTED_REFINING_CONTEXT("refining using {0} rugged instance is not handled"), + + /** NO_LAYER_DATA. */ NO_LAYER_DATA("no atmospheric layer data at altitude {0} (lowest altitude: {1})"), + + /** INVALID_STEP. */ INVALID_STEP("step {0} is not valid : {1}"), + + /** INVALID_RANGE_FOR_LINES. */ INVALID_RANGE_FOR_LINES("range between min line {0} and max line {1} is invalid {2}"), + + /** SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES. */ 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. */ 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 - /** Base name of the resource bundle in classpath. */ private static final String RESOURCE_BASE_NAME = "assets/org/orekit/rugged/RuggedMessages"; diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java index f12af9f5..72556106 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java @@ -54,20 +54,64 @@ import org.orekit.rugged.utils.Selector; * have 9 levels: * </p> * - * <table summary="" border="0"> - * <tr style="background-color:#EEEEFF;"> - * <td>Level</td> <td>Number of sub-tiles</td> <td>Regular sub-tiles dimension</td></tr> - * <tr> <td align="center">8</td> <td align="center">107 ⨉ 10</td> <td align="center"> 1 ⨉ 2</td> - * <tr> <td align="center">7</td> <td align="center"> 54 ⨉ 10</td> <td align="center"> 2 ⨉ 2</td> - * <tr> <td align="center">6</td> <td align="center"> 54 ⨉ 5</td> <td align="center"> 2 ⨉ 4</td> - * <tr> <td align="center">5</td> <td align="center"> 27 ⨉ 5</td> <td align="center"> 4 ⨉ 4</td> - * <tr> <td align="center">4</td> <td align="center"> 27 ⨉ 3</td> <td align="center"> 4 ⨉ 8</td> - * <tr> <td align="center">3</td> <td align="center"> 14 ⨉ 3</td> <td align="center"> 8 ⨉ 8</td> - * <tr> <td align="center">2</td> <td align="center"> 14 ⨉ 2</td> <td align="center"> 8 ⨉ 16</td> - * <tr> <td align="center">1</td> <td align="center"> 7 ⨉ 2</td> <td align="center">16 ⨉ 16</td> - * <tr> <td align="center">0</td> <td align="center"> 7 ⨉ 1</td> <td align="center">16 ⨉ 32</td> - * </table> - * <p> + *<table> + * <caption>"min/max kd-tree levels for a 107 x19 raw tile "</caption> + * <thead> + * <tr> + * <th>Level</th> + * <th>Number of sub-tiles</th> + * <th>Regular sub-tiles dimension</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <td>8</td> + * <td>107 ⨉ 10</td> + * <td>1 ⨉ 2</td> + * </tr> + * <tr> + * <td>7</td> + * <td>54 ⨉ 10</td> + * <td>2 ⨉ 2</td> + * </tr> + * <tr> + * <td>6</td> + * <td>54 ⨉ 5</td> + * <td>2 ⨉ 4</td> + * </tr> + * <tr> + * <td>5</td> + * <td>27 ⨉ 5</td> + * <td>4 ⨉ 4</td> + * </tr> + * <tr> + * <td>4</td> + * <td>27 ⨉ 3</td> + * <td>4 ⨉ 8</td> + * </tr> + * <tr> + * <td>3</td> + * <td>14 ⨉ 3</td> + * <td>8 ⨉ 8</td> + * </tr> + * <tr> + * <td>2</td> + * <td>14 ⨉ 2</td> + * <td>8 ⨉ 16</td> + * </tr> + * <tr> + * <td>1</td> + * <td>7 ⨉ 2</td> + * <td>16 ⨉ 16</td> + * </tr> + * <tr> + * <td>0</td> + * <td>7 ⨉ 1</td> + * <td>16 ⨉ 32</td> + * </tr> + * </tbody> + *</table> + * * @see MinMaxTreeTileFactory * @author Luc Maisonobe */ @@ -139,11 +183,17 @@ public class MinMaxTreeTile extends SimpleTile { * considering also Eastwards and Northwards neighbors, and extends * up to the center of these neighbors. As an example, lets consider * four neighboring cells in some Digital Elevation Model: - * <table summary="" border="0" cellpadding="5" style="background-color:#f5f5dc;"> - * <tr><th style="background-color:#c9d5c9;">j+1</th><td>11</td><td>10</td></tr> - * <tr><th style="background-color:#c9d5c9;">j</th><td>12</td><td>11</td></tr> - * <tr style="background-color:#c9d5c9;"><th>j/i</th><th>i</th><th>i+1</th></tr> - * </table> + * + * <table> + * <caption>"four neighboring cells"</caption> + *<thead> + * <tr><th>j/i</th> <th>i</th> <th>i+1</th></tr> + *</thead> + *<tbody> + * <tr> <th>j+1</th><td>11</td><td>12</td> </tr> + * <tr> <th>j</th> <td>10</td> <td>11</td> </tr> + * </tbody> + *</table> * When we interpolate elevation at a point located slightly South-West * to the center of the (i+1, j+1) cell, we use all four cells in the * interpolation, and we will get a result very close to 10 if we start @@ -199,11 +249,16 @@ public class MinMaxTreeTile extends SimpleTile { * considering also Eastwards and Northwards neighbors, and extends * up to the center of these neighbors. As an example, lets consider * four neighboring cells in some Digital Elevation Model: - * <table summary="" border="0" cellpadding="5" style="background-color:#f5f5dc;"> - * <tr><th style="background-color:#c9d5c9;">j+1</th><td>11</td><td>12</td></tr> - * <tr><th style="background-color:#c9d5c9;">j</th><td>10</td><td>11</td></tr> - * <tr style="background-color:#c9d5c9;"><th>j/i</th><th>i</th><th>i+1</th></tr> - * </table> + * <table> + * <caption>"four neighboring cells"</caption> + *<thead> + * <tr><th>j/i</th> <th>i</th> <th>i+1</th></tr> + *</thead> + *<tbody> + * <tr> <th>j+1</th><td>11</td><td>10</td> </tr> + * <tr> <th>j</th> <td>12</td> <td>11</td> </tr> + * </tbody> + *</table> * When we interpolate elevation at a point located slightly South-West * to the center of the (i+1, j+1) cell, we use all four cells in the * interpolation, and we will get a result very close to 12 if we start -- GitLab