vikutils

vikutils

Functions

Description

Functions

vu_trackpoint_formatted_message ()

gchar *
vu_trackpoint_formatted_message (gchar *format_code,
                                 VikTrackpoint *trkpt,
                                 VikTrackpoint *trkpt_prev,
                                 VikTrack *trk,
                                 gdouble climb);

TODO: One day replace this cryptic format code with some kind of tokenizer parsing thus would make it more user friendly and maybe even GUI controlable. However for now at least there is some semblance of user control

Parameters

format_code

String describing the message to generate

 

trkpt

The trackpoint for which the message is generated about

 

trkpt_prev

A trackpoint (presumed previous) for interpolating values with the other trackpoint (such as speed)

 

trk

The track in which the trackpoints reside

 

climb

Vertical speed (Out of band (i.e. not in a trackpoint) value for display currently only for GPSD usage)

 

vu_check_latest_version ()

void
vu_check_latest_version (GtkWindow *window);

Periodically checks the released latest VERSION file on the website to compare with the running version

Parameters

window

Somewhere where we may need use the display to inform the user about the version status

 

vu_set_auto_features_on_first_run ()

void
vu_set_auto_features_on_first_run (void);

Ask the user's opinion to set some of Viking's default behaviour


vu_get_canonical_filename ()

gchar *
vu_get_canonical_filename (VikLayer *vl,
                           const gchar *filename);

Returns

Canonical absolute filename

Any time a path may contain a relative component, so need to prepend that directory it is relative to Then resolve the full path to get the normal canonical filename


vu_get_time_string ()

gchar *
vu_get_time_string (time_t *time,
                    const gchar *format,
                    const VikCoord *vc,
                    const gchar *gtz);

time_t : The time of which the string is wanted format The format of the time string - such as "c" vc : Position of object for the time output - maybe NULL (only applicable for VIK_TIME_REF_WORLD) tz : TimeZone string - maybe NULL. (only applicable for VIK_TIME_REF_WORLD) Useful to pass in the cached value from vu_get_tz_at_location() to save looking it up again for the same position

Returns

A string of the time according to the time display property


vu_get_tz_at_location ()

gchar *
vu_get_tz_at_location (const VikCoord *vc);

vc : Position for which the time zone is desired

Returns

TimeZone string of the nearest known location. String may be NULL.

Use the k-d tree method (http://en.wikipedia.org/wiki/Kd-tree) to quickly retreive the nearest location to the given position.


vu_setup_lat_lon_tz_lookup ()

void
vu_setup_lat_lon_tz_lookup ();

Can be called multiple times but only initializes the lookup once


vu_finalize_lat_lon_tz_lookup ()

void
vu_finalize_lat_lon_tz_lookup ();

Clear memory used by the lookup. only call on program exit


vu_command_line ()

void
vu_command_line (VikWindow *vw,
                 gdouble latitude,
                 gdouble longitude,
                 gint zoom_osm_level,
                 gint map_id);

Apply any startup values that have been specified from the command line Values are defaulted in such a manner not to be applied when they haven't been specified


vu_copy_label_menu ()

void
vu_copy_label_menu (GtkWidget *widget,
                    guint button);