gpxplotter icon indicating copy to clipboard operation
gpxplotter copied to clipboard

dfitpack.error

Open jwebster-LANL opened this issue 4 years ago • 2 comments

trying to plot a gpx file generated by a garmin GPSMAP 65s

I'm getting the error:

Traceback (most recent call last): File "gpxread.py", line 6, in for track in read_gpx_file('day1.gpx'): File "C:\USERS\me\Anaconda3\envs\gpx\lib\site-packages\gpxplotter\gpxread.py", line 345, in read_gpx_file process_segment(segment, max_heart_rate=max_heart_rate) File "C:\USERS\me\Anaconda3\envs\gpx\lib\site-packages\gpxplotter\gpxread.py", line 286, in process_segment segment['velocity'] = approximate_velocity( File "C:\USERS\me\Anaconda3\envs\gpx\lib\site-packages\gpxplotter\gpxread.py", line 250, in approximate_velocity spline = UnivariateSpline(time, distance, k=3) File "C:\USERS\me\Anaconda3\envs\gpx\lib\site-packages\scipy\interpolate\fitpack2.py", line 202, in init data = dfitpack.fpcurf0(x, y, k, w=w, xb=bbox[0], dfitpack.error: (m>k) failed for hidden m: fpcurf0:m=3

This is my code

from gpxplotter import read_gpx_file, create_folium_map, add_segment_to_map

my_map = create_folium_map(tiles='kartverket_topo4')
line_options = {'color': 'red', 'weight': 8, 'opacity': 0.5}

for track in read_gpx_file('day1.gpx'):
    for i, segment in enumerate(track['segments']):
        add_segment_to_map(my_map, segment) 

jwebster-LANL avatar Jun 21 '21 14:06 jwebster-LANL

(Note to self - this is related to #21 #20 and the usage of UnivariateSpline)

andersle avatar Jun 22 '21 06:06 andersle

Hopefully, the latest version should now allow the code above to run without crashing.

andersle avatar Jun 22 '21 16:06 andersle

Closed due to inactivity

andersle avatar Jun 11 '24 07:06 andersle