26#ifndef _NAVUTIL_BASE__
27#define _NAVUTIL_BASE__
29#include <wx/datetime.h>
34enum { SPEED_KTS = 0, SPEED_MPH, SPEED_KMH, SPEED_MS };
49 static wxString GetUUID(
void);
50 static void SeedRandom();
53 static int GetRandomNumber(
int min,
int max);
57extern wxString toSDMM(
int NEflag,
double a,
bool hi_precision =
true);
58extern double toUsrSpeed(
double kts_speed,
int unit = -1);
59extern wxString getUsrSpeedUnit(
int unit = -1);
60extern wxString FormatDistanceAdaptive(
double distance);
62extern double toUsrDistance(
double nm_distance,
int unit = -1);
63extern wxString getUsrDistanceUnit(
int unit = -1);
64extern double fromUsrDistance(
double usr_distance,
int unit,
int default_val);
65extern double fromUsrSpeed(
double usr_speed,
int unit,
int default_val);
67const wxChar *ParseGPXDateTime(wxDateTime &dt,
const wxChar *datetime);
69extern wxString formatTimeDelta(wxTimeSpan span);
70extern wxString formatTimeDelta(wxDateTime startTime, wxDateTime endTime);
71extern wxString formatTimeDelta(wxLongLong secs);
73extern double fromDMM(wxString sdms);