]> git.street.me.uk Git - andy/viking.git/blobdiff - src/viktrack.h
Allow statusbar update signal method to specify which part of the statusbar to update.
[andy/viking.git] / src / viktrack.h
index 65e1b2ca9afc79be698a1491b5fab50660ea1900..0b7af28f81a223521a8755aaa508bb9c8c33df5f 100644 (file)
@@ -60,9 +60,11 @@ struct _VikTrack {
   gchar *comment;
   guint8 ref_count;
   GtkWidget *property_dialog;
+  gchar *name;
 };
 
 VikTrack *vik_track_new();
+void vik_track_set_name(VikTrack *wp, const gchar *name);
 void vik_track_set_comment(VikTrack *wp, const gchar *comment);
 void vik_track_ref(VikTrack *tr);
 void vik_track_free(VikTrack *tr);
@@ -83,6 +85,7 @@ void vik_track_remove_dup_points ( VikTrack *vt );
 
 gdouble vik_track_get_max_speed(const VikTrack *tr);
 gdouble vik_track_get_average_speed(const VikTrack *tr);
+gdouble vik_track_get_average_speed_moving ( const VikTrack *tr, int stop_length_seconds );
 
 void vik_track_convert ( VikTrack *tr, VikCoordMode dest_mode );
 gdouble *vik_track_make_elevation_map ( const VikTrack *tr, guint16 num_chunks );
@@ -92,22 +95,27 @@ VikTrackpoint *vik_track_get_closest_tp_by_percentage_time ( VikTrack *tr, gdoub
 VikTrackpoint *vik_track_get_tp_by_max_speed ( const VikTrack *tr );
 VikTrackpoint *vik_track_get_tp_by_max_alt ( const VikTrack *tr );
 VikTrackpoint *vik_track_get_tp_by_min_alt ( const VikTrack *tr );
+gdouble *vik_track_make_gradient_map ( const VikTrack *tr, guint16 num_chunks );
 gdouble *vik_track_make_speed_map ( const VikTrack *tr, guint16 num_chunks );
 gdouble *vik_track_make_distance_map ( const VikTrack *tr, guint16 num_chunks );
 gdouble *vik_track_make_elevation_time_map ( const VikTrack *tr, guint16 num_chunks );
+gdouble *vik_track_make_speed_dist_map ( const VikTrack *tr, guint16 num_chunks );
 gboolean vik_track_get_minmax_alt ( const VikTrack *tr, gdouble *min_alt, gdouble *max_alt );
 void vik_track_marshall ( VikTrack *tr, guint8 **data, guint *len);
 VikTrack *vik_track_unmarshall (guint8 *data, guint datalen);
 
 void vik_track_apply_dem_data ( VikTrack *tr);
+/*
+ * Apply DEM data (if available) - to only the last trackpoint
+ */
+void vik_track_apply_dem_data_last_trackpoint ( VikTrack *tr );
 
 /* appends t2 to t1, leaving t2 with no trackpoints */
 void vik_track_steal_and_append_trackpoints ( VikTrack *t1, VikTrack *t2 );
 
 /* starting at the end, looks backwards for the last "double point", a duplicate trackpoint.
- * this is indicative of magic scissors continued use. If there is no double point,
- * deletes all the trackpoints. returns new end of the track (or the start if
- * there are no double points)
+ * If there is no double point, deletes all the trackpoints.
+ * Returns the new end of the track (or the start if there are no double points
  */
 VikCoord *vik_track_cut_back_to_double_point ( VikTrack *tr );