Ubuntu Platform API  3.0.0
A library helping with tight integration into the Ubuntu platform
Functions and types for accessing GPS H/W.

Data Structures

struct  UHardwareGpsLocation
 
struct  UHardwareGpsSvInfo
 
struct  UHardwareGpsSvStatus
 
struct  UHardwareGpsAGpsStatus
 
struct  UHardwareGpsNiNotification
 

Macros

#define U_HARDWARE_GPS_MAX_SVS   32
 
#define U_HARDWARE_GPS_CAPABILITY_SCHEDULING   0x0000001
 
#define U_HARDWARE_GPS_NI_SHORT_STRING_MAXLEN   256
 

Typedefs

typedef uint32_t UHardwareGpsNiNotifyFlags
 
typedef int UHardwareGpsUserResponseType
 
typedef int UHardwareGpsNiEncodingType
 

Enumerations

enum  {
  U_HARDWARE_GPS_STATUS_NONE = 0,
  U_HARDWARE_GPS_STATUS_SESSION_BEGIN = 1,
  U_HARDWARE_GPS_STATUS_SESSION_END = 2,
  U_HARDWARE_GPS_STATUS_ENGINE_ON = 3,
  U_HARDWARE_GPS_STATUS_ENGINE_OFF = 4
}
 
enum  {
  U_HARDWARE_GPS_ENC_NONE = 0,
  U_HARDWARE_GPS_ENC_SUPL_GSM_DEFAULT = 1,
  U_HARDWARE_GPS_ENC_SUPL_UTF8 = 2,
  U_HARDWARE_GPS_ENC_SUPL_UCS2 = 3,
  U_HARDWARE_GPS_ENC_UNKNOWN = -1
}
 
enum  {
  U_HARDWARE_GPS_AGPS_TYPE_SUPL = 1,
  U_HARDWARE_GPS_AGPS_TYPE_C2K = 2
}
 
enum  {
  U_HARDWARE_GPS_POSITION_MODE_STANDALONE = 0,
  U_HARDWARE_GPS_POSITION_MODE_MS_BASED = 1,
  U_HARDWARE_GPS_POSITION_MODE_MS_ASSISTED = 2
}
 
enum  {
  U_HARDWARE_GPS_POSITION_RECURRENCE_PERIODIC = 0,
  U_HARDWARE_GPS_POSITION_RECURRENCE_SINGLE = 1
}
 

Detailed Description

Macro Definition Documentation

◆ U_HARDWARE_GPS_CAPABILITY_SCHEDULING

#define U_HARDWARE_GPS_CAPABILITY_SCHEDULING   0x0000001

Flags for the gps_set_capabilities callback.

GPS HAL schedules fixes for U_HARDWARE_GPS_POSITION_RECURRENCE_PERIODIC mode. If this is not set, then the framework will use 1000ms for min_interval and will start and call start() and stop() to schedule the GPS.

Definition at line 64 of file gps.h.

◆ U_HARDWARE_GPS_MAX_SVS

#define U_HARDWARE_GPS_MAX_SVS   32

Maximum number of SVs for u_hardware_gps_sv_status_callback().

Definition at line 37 of file gps.h.

◆ U_HARDWARE_GPS_NI_SHORT_STRING_MAXLEN

#define U_HARDWARE_GPS_NI_SHORT_STRING_MAXLEN   256

String length constants

Definition at line 111 of file gps.h.

Typedef Documentation

◆ UHardwareGpsNiEncodingType

NI data encoding scheme

Definition at line 118 of file gps.h.

◆ UHardwareGpsNiNotifyFlags

typedef uint32_t UHardwareGpsNiNotifyFlags

UHardwareGpsNiNotifyFlags constants

Definition at line 78 of file gps.h.

◆ UHardwareGpsUserResponseType

GPS NI responses, used to define the response in NI structures

Definition at line 91 of file gps.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The status of the GPS hardware.

Enumerator
U_HARDWARE_GPS_STATUS_NONE 

GPS status unknown.

U_HARDWARE_GPS_STATUS_SESSION_BEGIN 

GPS has begun navigating.

U_HARDWARE_GPS_STATUS_SESSION_END 

GPS has stopped navigating.

U_HARDWARE_GPS_STATUS_ENGINE_ON 

GPS has powered on but is not navigating.

U_HARDWARE_GPS_STATUS_ENGINE_OFF 

GPS is powered off.

Definition at line 43 of file gps.h.

◆ anonymous enum

anonymous enum

Known encoding types for Ni responses

Enumerator
U_HARDWARE_GPS_ENC_NONE 
U_HARDWARE_GPS_ENC_SUPL_GSM_DEFAULT 
U_HARDWARE_GPS_ENC_SUPL_UTF8 
U_HARDWARE_GPS_ENC_SUPL_UCS2 
U_HARDWARE_GPS_ENC_UNKNOWN 

Definition at line 124 of file gps.h.

◆ anonymous enum

anonymous enum

Known AGPS types

Enumerator
U_HARDWARE_GPS_AGPS_TYPE_SUPL 
U_HARDWARE_GPS_AGPS_TYPE_C2K 

Definition at line 137 of file gps.h.

◆ anonymous enum

anonymous enum

Known positioning modes

Enumerator
U_HARDWARE_GPS_POSITION_MODE_STANDALONE 

Mode for running GPS standalone (no assistance).

U_HARDWARE_GPS_POSITION_MODE_MS_BASED 

AGPS MS-Based mode.

U_HARDWARE_GPS_POSITION_MODE_MS_ASSISTED 

AGPS MS-Assisted mode.

Definition at line 147 of file gps.h.

◆ anonymous enum

anonymous enum

Known positioning modes

Enumerator
U_HARDWARE_GPS_POSITION_RECURRENCE_PERIODIC 

Receive GPS fixes on a recurring basis at a specified period.

U_HARDWARE_GPS_POSITION_RECURRENCE_SINGLE 

Request a single shot GPS fix.

Definition at line 161 of file gps.h.