Removed redundant assert in BestIntervalDialog.cpp. It is redundant
because it is executed prior to a logic check for the same condition.
The assert check has been shown to be unreliable due to inherent
inaccuracies in float arithmetic and comparisons for example, according
to the IEEE specs 1000.2 - 1000.0 will be stored as 0.200012. This
inherent problem with floats is particularly relevant in this
code since it is dealing with interval durations and recording intervals
which are expressed to a precision of 100th or even 1000th of a second.
Fixes#99.
The best interval dialog rounded intervals to the nearest second
due to a casting of a double to int. This was introduced by Mark L
during the intervals code patch and is an error.
All the plots have now been adjusted to correctly determine if a ride
point is within an interval. Related cropping and binning issues in
3d plot an Histogram plot have also been corrected.
fixes#15
This is almost a complete rewrite of the functional part of the dialog.
I've tested it on both test files (2010_01_13_*.gc in test/rides).
Thanks to Mark L for pointing out a number of the problems.
Another rightclick menu for intervals, adding a bring to front and send to
back option but only when viewing the pfPvPlot, additionally the algorithm in
PfPv plot for determining which interval a point is used for has been adjusted
to fully populate every interval curve where appropriate (and incorrect
comments and redundant code have been removed).
IntervalItems now have a display sequence number so when you have
overlapping intervals you can bring to front and send to back on the
PfPv plot. The display sequence could be used on other plots if/when
they distinguish between intervals.
Previously, the coloring of intervals on PfPvPlot was determined solely
by the order they were defined which could be quite confusing.