Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkm/xcplanner
Google Maps cross country flight planning tool
https://github.com/dkm/xcplanner
Last synced: 2 months ago
JSON representation
Google Maps cross country flight planning tool
- Host: GitHub
- URL: https://github.com/dkm/xcplanner
- Owner: dkm
- License: gpl-3.0
- Created: 2009-06-30T05:58:28.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-08-11T17:28:16.000Z (over 14 years ago)
- Last Synced: 2023-04-17T14:03:24.946Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://github.com/twpayne/xcplanner
- Size: 320 KB
- Stars: 16
- Watchers: 8
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
XC Planner Google Maps cross country flight planning tool
=========================================================XC Planner is a web application for planning cross country flights. Notable features include:
* Intuitive user interface
* Support for many flight types including open distance, out-and-returns and triangles
* Support for [XContest](http://www.xcontest.org/)’s airspace and SkyWays maps
* Display of waypoint elevations using [CIGAR-CSI](http://srtm.csi.cgiar.org/) data
* Display of nearby takeoffs from [Leonardo](http://www.paraglidingforum.com/leonardo/)
* Generation of GPX files for easy upload of your flight to your GPS for declared flights
* Generation of links so you can share your flight planning with others
* Built on [Google Maps](http://maps.google.com)You install it on a web server and then can access it from anywhere using your web browser. This document is for system administrators who wish to install XC Planner on their own servers, if you’re a pilot then it’s easiest to use an existing installation such as the one at .
Basic Installation
------------------1. Unpack XC Planner in to a suitable directory on your web server, e.g. `/var/www/html/xcplanner`. The easiest way to do this is to directly check out the latest version from GitHub:
cd /var/www/html
git clone http://github.com/twpayne/xcplanner.gitYou can then update XC Planner at any time by running `git pull`. Alternatively, you can simply download a tar or zip file from .
2. Copy `config.php.sample` to `config.php`.
3. Get a [Google Maps API key](http://code.google.com/apis/maps/signup.html) for your website and set `$GOOGLE_MAPS_API_KEY` in `config.php`. The default key distributed with XC Planner is for .
4. Install the [Smarty](http://www.smarty.net/) PHP template library and set `$SMARTY_DIR` in `config.php` to point to the directory containing `Smarty.class.php`. Packages for Smarty are available in most Linux distributions:
Distribution Package name $SMARTY_DIR
RedHat php-Smarty /usr/share/php/Smarty
Debian smarty /usr/share/php/smarty
If you're installing on RedHat then you will also need the `php-pecl-json` package.5. Make sure that the `templates_c` directory is writeable by the web server, e.g.
chown apache:apache templates_c
6. Point your web browser at .
Linking to XC Planner
---------------------If you’re hosting XC Planner on your own server then you can edit `config.php` to set suitable defaults. If you prefer to use an existing installation (e.g. ) then you can set suitable defaults with a query string. The available options are:
* `location=_name_`
* `flightType=_type_`
* `turnpoints=[[_lat1_,_lng1_],[_lat2_,_lng2_],...]`
* `start=[_lat_,_lng_]`These can be used to set sensible defaults if you want to link to XC Planner from your XC league’s website. For example:
* OLC 5-point flight around Interlaken:
* CFD FAI triangle around Chamonix:Advanced Installation
---------------------### Elevation data ###
XC Planner can use [CGIAR-CSI](http://srtm.csi.cgiar.org/) data to determine turnpoint elevations. The program `bin/srtm-download` can be used to download and prepare this data for use. It is advisable to download the CGIAR-CSI tiles for the areas you wish to cover. For example, to download the data for Europe, run
bin/srtm-download --europe
To download the data for the entire world, run
bin/srtm-download --all --ignore-errors
XC Planner will, by default, use an simple compressed format for the elevation data. Individual rows of elevation data are compressed separately which gives a disk space saving of approximately 70% over uncompressed data at the expense of having to uncompress one row (12000 bytes) each time an elevation datum is requested. For popular areas, you may wish to store uncompressed tiles which are larger (72MB per tile) but are much faster to access.
The recommended configuration is to use compressed tiles for all areas except the European Alps. This can be achieved with the two commands:
bin/srtm-download --all --ignore-errors
bin/srtm-download --european-alps --tileThe compressed tiles require approximately 17GB of disk space, the four uncompressed European Alps tiles require an additional 276MB.
The `--ignore-errors` option causes `srtm-download` to ignore errors due to slow downloads, corrupt zip files, and so on. It’s useful if you want to start downloading tiles and then grab a coffee. After it has completed, you can run `srtm-download` again but without the `--ignore-errors` option to see where it encountered problems.
Note that `srtm-download` assumes that individual CGIAR-CSI tiles are 6000×6000 points. For an unknown reason, some tiles have different sizes.
XC Planner can also use a USGS web service to retrieve elevation data if the SRTM tiles are not available. Set `$get_elevation` in `config.php` to `get_elevation_usgs` to enable it. However, this is not recommended because it is very slow.
Once you have downloaded the elevation data, set `$ELEVATION` to `true` in `config.php` to activate in the web interface. Note that an HTTP request is made each time a user moves a turnpoint marker. This can result in hundreds of HTTP requests which can put a significant load on your web server. Think carefully before enabling this feature.
### Leonardo takeoffs ###
XC Planner can display takeoffs near the start turnpoint using data from Leonardo. To enable this, set `$LEONARDO` to `true` in `config.php`. XC Planner will do an AJAX request to `/leonardo/EXT_takeoff.php` to retreive takeoffs. This URL is currently hard coded, to change it, edit the `XCLoadTakeoffs` in `js/xcplanner.js`. All takeoffs within 10km of the start turnpoint are displayed, but upto 200 takeoffs in a 50km radius are downloaded. XC Planner downloads more takeoffs every time the start moves by more than 25km. For debugging purposes you can use the `EXT_takeoff.php` script to proxy requests to .
### XContest airspace and SkyWays ###
[XContest](http://www.xcontest.org/) have kindly made their airspace and SkyWays overlays available for use by XC Planner hosted on a limited number of sites. If you wish to enable these overlays, set the `$XCONTEST` variable to `true` in `config.php`. Note that simply overriding this will not make XContest’s airspace data availble on your site! XContest’s web servers will not serve this data to unauthorized sites. To request permission to use the XContest data contact [[email protected]](mailto:[email protected]).
### Customizing XC Planner ###
The template for the XC Planner web page is in `templates/index.tpl`. You are free to modify this as you wish, for example to match the design of your website, subject to the terms of the software license. The author requests that you include a link to XC Planner's original source code at if you use it on your website, but this is a request and does not change the license in any way.
License
=======XC Planner Google Maps cross country flight planning tool
Copyright © 2009, 2010 Tom Payne
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see .