Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Tridgell 7b7bf3ef86 AP_Terrain: fixed bug in disk offset calculation
this fixes a problem where two different locations could both be
mapped to the same disk block in the terrain/*.DAT files. That meant
that pre-filled terrain on the microSD card would sometimes require a
download in flight. It also means that a RTL with loss of GCS could
sometimes fly through a region with no terrain data available

Other changes in this patch:

 - allow for a 2cm discrepancy in the lat/lon of the grid
   corners. This is needed to allow for slightly different floating
   point rounding in tools that pre-generate terrain data to load on
   the microSD

 - added TERRAIN_OPTIONS parameter to allow the user to disable
   attempts to download new terrain data. This is mostly useful for
   testing to validate a terrain generator
2020-05-05 11:21:33 +10:00
Andrew Tridgell a4860afd32 AP_Terrain: convert to use AP_Filesystem 2019-08-27 15:40:43 +10:00
Pierre Kancir 6fbcb21ae3 AP_Terrain: use get_distance_NE instead of location_diff 2019-04-08 08:00:52 -07:00
Dr.-Ing. Amilcar do Carmo Lucas 6082b230e8 AP_Terrain: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Andrew Tridgell f8542c86b6 AP_Terrain: added support for AP_Terrain for ChibiOS 2018-01-15 11:46:02 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Caio Marcelo de Oliveira Filho 0aa520a273 AP_Terrain: use millis/micros/panic functions 2015-11-20 12:34:53 +09:00
Andrew Tridgell 0d26252bdb AP_Terrain: don't allocate cache array when terrain not enabled
this makes it easy to save 22k of ram when running other experiments
2015-09-23 08:31:17 +10:00
Gustavo Jose de Sousa fcd1d4938a AP_Terrain: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:24 +10:00
Andrew Tridgell c4047f6f11 AP_Terrain: rename find_grid() to find_grid_cache()
thanks Randy!
2014-07-25 09:52:20 +10:00
Andrew Tridgell 3faafc9644 AP_Terrain: replace HAVE_AP_TERRAIN with AP_TERRAIN_AVAILABLE 2014-07-25 07:59:48 +10:00
Andrew Tridgell db506b76fa AP_Terrain: split up code into separate cpp files
this should make it a bit easier to review
2014-07-24 21:50:19 +10:00