fgms 0.11.8
The
FlightGear MultiPlayer Server
project
page_tracker.cxx
Go to the documentation of this file.
1  /**
2  * \page tracker FG Tracker
3  *
4  * The \ref FlightGear Tracker tracks flights performed on multiplayer server.
5  *
6  * \note
7  * - Currently there is only one tracking server, hosted by \ref hazuki
8  * - Click here > http://fgtracker.ahven.eu/modules/fgtracker/
9  *
10  * - Flights are indexed and stored by their Callsign
11  * - The following data is logged
12  * - Start Time
13  * - End Time
14  * - Max altitude
15  * - Aircraft
16  * - Duration
17  * - Total distance
18  * - Max ground speed
19  * - Max Mach
20  *
21  *
22  * The Tracker comprises:
23  * * <b>\ref tracker_server</b> - a standalone application
24  * * <b>\ref tracker_client</b> - embedded in fgms
25  * * <b>\ref tracker_protocol</b> - for data interchange
26  *
27  * \section tracker_protocol Tracker Protocol
28  * * There are five types of messages exchanged:
29  * - CONNECT
30  * - POSITION
31  * - DISCONNECT
32  * - PING
33  * - PONG
34  *
35  * Originally, the tcp exchange between \ref tracker_client and the \ref tracker_server only
36  * occurred when there was a message to send. This meant it was unknown if the
37  * \ref tracker_server was connected until it actually came time to send the message.
38  *
39  * The way it was written originally meant messages would be lost. So \ref hazuki introduced the
40  * PING/PONG messages at the same time he added a save so no messages would be lost.
41  *
42  * \todo (pete) Expalin messages more
43  *
44  * \section tracker_server Tracker Server
45  * - The Tracker server is run as a standalone application, seperate from \ref fgms
46  * - It could be located on another machine on the internet
47  * - It can track more than one mpserver
48  * - The tracker is created as part of the install process, see \ref install_tracker
49  *
50  * \subsection tracket_server_dev Dev Info
51  * The source code for the tracker server is in the <b>contrib/fgtracker/</b> directory and
52  * the application is written is c. (see server.c).
53  *
54  *
55  *
56  * \section tracker_client Tracker Client
57  * * The client is embedded in \ref fgms itelf (see FG_TRACKER by \ref julien)
58  * * The tracker client is configured in \ref tracker_config section of the \ref fgms_conf file
59  *
60  * \note
61  * - Only locally attached clients are forwarded to the tracker.
62  * - Pilots connected to fgms with \ref servertracked disabled will
63  * never appear on the tracker.
64  *
65  * \subsection tracker_client_dev Dev Info
66  * Internally \ref fgms prepares the messages, and sends them
67  * - first to an IPC msgsnd (m_ipcid, &buf, ... )
68  * - and are received by FG_TRACKER, msgrcv (ipcid, &buf, ...)
69  * - then written to the tracker socket - SWRITE( m_TrackerSocket, msg, ... )
70  *
71  * The reason for using the unix IPC mechanism was due to
72  * the FG_TRACKER being run in a fork() process, thus does not have
73  * shared memory. Hence the unix msgsnd/msgrcv IPC.
74  *
75  * For windows, a FG_TRACKER thread, was introduced by \ref geoff since there is no fork() in windows;
76  * a simple vector msg_queue, protected by a mutex is used to pass
77  * these messages internally from FG_SERVER to FG_TRACKER.
78  *
79  */