<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Tools</categorytree>
__TOC__

The <tt>server</tt> (in <tt>sw/ground_segment/tmtc/</tt>) is an agent that logs, distributes, and preprocesses messages for the [[GCS]] and other agents as described in the [[Overview#System_Architecture|system overview]].

See [[DevGuide/Server_GCS_com]] for the communication between the ''server'' and the ''[[GCS]]''.

== Options ==
  -b Bus	Default is 127.255.255.255:2010
  -http         Send http: URLs (default is file:)
  -hostname     <hostname> Set the address for the http server
  -port         <port> Set http port for serving XML and KML files (default is 8889)
  -kml          Enable KML file updating
  -kml_no_http  KML without web server (local files only)
  -n            Disable log
  -timestamp    Bind on timestamped messages
  -no_md5_check Disable safety matching of live and current configurations
  -replay_old_log Enable aircraft registering on PPRZ_MODE messages
  -help         Display this list of options
  --help        Display this list of options

== Running server and GCS on different hosts ==
Upon startup the [[GCS]] requests the <tt>CONFIG</tt> message from the server, which contains the URLs to the aircraft configuration files.<br/>
Normally these are sent as file URLs, e.g. ''file:///home/user/paparazzi/conf/airframes/your_airframe.xml''.

Which implies that you need the exact same configuration files on the computer where you start the GCS.

=== Serving XML files via http ===
Usually the nicer solution is to serve the XML files (flight plan, settings, etc) via http from the host running the server.

To do that, start server with the <tt>-http</tt> option and set the hostname/ip with <tt>-hostname host</tt>, e.g.
 server -http -hostname 192.168.0.100
and start a http server that serves the contents of the paparazzi directory (Http Server from the Tools menu in Paparazzi Center), or:
 cd ~/paparazzi/
 python -m SimpleHTTPServer 8889
to check if it works, you can open [http://192.168.0.100:8889 http://192.168.0.100:8889] in your webbrowser where you should see the contents of the paparazzi directory.
Or use netstat to see if 8889 port is opened for listening:
 netstat -l|grep 8889

== Export KML to Google Maps ==
It is useful to export Flight information to Google Map. you can show basic flight information in google map cross platform through IP network.

You will need a webserver runing in the GCS computer, see above.

Then in Paparazzi center, execute a session. Pass some parameters to server agent:

 ''server -kml -hostname 192.168.0.100(replace with you paparazzi center IP address)''


It's done. Now in any computer in the network, open browser to access <nowiki>http://192.168.0.100:8889/var/aircrafts/(you AC name)/</nowiki>
you will see FollowMe.kml file, open it with Google earth. you will be able to see the real time flight information. the information updated are:

  1. AC lat, lon, alt
  2. Flight Plan
  3. current route

[[File:Kml_export.png]]
----




[[Category:Tools]] [[Category:User_Documentation]]