pavi  0.0
Map Path Viewer
TS_nearest Class Reference

Class finding the nearest track point. More...

Collaboration diagram for TS_nearest:

Public Member Functions

 TS_nearest (BYVAL_AS_float, BYVAL_AS_float)
 Find the point nearest to a location. More...
 

Static Public Member Functions

static FUNCTION_CDECL_AS_gboolean _dist (BYVAL_AS_GtkTreeModel_PTR, BYVAL_AS_GtkTreePath_PTR, BYVAL_AS_GtkTreeIter_PTR, BYVAL_AS_gpointer)
 Callback for search nearest point. More...
 

Public Attributes

UDTnearest_result Res [3+1]
 
float Lat
 
float Lon
 

Detailed Description

Class finding the nearest track point.

The constructor searches all active tracks for the point nearest to the given location. In case of more than four active tracks, the most nearest for loaders remain in the TS_nearest.Res array.

Since
0.0

Definition at line 79 of file track_store.bi.

Constructor & Destructor Documentation

◆ TS_nearest()

TS_nearest::TS_nearest ( BYVAL_AS_float  La,
BYVAL_AS_float  Lo 
)

Find the point nearest to a location.

Parameters
LaLatiture [radians]
LoLongiture [radians]

This constructor searches in all enabled tracks the point nearest to the given location. In the result array TS_nearest.Res the four most nearest point/tracks get collected, if there're more than four tracks enabled.

Since
0.0

Definition at line 250 of file track_store.bas.

Here is the call graph for this function:

Member Function Documentation

◆ _dist()

FUNCTION_CDECL_AS_gboolean TS_nearest::_dist ( BYVAL_AS_GtkTreeModel_PTR  Model,
BYVAL_AS_GtkTreePath_PTR  Path,
BYVAL_AS_GtkTreeIter_PTR  Iter,
BYVAL_AS_gpointer  UserData 
)
static

Callback for search nearest point.

Parameters
Modeltree model
Pathline in Model
Iteriter in Model
UserDataunused
Returns
FALSE (in order to continue)

This function is designed as a gtk_tree_model_foreach callback. It searchesn (2d) in all enabled tracks for the nearest point to a given location and stores the distance and the track in a free slot in the result array TS_nearest.Res. Whenn all slots are used, a slot with bigger distance gets replaced (if any).

Since
0.0

Definition at line 210 of file track_store.bas.

Here is the caller graph for this function:

Member Data Documentation

◆ Res

UDTnearest_result TS_nearest::Res[3+1]

Definition at line 80 of file track_store.bi.

◆ Lat

float TS_nearest::Lat

Definition at line 81 of file track_store.bi.

◆ Lon

float TS_nearest::Lon

Definition at line 81 of file track_store.bi.


The documentation for this class was generated from the following files: