Geo lookup: don't pass arguments / result via global object

The reverseGeoLookup() fetches dive-site data via GPS coordinates.
The coordinates and the result were passed via the global
"displayed_dive_site" object. To make data-flow more clear,
pass data as in and out parameters instead.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-11 21:02:55 +02:00 committed by Dirk Hohndel
parent 04ad9c885d
commit ad57871a2c
3 changed files with 36 additions and 33 deletions

View file

@ -2,6 +2,11 @@
#ifndef DIVESITEHELPERS_H
#define DIVESITEHELPERS_H
void reverseGeoLookup();
#include "taxonomy.h"
#include "units.h"
// Perform a reverse geo-lookup and put data in the provided taxonomy field.
// Original data with the exception of OCEAN will be overwritten.
void reverseGeoLookup(degrees_t latitude, degrees_t longitude, taxonomy_data *taxonomy);
#endif // DIVESITEHELPERS_H