Menu

#164 cannot add time to waypoints

v1.10
pending-fixed
nobody
waypoints (3)
5
2023-07-09
2022-10-16
PhLo M
No

It is currently impossible to add a time to a waypoint within Viking 1.10 on Windows. After right-clicking on a waypoint and clicking Properties, there is a field for Time. Right-clicking on a waypoint from the side panel and clicking Properties brings up the same dialog. If there is no time in the waypoint, a + button will appear. Click this plus button, and input tools appear to provide a time. None of them work. Clicking apply or ok does nothing. The date and time are not saved. Going back into the waypoint properties shows that no data is there again.

Discussion

  • PhLo M

    PhLo M - 2022-10-16

    It would also be great to have a consistent time interface experience. When editing a trackpoint, it has an additional field - timestamp. While this is totally useless for an average user, it is potentially useful for copying and pasting a single value from one place to another. Since the waypoint time dialog doesn't have this same timestamp input box, it is not possible to paste a single time value into a waypoint, something that could be very useful. A situation where it would be useful is when inserting times into waypoints without times. In that case, cut the time from the nearest track point and paste into the waypoint. For those into graphics or design, think of it like an RGBA or HLSA code. Instead of pasting 3 or more values into various boxes, one longer string of numbers can be cut & paste all at once.

     

    Last edit: PhLo M 2022-10-16
  • lbayuk

    lbayuk - 2022-11-22

    I believe the error is in comparing to see if the new timestamp is different from the existing timestamp. In this case, the existing timestamp does not exist, which is represented by NAN. The function that compares gdoubles does not seem to work correctly when only 1 of the 2 values is NAN, and this causes viking to think that the timestamp was not changed.

    The following patch seems to fix it, but I did not test it nearly enough to know if it breaks 100 other things.

    --- src/util.c.bak  2021-11-20 11:45:21.000000000 -0500
    +++ src/util.c  2022-11-21 21:56:28.779263048 -0500
    @@ -381,6 +381,8 @@
     gboolean util_gdouble_different ( gdouble aa, gdouble bb )
     {
       static const gdouble TOL = 0.000005; // Tolerance
    
    -  return ( ( !isnan(aa) || !isnan(bb) ) &&
    -           ( (aa < (bb - TOL)) || (aa > (bb + TOL)) ) );
    +  if (isnan(aa) || isnan(bb))  // If one or both are NAN,
    +    return !(isnan(aa) && isnan(bb));  // They are different if only 1 is NAN.
    +
    +  return ( (aa < (bb - TOL)) || (aa > (bb + TOL)) );
     }
    
     
  • Rob Norris

    Rob Norris - 2023-07-09
    • status: open --> pending-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB