Changeset 19389 in josm for trunk


Ignore:
Timestamp:
2025-04-23T23:41:55+02:00 (3 weeks ago)
Author:
stoecker
Message:

add missing Javadoc, fix #24238

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java

    r19388 r19389  
    201201    }
    202202
     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     */
    203208    static Double getElevation(WayPoint wp) {
    204209        if (wp != null) {
     
    215220    }
    216221
     222    /**
     223     * Gets the horizontal positioning estimated error value from a WayPoint's attributes.
     224     * @param wp the WayPoint
     225     * @return the WayPoint's horizontal positioning error (in meters)
     226     * @since 19387
     227     */
    217228    static Double getHPosErr(WayPoint wp) {
    218229        if (wp != null) {
     
    232243    }
    233244
     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     */
    234253    static Double getGpsDop(WayPoint wp) {
    235254        if (wp != null) {
     
    253272    }
    254273
     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     */
    255281    static Double getGpsTrack(WayPoint wp) {
    256282        if (wp != null) {
     
    268294    }
    269295
     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     */
    270309    static String getGpsProcMethod(String prevGpsFixMode, final String curGpsFixMode,
    271310                                    final List<String> positioningModes) {
     
    292331    }
    293332
     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     */
    294344    static Integer getGps2d3dMode(String prevGpsFixMode, final String curGpsFixMode,
    295345                                final List<String> positioningModes) {
     
    513563    // CHECKSTYLE.ON: ParameterNumber
    514564
     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     */
    515571    private static double computeDirection(double direction, double angleOffset) {
    516572        return (Utils.toDegrees(direction) + angleOffset) % 360d;
    517573    }
    518574
     575    /**
     576     * Finds the last image in the sorted image list which is before the given time
     577     * @param images list of images
     578     * @param searchTime time to search
     579     * @return index of last image before given time
     580     */
    519581    private static int getLastIndexOfListBefore(List<? extends GpxImageEntry> images, long searchedTime) {
    520582        int lstSize = images.size();
Note: See TracChangeset for help on using the changeset viewer.