diff --git a/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java b/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java
index 112e0c4c57..663d27dac5 100644
|
a
|
b
|
public final class GpxImageCorrelation {
|
| 200 | 200 | return trks; |
| 201 | 201 | } |
| 202 | 202 | |
| | 203 | /** |
| | 204 | * Gets the elevation value from a WayPoint's attributes. |
| | 205 | * @param wp the WayPoint |
| | 206 | * @return the WayPoint's elevation (in meters) |
| | 207 | */ |
| 203 | 208 | static Double getElevation(WayPoint wp) { |
| 204 | 209 | if (wp != null) { |
| 205 | 210 | String value = wp.getString(GpxConstants.PT_ELE); |
| … |
… |
public final class GpxImageCorrelation {
|
| 214 | 219 | return null; |
| 215 | 220 | } |
| 216 | 221 | |
| | 222 | /** |
| | 223 | * Gets the horizontal positionning estimated error value from a WayPoint's attributes. |
| | 224 | * @param wp the WayPoint |
| | 225 | * @return the WayPoint's horizontal positionning error (in meters) |
| | 226 | * @since 19387 |
| | 227 | */ |
| 217 | 228 | static Double getHPosErr(WayPoint wp) { |
| 218 | 229 | if (wp != null) { |
| 219 | 230 | if (wp.attr.get(GpxConstants.PT_STD_HDEV) instanceof Float) { |
| … |
… |
public final class GpxImageCorrelation {
|
| 231 | 242 | return null; |
| 232 | 243 | } |
| 233 | 244 | |
| | 245 | /** |
| | 246 | * Retrieves GPS Dilution of Precision (DOP) from a WayPoint's attributes. |
| | 247 | * Checks for Position DOP (PDOP) first, then falls back to Horizontal DOP (HDOP) if PDOP isn't available. |
| | 248 | * Converts Float values to Double for consistent return type. |
| | 249 | * @param wp the WayPoint |
| | 250 | * @return the WayPoint's DOP value as Double (PDOP preferred, HDOP fallback) |
| | 251 | * @since 19387 |
| | 252 | */ |
| 234 | 253 | static Double getGpsDop(WayPoint wp) { |
| 235 | 254 | if (wp != null) { |
| 236 | 255 | if (wp.attr.get(GpxConstants.PT_PDOP) != null) { |
| … |
… |
public final class GpxImageCorrelation {
|
| 252 | 271 | return null; |
| 253 | 272 | } |
| 254 | 273 | |
| | 274 | /** |
| | 275 | * Gets the track direction angle value from a waypoint in a GNSS track. |
| | 276 | * This angle is the GNSS receiver movement direction. |
| | 277 | * @param wp the waypoint |
| | 278 | * @return the waypoint direction (in degrees) |
| | 279 | * @since 19387 |
| | 280 | */ |
| 255 | 281 | static Double getGpsTrack(WayPoint wp) { |
| 256 | 282 | if (wp != null) { |
| 257 | 283 | String trackvalue = wp.getString(GpxConstants.PT_COURSE); |
| … |
… |
public final class GpxImageCorrelation {
|
| 267 | 293 | return null; |
| 268 | 294 | } |
| 269 | 295 | |
| | 296 | /** |
| | 297 | * Determines the GPS processing method based on previous and current GNSS fix modes. |
| | 298 | * This method compares the positioning modes of the previous and current GNSS fixes, |
| | 299 | * selects the most basic processing method (lowest index in positioningModes list), |
| | 300 | * and formats the output string according to predefined conventions. |
| | 301 | * Because the returned processing method depends on a time correlation between an image |
| | 302 | * and a waypoint timestamp, the term 'CORRELATION' is added. |
| | 303 | * @param prevGpsFixMode the previous GNSS fix mode (e.g., "SINGLE", "DGNSS", "RTK_FIX") |
| | 304 | * @param curGpsFixMode the current GNSS fix mode |
| | 305 | * @param positioningModes list of positioning modes ordered by accuracy |
| | 306 | * @return formatted processing method string |
| | 307 | * @since 19387 |
| | 308 | */ |
| 270 | 309 | static String getGpsProcMethod(String prevGpsFixMode, final String curGpsFixMode, |
| 271 | 310 | final List<String> positioningModes) { |
| 272 | 311 | String gpsProcMethod = null; |
| … |
… |
public final class GpxImageCorrelation {
|
| 291 | 330 | return gpsProcMethod; |
| 292 | 331 | } |
| 293 | 332 | |
| | 333 | /** |
| | 334 | * Determines if the GNSS mode is 2d or 3d, based on previous and current GNSS fix modes. |
| | 335 | * This method compares the positioning modes of the previous and current GNSS fixes, |
| | 336 | * selects the most basic processing method (lowest index in positioningModes list), |
| | 337 | * and return the lowest value between 2d or 3d mode, or null if it's not a gnss mode (e.g. estimated, manual). |
| | 338 | * @param prevGpsFixMode the previous GNSS mode |
| | 339 | * @param curGpsFixMode the current GNSS mode |
| | 340 | * @param positioningModes list of positioning modes ordered by accuracy |
| | 341 | * @return 2 for 2d, 3 for 3d, or null |
| | 342 | * @since 19387 |
| | 343 | */ |
| 294 | 344 | static Integer getGps2d3dMode(String prevGpsFixMode, final String curGpsFixMode, |
| 295 | 345 | final List<String> positioningModes) { |
| 296 | 346 | Integer lowestMode = null; |
| … |
… |
public final class GpxImageCorrelation {
|
| 512 | 562 | } |
| 513 | 563 | // CHECKSTYLE.ON: ParameterNumber |
| 514 | 564 | |
| | 565 | /** |
| | 566 | * Computes an adjusted direction by applying an angular offset and normalizing the result between 0° and 360°. |
| | 567 | * @param direction initial direction angle (in radians) |
| | 568 | * @param angleOffset angular offset to apply (in degrees) |
| | 569 | * @return resulting direction normalized to the range [0, 360) degrees |
| | 570 | */ |
| 515 | 571 | private static double computeDirection(double direction, double angleOffset) { |
| 516 | 572 | return (Utils.toDegrees(direction) + angleOffset) % 360d; |
| 517 | 573 | } |