Class finding the nearest track point. More...
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 |
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.
Definition at line 79 of file track_store.bi.
TS_nearest::TS_nearest | ( | BYVAL_AS_float | La, |
BYVAL_AS_float | Lo | ||
) |
Find the point nearest to a location.
La | Latiture [radians] |
Lo | Longiture [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.
Definition at line 250 of file track_store.bas.
|
static |
Callback for search nearest point.
Model | tree model |
Path | line in Model |
Iter | iter in Model |
UserData | unused |
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).
Definition at line 210 of file track_store.bas.
UDTnearest_result TS_nearest::Res[3+1] |
Definition at line 80 of file track_store.bi.
float TS_nearest::Lat |
Definition at line 81 of file track_store.bi.
float TS_nearest::Lon |
Definition at line 81 of file track_store.bi.