- The source for the project is versioned using git
- The repository is hosted at gitlab.com
To checkout the source code run
- fgracker/ - the Tracker Server
- mpstatus/ - a www page and perl script to query mp statuses
- plib/ - see plib below
- tools/ - contains check_fgms.sh, a script to check fgms status
- docs/ - stuff to do with documentation in this page
The fgms repository contains all the libs required to install. However some parts were copied, borrowed etc from other sources:
This is an overview about how the communicatinons works between fgfs instances via an fgms.
- The table below shows communications with three players over a network
- Messages are sent a few times a second
|fgms - me||packet||fgms||packet||fgms - others |
|me||> send >||> relay >||> recv >||other 1 |
|> recv >||other 2 |
|me||< recv <||< relay <||< send <||other 1 |
|> relay >||> recv >||other 2 |
- packets are assembled on an fgfs instance, values such as callsign, position, speed etc
- the values are packaged into an XDR encoded binary blob
- the packet is transmitted via udp out to an mp server
- eg –multiplayer=out,15,mpserver14.flightgear.org,5000
- a fgms client the other ends will recive the packet
- decode the data encoded in XDR
- then update the sim with this data
- And < vice > versa
- The data encoded into a sequence of bytes using XDR.
- Every packet starts with 'Header' bytes which define whats in the rest of the packet.
|An Mp Message Packet |
|Header||Other data |
- The T_MsgHdr is the c struct used to define the header.
|Magic||The "magic" that must start each packet, see MSG_MAGIC |
|ProtoVer||The protocol version which must match - see PROTO_VER |
|MsgId||the MsgId is the "type" of message that is sent |
|MsgLen||The length of this message |
|Callsign||Length is MAX_CALLSIGN_LEN abc123 |
- T_MsgHdr::MsgId - the MsgId is one of:
- POS_DATA_ID - a position message and the most trafficked
- ::RESET_DATA_ID - to reset ?
- ::CHAT_MSG_ID - for mp chat BUT
- ::CHAT_MSG_ID is not used in current implementation. Instead chat is packaged into properties.
- T_PositionMsg is the c struct used to define a position
|Model||Length is MAX_MODEL_NAME_LEN eg /model/foo/aero.xml |
|time||epoch time |
|lag||lag ?? |
- External Data Representation
XDR is a standard data serialization format. It allows data to be transferred between different kinds of computer systems. Converting from the local representation to XDR is called encoding. Converting from XDR to the local representation is called decoding. XDR is implemented as a software library of functions which is portable between different operating systems and is also independent of the transport layer.
fgms uses a small subset of xdr necessary for multiplayer. This is defined in tiny_xdr.hxx
You are more than welcome to contribute to the project.
The documentation is created using doxygen and is generated from source.
- Here for some formating info
- Private variables/function are documented
- Pages, ie stuff not related to source such as this page are in /doc/pages/
- The doxygen tag file is located at fgms.tag
- Doxygen 1.8+ is required for building the documents.