cmenu_cb_loc_set_gps(GtkAction *action)
{
gtk_map_get_menu_latlon(_map, &_gps->data.lat, &_gps->data.lon);
-_gps->data.time=time(NULL);
-path_add_point(_track, &_gps->data);
+path_add_latlon(_track, _gps->data.lat, _gps->data.lon, time(NULL), 0, NAN);
return TRUE;
}
#include "path.h"
#include "position.h"
#include "utils.h"
-#include "gps.h"
#include "settings.h"
#include "latlon.h"
return TRUE;
}
-/**
- * path_add_point:
- * @path
- * @gps
- *
- * Append a point using given gps data. Adds a path break if gps is not valid.
- *
- * Returns: TRUE if the new point was added. FALSE is returned if new point distance was under sensitivity setting.
- */
-gboolean
-path_add_point(Path *path, GpsData *gps)
-{
-guint unitx, unity;
-
-g_return_val_if_fail(path, FALSE);
-
-if (!gps) {
- path_add_break(path);
- return FALSE;
-}
-
-return path_add_latlon(path, gps->lat, gps->lon, gps->time, gps->speed, gps->altitude);
-}
-
/**
* path_add_latlon:
* @path
#include <gtk/gtk.h>
#include <libgnomevfs/gnome-vfs.h>
-#include "gpsdata.h"
-
G_BEGIN_DECLS
#define PATH_TYPE (path_get_type ())
gboolean path_update_nears(Path *route, Point *point, gboolean quick);
gboolean path_add_latlon(Path *path, gdouble lat, gdouble lon, time_t ptime, gfloat speed, gfloat altitude);
-gboolean path_add_point(Path *path, GpsData *gps);
gboolean path_has_points(Path *path);
gboolean path_has_waypoints(Path *path);
{
g_assert(gps);
if (filter_check(&filter, &gps->data, &map_loc)==TRUE) {
- if (path_add_point(_track, &_gps->data)) {
+ if (path_add_latlon(_track, _gps->data.lat, _gps->data.lon, _gps->data.time, _gps->data.speed, _gps->data.altitude)) {
path_check_waypoint_announce(_route, &_gps->data);
#if 0
route_autoroute_check(_route);