GPS4Palm

Source Code Documentation


georef.c File Reference

#include <PalmOS.h>
#include <PalmCompatibility.h>
#include "stringil.h"
#include "MapForm.h"
#include "georef.h"
#include "geo.h"
#include "file_io.h"
#include "getdir.h"
#include "imginfo.h"
#include "common.h"

Include dependency graph for georef.c:

Go to the source code of this file.

Functions

Boolean georef_filename (const Char *filename, double *map_lat, double *map_lon, UInt32 *map_scale)
 Get the map parameters SCALE, LAT and LON from the filename.
Boolean search_map (char *filename, UInt32 *card, double lon, double lat, UInt16 maxx, UInt16 maxy)
 Search for usable map.

Variables

PrefsType gPrefs
 Preferences data structure.
Boolean gVfsManagerFtr
 VFS Feature Set available.


Function Documentation

Boolean georef_filename const Char *  filename,
double *  map_lat,
double *  map_lon,
UInt32 *  map_scale
 

Get the map parameters SCALE, LAT and LON from the filename.

Parameters:
filename filename
map_lat Ptr to Latitude
map_lon Ptr to Longitude
map_scale Ptr to Scale
Returns:
true if all parameters decoded successfully, otherwise false map_lat, map_lon, and map_scale

Definition at line 90 of file georef.c.

References lat, and lon.

Referenced by MapFormHandleEvent(), and search_map().

Boolean search_map char *  filename,
UInt32 *  card,
double  lon,
double  lat,
UInt16  maxx,
UInt16  maxy
 

Search for usable map.

Note:
Currently search_map stops on the first map which fits, even if there is a better map (i.e. with the map center closer to the current position) available.
Parameters:
filename filename or NULL (returned by reference)
card card/volume number and VFS flag (returned by reference)
lat Latitude of current position
lon Longitude of current position
maxx Max. x-extent of screen
maxy Max. y-extent of screen
Returns:
true if usable map found, otherwise false

Definition at line 247 of file georef.c.

References calcxy(), CreateDatabase(), CROSS_X, CROSS_Y, DestroyDatabase(), fclose(), FILEDIR, fopen(), georef_filename(), getdir(), getdir_vfs(), gPrefs, gVfsManagerFtr, h, imginfo(), PrefsType::mapprefs, memcpy(), MapPrefsType::scale, scratch, SORTPREFIX, StrCopy, and w.

Referenced by MapFormHandleEvent().


Variable Documentation

PrefsType gPrefs
 

Preferences data structure.

Definition at line 279 of file GPS.c.

Boolean gVfsManagerFtr
 

VFS Feature Set available.

Definition at line 263 of file GPS.c.


Created: Mon, 08 Oct 2007 22:33:16 +0200
Copyright ©2004 M. Prinke