Difference between revisions of "Maps"

From PaparazziUAV
Jump to navigation Jump to search
Line 32: Line 32:
== SRTM Data ==
== SRTM Data ==
The [http://srtm.usgs.gov/ SRTM] option from the ''Nav'' menu in the GCS displays the ground altitude of the mouse in the top right hand corner. The SRTM data files (<tt>.hgt.zip</tt> or <tt>.hgt.bz2</tt>) must be copied to the <tt>data/srtm/</tt> directory. They can be downloaded from [ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3 ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3].
The [http://srtm.usgs.gov/ SRTM] option from the ''Nav'' menu in the GCS displays the ground altitude of the mouse in the top right hand corner. The SRTM data files (<tt>.hgt.zip</tt> or <tt>.hgt.bz2</tt>) must be copied to the <tt>data/srtm/</tt> directory. They can be downloaded from [ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3 ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3].
Some area (for example high latitudes) are not well covered by official SRTM data. Some other data have been compiled under the same format: [http://www.viewfinderpanoramas.org/dem3.html|http://www.viewfinderpanoramas.org/dem3.html].

Revision as of 14:43, 15 November 2007

Google Maps

The Paparazzi GCS will automatically download satellite photo tiles from Google for the area defined in the flight plan. These tiles are fully calibrated and automatically stitched together by the GCS. To load the map tiles simply select Maps->Google Maps Fill (Ctrl-F) from the GCS pulldown menu and the tiles corresponding to the GPS coordinates defined in the flight plan will begin donloading. Pan or zoom the map and re-fill to get more tiles. Tiles are saved in var/maps/ for off-line use. Checking Maps->Google Maps Auto will automatically fill the map with tiles while paning and zooming. There is also a command line option to start the GCS with the Auto-fill feature enabled:

paparazzi-gcs -google_fill.  

If you are behind a firewall, you can use a proxy by setting the http_proxy environment variable:

export http_proxy=http://squid:3128

If you wish to create a calibrated map from the google tiles, so that upon launching the map2d program a map of the area is shown, go ahead and put into view the area you wish to make the map. While holding left click, drag the area for the map. A red border will appear around the area. Next click on Maps->Map of Region or Maps->Map of Google Tiles. While the former will save the visible region (with waypoints, tracks, ...if any, under the current zoom), the latter will stich together the original Google tiles covering the selected region. Save the xml file to the data/maps/ directory. This program will automatically screenshot the image and take reference location points and calibrate the map using them. You will be able to load this map in your next sessions (with the Maps->Load menu or with the -m option you can add in the your section of control_panel.xml.

Example of map created from google tiles, gifhorn.xml:

<map file="gifhorn.jpg" projection="Mercator">
 <point x="0" y="0" geo="WGS84 52.527982 10.452157"/>
 <point x="1965" y="1284" geo="WGS84 52.519595 10.473248"/>
</map>

The GCS currently supports three projections (UTM, Mercator and LambertIIe). If you try to place a calibrated map for one projection (e.g. UTM) on another projection plot (e.g. Mercator) the image will be rotated and skewed and a warning will be shown during loading.


Manually Defined Maps

Maps are used in the groundstation to give geographical reference to the flight area. These calibrated maps are described with two files: the image itself (.png, .jpg or .gif) and an xml file containing geographic references of some points of the bitmap.

For example, muret_UTM.xml:

<map file="muret_UTM.gif" projection="UTM" scale="2.5" approx_ground_altitude="185" utm_zone="31" opacity="100">
 <point x="0" y="0" utm_x="359000" utm_y="4815000" geo="WGS84 43.474630 1.256652"/>
 <point x="0" y="800" utm_x="359000" utm_y="4813000" geo="WGS84 43.456629 1.257169"/>
 <point x="800" y="800" utm_x="361000" utm_y="4813000"/>
</map>

These maps can be created from any image (many are available from various websites). Save the file as a jpeg and place it in the data/maps/ folder. From the GCS select Maps->Calibrate. After loading the image (which is displayed), you will have to choose at least two reference points, name them with their geographic coordinates (in WGS84 or UTM) and save. The created map (an XML file describing the geographical position of your original bitmap) can then be loaded (Maps->Load).

SRTM Data

The SRTM option from the Nav menu in the GCS displays the ground altitude of the mouse in the top right hand corner. The SRTM data files (.hgt.zip or .hgt.bz2) must be copied to the data/srtm/ directory. They can be downloaded from ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3. Some area (for example high latitudes) are not well covered by official SRTM data. Some other data have been compiled under the same format: [1].