GPS4Palm

Source Code Documentation


ApproachForm.c File Reference

#include <PalmOS.h>
#include "ResourceDefines.h"
#include "Serial.h"
#include "ApproachForm.h"
#include "Utils.h"
#include "Data.h"
#include "GPS.h"
#include "fp.h"
#include "geo.h"
#include "common.h"

Include dependency graph for ApproachForm.c:

Go to the source code of this file.

Functions

Boolean ApproachFormHandleEvent (EventPtr eventP)
 Approach Form event handler.

Variables

PrefsType gPrefs
 Preferences data structure.
DmOpenRef gWaypointDB
 Waypoint Database Reference.
GPSType gGPSData


Function Documentation

Boolean ApproachFormHandleEvent EventPtr  eventP  ) 
 

Approach Form event handler.

The Approach Form shows the Active Waypoint's ID and the current distance to the waypoint. If the GPS data is valid, the distance display is updated periodically. If enabled in the application preferences, an alarm sound is generated periodically.

Parameters:
eventP Pointer to event structure
Returns:
Status flag: event handled

Definition at line 100 of file ApproachForm.c.

References PrefsType::act_wpt, PrefsType::approach_sound, ApproachDstField, ApproachOKButton, ApproachWptField, calcR(), DoReceiveFlush(), PrefsType::form, format_number(), gc_dist_sphere(), gGPSData, gPortID, gPrefs, gWaypointDB, D104_Wpt_Type::ident, Semicircle_Type::lat, GPSType::lat, Semicircle_Type::lon, GPSType::lon, D104_Wpt_Type::posn, ReadFromGPS(), semi2deg(), SetFieldText(), UnpackWaypoint(), GPSType::valid, and ActWayptType::waypointID.


Variable Documentation

GPSType gGPSData
 

Definition at line 129 of file HandleMessage.c.

Referenced by ApproachFormHandleEvent(), HandleMessage(), MainFormHandleEvent(), MapFormHandleEvent(), NavigationFormHandleEvent(), NotifyApproach(), SkyviewFormHandleEvent(), TrackIntervalCheck(), TrackWriteLog(), and WayptEditFormHandleEvent().

PrefsType gPrefs
 

Preferences data structure.

Definition at line 279 of file GPS.c.

DmOpenRef gWaypointDB
 

Waypoint Database Reference.

Definition at line 107 of file Data.c.

Referenced by ApproachFormHandleEvent(), CheckApproach(), get_next_rte(), get_next_wpt(), InitializeWaypoints(), NavigationFormHandleEvent(), PackWaypoint(), RouteEditFormHandleEvent(), RouteFormHandleEvent(), store_rte(), store_wpt(), TrackFormHandleEvent(), UpdateActWpt(), WaypointFormHandleEvent(), wayptDrawTable(), and WayptEditFormHandleEvent().


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