pavi  0.0
Map Path Viewer
track_loader.bas File Reference

Source for loading MapFactor Navigator track files. More...

#include "parser_gpx.bi"
#include "parser_nmea.bi"
#include "datetime.bi"
Include dependency graph for track_loader.bas:

Go to the source code of this file.

Macros

#define EXTREM(_V_)
 Macro to check extrema. More...
 
#define LOG2(_X_)
 Macro computing the base 2 logarythm. More...
 
#define MIN(V1, V2)
 Macro finding the minimum. More...
 

Functions

FUNCTION_CDECL_ALIAS_AS_DOUBLE atanh (BYVAL_AS_DOUBLE)
 
FUNCTION_CDECL_ALIAS_AS_DOUBLE tanh (BYVAL_AS_DOUBLE)
 
FUNCTION_AS_LONG lat2pixel (BYVAL_AS_float V, BYVAL_AS_LONG Z)
 Transform world latitude to map Y-pixel. More...
 
FUNCTION_AS_LONG lon2pixel (BYVAL_AS_float V, BYVAL_AS_LONG Z)
 Transform world longitude to map X-pixel. More...
 
FUNCTION_AS_float pixel2lon (BYVAL_AS_long Z, BYVAL_AS_LONG X)
 Transform map X-pixel to world longitude. More...
 
FUNCTION_AS_float pixel2lat (BYVAL_AS_long Z, BYVAL_AS_LONG Y)
 Transform map Y-pixel to world latitude. More...
 
FUNCTION_CDECL_AS_LONG latlon2zoom (BYVAL_AS_LONG W, BYVAL_AS_LONG H, BYVAL_AS_float La0, BYVAL_AS_float La1, BYVAL_AS_float Lo0, BYVAL_AS_float Lo1)
 Evaluate the matching zoom level for BBox. More...
 

Variables

const LONG TILESIZE = 256
 size of tile used in osm_gps_map More...
 
const LONG TILESIZEd2 = 128
 half size More...
 

Detailed Description

Source for loading MapFactor Navigator track files.

A UDT to load and analyse track files (*.NMEA and *.GPX) generated by the MapFactor Navigator software.

Since
0.0

Definition in file track_loader.bas.

Macro Definition Documentation

◆ EXTREM

#define EXTREM (   _V_)
Value:
/* _
IF _V_ > Mx##_V_ THEN Mx##_V_ = _V_ ELSE IF _V_ < Mn##_V_ THEN Mn##_V_ = _V_
*/

Macro to check extrema.

This macro creates code to check a value in TrackLoader.V() against the extrema in TrackLoader.Mn and TrackLoader.Mx. Used at the end of a line (no code behind)!

Since
0.0

Definition at line 29 of file track_loader.bas.

◆ LOG2

#define LOG2 (   _X_)
Value:
/* LOG(_X_) / LN2
*/

Macro computing the base 2 logarythm.

Definition at line 97 of file track_loader.bas.

◆ MIN

#define MIN (   V1,
  V2 
)
Value:
/* IIF(V1 > V2, V2, V1)
*/

Macro finding the minimum.

Definition at line 99 of file track_loader.bas.

Function Documentation

◆ atanh()

FUNCTION_CDECL_ALIAS_AS_DOUBLE atanh ( BYVAL_AS_DOUBLE  )

◆ tanh()

FUNCTION_CDECL_ALIAS_AS_DOUBLE tanh ( BYVAL_AS_DOUBLE  )

◆ lat2pixel()

FUNCTION_AS_LONG lat2pixel ( BYVAL_AS_float  V,
BYVAL_AS_LONG  Z 
)

Transform world latitude to map Y-pixel.

Parameters
VWorlds latitude in radians
ZZoom level
Returns
Map Y in pixels

This function transforms from worlds latitude coordinate (in radians) to map widget Y pixels.

Since
0.0

Definition at line 42 of file track_loader.bas.

◆ lon2pixel()

FUNCTION_AS_LONG lon2pixel ( BYVAL_AS_float  V,
BYVAL_AS_LONG  Z 
)

Transform world longitude to map X-pixel.

Parameters
VWorlds latitude in radians
ZZoom level
Returns
Map X in pixels

This function transforms from worlds longitude coordinate (in radians) to map widget X pixels.

Since
0.0

Definition at line 58 of file track_loader.bas.

◆ pixel2lon()

FUNCTION_AS_float pixel2lon ( BYVAL_AS_long  Z,
BYVAL_AS_LONG  X 
)

Transform map X-pixel to world longitude.

Parameters
ZZoom level
XMap x in pixel
Returns
Worlds longitude in radians

This function transforms from map widget X pixels to worlds longitude coordinate (in radians).

Since
0.0

Definition at line 74 of file track_loader.bas.

◆ pixel2lat()

FUNCTION_AS_float pixel2lat ( BYVAL_AS_long  Z,
BYVAL_AS_LONG  Y 
)

Transform map Y-pixel to world latitude.

Parameters
ZZoom level
YMap y in pixel
Returns
Worlds latitude in radians

This function transforms from map widget Y pixel to worlds latitude coordinate (in radians).

Since
0.0

Definition at line 90 of file track_loader.bas.

◆ latlon2zoom()

FUNCTION_CDECL_AS_LONG latlon2zoom ( BYVAL_AS_LONG  W,
BYVAL_AS_LONG  H,
BYVAL_AS_float  La0,
BYVAL_AS_float  La1,
BYVAL_AS_float  Lo0,
BYVAL_AS_float  Lo1 
)

Evaluate the matching zoom level for BBox.

Parameters
WWidth of map widget
HHeight of map widget
La0Minimum latitude
La1Maximum latitude
Lo0Minimum longitude
Lo1Maximum longitude
Returns
Matching zoom level

This function evaluates the zoom level for the map in order to show a bounding box completely on the map.

Since
0.0

Definition at line 116 of file track_loader.bas.

Here is the caller graph for this function:

Variable Documentation

◆ TILESIZE

const LONG TILESIZE = 256

size of tile used in osm_gps_map

Definition at line 13 of file track_loader.bas.

◆ TILESIZEd2

const LONG TILESIZEd2 = 128

half size

Definition at line 14 of file track_loader.bas.