4 * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef _GPS_PLUGIN_DATA_TYPES_H_
20 #define _GPS_PLUGIN_DATA_TYPES_H_
30 /** Maximum number of satellite which is in used */
31 #define MAX_GPS_NUM_SAT_USED (12)
33 /** Maximum number of satellite which is in view */
34 #define MAX_GPS_NUM_SAT_IN_VIEW (32)
37 * This enumeration has error type.
40 GPS_ERR_NONE = 0, /**< Error None */
41 GPS_ERR_TIMEOUT = -100, /**< pos_cb error GPS Timeout */
42 GPS_ERR_OUT_OF_SERVICE = -101, /**< pos_cb error GPS out of service */
43 GPS_ERR_COMMUNICATION = -200, /**< Plugin event callback error */
47 * This enumeration has geofence service status.
50 GEOFENCE_STATUS_UNAVAILABLE = 0,
51 GEOFENCE_STATUS_AVAILABLE = 1,
55 * This enumeration has geofence service error type.
58 GEOFENCE_ERR_NONE = 0,
59 GEOFENCE_ERR_TOO_MANY_GEOFENCE = -100,
60 GEOFENCE_ERR_ID_EXISTS = -101,
61 GEOFENCE_ERR_ID_UNKNOWN = -200,
62 GEOFENCE_ERR_INVALID_TRANSITION = -300,
63 GEOFENCE_ERR_UNKNOWN = -400,
67 * This enumeration has XTRA request error type (wearable profile use only).
70 XTRA_REQUEST_ERR_NONE = 0,
71 XTRA_REQUEST_ERR_UNKNOWN = -100,
72 } xtra_request_error_t;
75 * This structure defines the GPS position data.
78 time_t timestamp; /**< Timestamp */
79 double latitude; /**< Latitude data (in degree) */
80 double longitude; /**< Longitude data (in degree) */
81 double altitude; /**< Altitude data (in meter) */
82 double speed; /**< Speed (in m/s) */
83 double bearing; /**< Direction from true north(in degree) */
84 double hor_accuracy; /**< Horizontal position error(in meter) */
85 double ver_accuracy; /**< Vertical position error(in meter) */
89 * This structure defines the GPS batch data.
92 int num_of_location; /**< Number of batch data */
96 * This structure defines the satellite data.
99 int prn; /**< Pseudo Random Noise code of satellite */
100 int snr; /**< Signal to Noise Ratio */
101 int elevation; /**< Elevation */
102 int azimuth; /**< Degrees from true north */
103 int used; /**< Satellite was used for position fix */
107 * This structure defines the GPS satellite in view data.
110 time_t timestamp; /**< Timestamp */
111 unsigned char pos_valid; /**< TRUE, if position is valid */
112 int num_of_sat; /**< Number of satellites in view */
113 sv_info_t sat[MAX_GPS_NUM_SAT_IN_VIEW]; /**< Satellite information */
117 * This structure defines the NMEA data.
120 time_t timestamp; /**< Timestamp */
121 int len; /**< NMEA data length */
122 char *data; /**< Raw NMEA data */
126 * This structure defines the geofence data.
129 int geofence_id; /**< Geofence ID */
130 double latitude; /**< Latitude data (in degree) */
131 double longitude; /**< Longitude data (in degree) */
132 int radius; /**< Radius data (in meters) */
136 char imsi[16]; /**< IMSI */
139 int lac; /**< Location area code */
140 int psc; /**< Primary Srambling code */
141 int cid; /**< Cell id */
147 #endif /* _GPS_PLUGIN_DATA_TYPES_H_ */