blob: b1efae7e42cd2678cfb1aaf5b5ee9108b9d1e24e [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*******************************************************************************
37 * Filename:
38 * ---------
39 * gps2lcsp_struct.h
40 *
41 * Project:
42 * --------
43 * MAUI
44 *
45 * Description:
46 * ------------
47 * This file is intends for local parameter declaration about GIS sap
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 *==============================================================================
54 * HISTORY
55 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
56 *------------------------------------------------------------------------------
57 * removed!
58 *
59 * removed!
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 * removed!
67 * removed!
68 * removed!
69 * removed!
70 *
71 * removed!
72 * removed!
73 * removed!
74 *
75 * removed!
76 * removed!
77 * removed!
78 *
79 * removed!
80 * removed!
81 * removed!
82 *
83 * removed!
84 * removed!
85 * removed!
86 *
87 * removed!
88 * removed!
89 * removed!
90 *
91 * removed!
92 * removed!
93 * removed!
94 *
95 * removed!
96 * removed!
97 * removed!
98 *
99 * removed!
100 * removed!
101 * removed!
102 *
103 * removed!
104 * removed!
105 * removed!
106 *
107 * removed!
108 * removed!
109 * removed!
110 *
111 * removed!
112 * removed!
113 * removed!
114 *
115 * removed!
116 * removed!
117 * removed!
118 *
119 * removed!
120 * removed!
121 * removed!
122 *
123 * removed!
124 * removed!
125 * removed!
126 *
127 * removed!
128 * removed!
129 * removed!
130 *
131 * removed!
132 * removed!
133 * removed!
134 *------------------------------------------------------------------------------
135 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
136 *==============================================================================
137 *******************************************************************************/
138#ifndef __GPS2LCSP_STRUCT_H__
139#define __GPS2LCSP_STRUCT_H__
140
141#include "gps2lcsp_enum.h"
142#include "kal_public_api.h"
143#include "kal_general_types.h"
144
145#define GPS_ASSIST_DATA_SUB_ITEMS_FEILDS 16
146#define GPS_ASSIST_DATA_N_SATE 8
147
148#define GPS_ASSIST_DATA_N_SATE_DGPS 16
149#define GPS_ASSIST_DATA_N_SATE_NAVIGATION_MODEL 16
150#define GPS_ASSIST_DATA_N_SATE_ALMANAC 32 /* According to Stanley Huang: max almanac sat number = 32, not 64 */
151#define GPS_ASSIST_DATA_N_SATE_ACQUISITION 16
152#define GPS_ASSIST_DATA_N_SATE_RTI 16
153#define GPS_ASSIST_DATA_N_SATE_MEAS 16 /* max allowed = 16, but typical = 4 to 12 */
154#define GPS_ASSIST_DATA_N_SATE_TOW_ASSIST 16
155
156#define GPS_ASSIST_CMD_TIMER_EXP_INTERVAL 1500
157#define GPS_QUERY_TIMER_INTERVAL 500
158
159#ifdef __AGPS_SUPPORT__
160
161typedef struct
162{
163 kal_uint8 semi_maj_uncertain; /* K1 = 0-127, mandotary, horizontal accuracy, need converted by 23.032 sec 6.2 */
164 kal_uint8 semi_min_uncertain; /* K2 = 0-127, mandotary, horizontal accuracy, need converted by 23.032 sec 6.2 */
165 kal_bool altitude_uncertain_valid; /* indicate if altitude_uncertain is valid */
166 kal_uint8 altitude_uncertain; /* K3 = 0-127, optional, vertical accuracy, need converted by 23.032 sec 6.4 */
167 kal_bool delay_valid; /* indiate if dealy is valid */
168 kal_uint32 delay; /* optional, response time ms*/
169 kal_bool age_valid; /* indicate if age field is valid, */
170 kal_uint16 age; /* 0 to 65535, optional, max location age, in sec */
171 kal_bool is_check_assist_data; /*set to TRUE will response error if assist data not enough */
172
173 kal_bool is_gsm_gps_ref_time_wanted; /* set to TRUE if GSM GPS ref time was required to be reported */
174
175 kal_bool is_utran_gps_ref_time_wanted; /*Set to TRUE if UTRAN GPS ref time was required to be reported */
176
177 /* uarfcn and phyCellId are valid when is_utran_gps_ref_time_wanted == KAL_TRUE */
178 kal_uint16 uarfcn;
179 kal_uint16 phyCellId;
180
181} gps_pos_qop_struct;
182
183typedef struct
184{
185 kal_bool accuracy_valid;
186 kal_uint8 accuracy;
187 kal_uint32 delay; /* optional, response time ms*/
188 kal_bool is_check_assist_data; /*Set to TRUE will response error if assist data not enough */
189
190 kal_bool is_gsm_gps_ref_time_wanted; /* set to TRUE if GSM GPS ref time was required to be reported */
191
192 kal_bool is_utran_gps_ref_time_wanted; /*Set to TRUE if UTRAN GPS ref time was required to be reported */
193
194 /* uarfcn and phyCellId are valid when is_utran_gps_ref_time_wanted == KAL_TRUE */
195 kal_uint16 uarfcn;
196 kal_uint16 phyCellId;
197
198} gps_meas_qop_struct;
199
200typedef struct
201{
202 kal_uint16 hor_speed; /*0-65536 .4remove and .5 add 1 unit is 1 km*/
203} gps_h_velocity_struct;
204
205typedef struct
206{
207 kal_uint32 hor_speed; /*unit is 0.1 km*/
208 kal_uint32 ver_speed; /*unit is 0.1 km*/
209} gps_hv_velocity_struct;
210
211typedef struct
212{
213 kal_uint32 hor_speed; /*unit is 0.1 km*/
214 kal_uint32 hor_speed_uncertainty;
215} gps_h_velocity_uncert_struct;
216
217typedef struct
218{
219 kal_uint32 ver_direction; /*degree*/
220 kal_uint32 hor_speed; /*unit is 0.1 km*/
221 kal_uint32 ver_speed; /*unit is 0.1 km*/
222 kal_uint32 hor_speed_uncertainty;
223 kal_uint32 ver_speed_uncertainty;
224} gps_hv_velocity_uncert_struct;
225
226typedef struct
227{
228 gps_velocity_type_enum type;
229 union
230 {
231 gps_h_velocity_struct hor_velocity;
232 gps_hv_velocity_struct hv_velocity;
233 gps_h_velocity_uncert_struct hor_uncertainty;
234 gps_hv_velocity_uncert_struct hv_uncertainty;
235 } v;
236} gps_velocity_struct;
237
238
239typedef struct
240{
241 kal_uint8 type; /* only "ellipsoid point with altitude and uncertainty ellipsoid"
242 type (1001b) is supported*/
243 kal_bool sign_latitude; /* true: SOUTH, false: NORTH */
244 kal_uint32 latitude; /* N1, encoded latitude */
245 kal_uint32 longtitude; /* N2, encoded longtitude with 2's complement */
246 kal_bool sign_altitude; /* true: DEPTH, false: HEIGHT */
247 kal_uint16 altitude; /* no encoding, unit in meter */
248 kal_uint8 unc_major; /* K1, encoded r1 */
249 kal_uint8 unc_minor; /* K2, encoded r2 */
250 kal_uint8 unc_bear; /* N3, encoded a = 2N3, Bearing of semi-major axis (degrees)*/
251 kal_uint8 unc_altitude; /* K3, encode r3, vertical uncertain */
252 kal_uint8 confidence; /* %, The confidence by which the position of a target
253 entity is known to be within the shape description,
254 expressed as a percentage. [0 ~ 100] (%)*/
255 gps_velocity_struct velocity; /*only support horizontal speed*/
256 kal_uint16 bearing; /*0-360 Direction of the horizontal speed*/
257} gps_gad_pos_estimate_struct;
258
259/* in position or measurement result */
260typedef struct
261{
262 kal_uint16 ref_time_ms_part;
263 kal_uint32 ref_time_ls_part;
264
265 kal_uint16 uarfcn;
266 kal_uint16 phyCellId; // Must valid value
267 kal_uint16 sfn;
268
269 kal_bool ref_time_uncertain_valid;
270 kal_uint8 ref_time_uncertain;
271} utran_gps_ref_time_result_struct;
272
273
274typedef struct
275{
276 kal_uint16 ref_frame; /* If refFrame is within (42432..65535), it shall be ignored by the receiver */
277 kal_uint16 week; /*gps week*/
278 kal_uint32 tow; /*msec*/
279 /* GPS TOW [0 ~ 14399999] (msec) for which the location
280 estimate is valid, rounded down to the nearest
281 millisecond unit. RRLP Location Information element
282 only contains the 24 LSBs of GPS TOW. */
283 kal_uint8 fix_type; /* position fix type performed by the GPS receiver:
284 '0' = 2D fix '1' = 3D fix*/
285 gps_gad_pos_estimate_struct pos_estimate;
286} gps_pos_result_struct;
287
288
289typedef struct
290{
291 kal_uint8 sat_id; /*The particular satellite for which the measurement data is valid. [1 ~ 32]*/
292 kal_uint8 carrier_noise; /*The estimate of the carrier-to-noise ratio of the received signal from the particular satellite used in the measurement. [0 ~ 63] (dB-Hz)*/
293 kal_uint16 doppler; /*0.2 Hz The Doppler measured by the MS for the particular satellite signal. [-32768 ~ 32767]*/
294 kal_uint16 whole_chips; /*chips The whole value of the code-phase measurement made by the GPS receiver for the particular satellite signal at the time of measurement. [0 ~ 1022] (chips)*/
295 kal_uint16 fractional_chips; /*2^-10 chips The fractional value of the code-phase measurement made by the GPS receiver for the particular satellite signal at the time of measurement. (2^-10 C/A chips) [0 ~ 1023]*/
296 kal_uint8 multipath; /*The multipath Indicator value. Possible values are listed below:
297 '0' = Not measured
298 '1' = Low, MP error < 5m
299 '2' = Medium, 5m < MP error < 43m
300 '3' = High, MP error > 43m*/
301 kal_uint8 pseudorang_m; /*Pseudorange RMS Error Mantissa*/
302 kal_uint8 pseudorang_e; /*Pseudorange RMS Error Exponent*/
303} gps_meas_para_struct;
304
305
306
307typedef struct
308{
309 kal_uint16 ref_frame; /* If refFrame is within (42432..65535), it shall be ignored by the receiver */
310 kal_uint32 tow;
311 /*GPS TOW [0 ~ 14399999] (msec) for which the location estimate is valid, rounded down to the nearest millisecond unit.
312 RRLP GPS Measurement Information element only contains the 24 LSBs of GPS TOW.*/
313 kal_uint8 sate_num;/*The number of GPS measurements for which measurement satellites are provided at the time of measurement*/
314 gps_meas_para_struct meas_param[GPS_ASSIST_DATA_N_SATE_MEAS];
315} gps_meas_result_struct;
316
317
318typedef struct
319{
320 kal_uint8 sv; /* sat id, 6 bits */
321 kal_uint32 wn; /* 10 bits, set to 0 */
322 kal_uint8 c_a; /*2 bits*/
323 kal_uint8 ura; /*4 bits*/
324 kal_uint8 sv_health; /*6 bits*/
325 kal_uint16 iodc; /*10 bits*/
326 kal_uint8 l2p; /* 1 bits */
327 kal_uint32 sf1_23msb; /* 23/87 bits, MSB */
328 kal_uint32 sf1_24mb1; /* 24/87 bits */
329 kal_uint32 sf1_24mb2; /* 24/87 bits */
330 kal_uint16 sf1_16lsb; /* 16/87 bits, LSB */
331 kal_int8 tgd; /* 8 bits */
332 kal_uint16 toc; /*16 bits*/
333 kal_int8 af2; /* 8 bits */
334 kal_int16 af1; /* 16 bits */
335 kal_int32 af0; /* 22 bits */
336 kal_uint8 iode; /* 8 bits, set to iodc 8bit lsb */
337 kal_int16 crs; /* 16 bits */
338 kal_int16 delta_n; /* 16 bits */
339 kal_int32 m0; /* 32 bits */
340 kal_int16 cuc; /* 16 bits */
341 kal_uint32 e; /*32 bits*/
342 kal_int16 cus; /* 16 bits */
343 kal_uint32 sqrt_a; /*32 bits*/
344 kal_uint16 toe; /*16 bits*/
345 kal_uint8 fit; /* 1 bits */
346 kal_uint8 aodo; /*5 bits*/
347 kal_int16 cic; /* 16 bits */
348 kal_int32 omega0; /* 32 bits */
349 kal_int16 cis; /* 16 bits */
350 kal_int32 i0; /* 32 bits */
351 kal_int16 crc; /* 16 bits */
352 kal_int32 w; /* 32 bits */
353 kal_int32 omega_dot; /* 24 bits */
354 kal_int16 idot; /* 14 bits */
355} gps_assist_navigation_model_single_struct;
356/*ephemeris in GPS chip AGPS_P710*/
357
358
359typedef struct
360{
361 kal_uint8 n_sat;
362 gps_assist_navigation_model_single_struct
363 navigation_data[GPS_ASSIST_DATA_N_SATE_NAVIGATION_MODEL];
364} gps_assist_navigation_model_struct;
365/*ephemeris in GPS chip AGPS_P710*/
366
367
368typedef struct
369{
370 kal_uint8 data_id; /*2 bits set to 01*/
371 kal_uint8 sat_id; /*6 bits*/
372 kal_uint16 e; /*16 bits*/
373 kal_uint8 toa; /*8 bits*/
374 kal_int16 delta_i; /*16 bits*/
375 kal_int16 omega_dot; /*16 bits*/
376 kal_uint8 sv_health; /*8 bits*/
377 kal_uint32 sqrt_a; /*24 bits*/
378 kal_int32 omega0; /*24 bits*/
379 kal_int32 w; /*24 bits*/
380 kal_int32 m0; /*24 bits*/
381 kal_int16 af0; /*11 bits*/
382 kal_int16 af1; /*11 bits*/
383} gps_assist_almanac_single_struct;
384
385
386typedef struct
387{
388 kal_uint8 n_sat;
389 kal_uint8 week; /*Almanac reference GPS week number*/
390 gps_assist_almanac_single_struct almanac_data[GPS_ASSIST_DATA_N_SATE_ALMANAC];
391} gps_assist_almanac_struct;
392
393typedef struct
394{
395 kal_uint16 tlm_word; /*telemetry message[0-16383]*/
396 kal_uint8 sat_id; /*Sate PRN [1-32]*/
397 kal_uint8 anti_spoof; /*anti spoof flag[0,1]*/
398 kal_uint8 alert; /*alert flag*/
399 kal_uint8 tlm_rsvd_bits; /*2 bit reserved bits[0-3]*/
400
401} gps_assist_tow_assist_struct;
402
403//In "ref time" or "aquisition assitance"
404typedef struct
405{
406 kal_uint16 ref_time_ms_part;
407 kal_uint32 ref_time_ls_part;
408
409 kal_uint16 uarfcn;
410 kal_uint16 phyCellId; // Must valid value
411 kal_uint16 sfn;
412
413 uagps_cp_sfn_tow_uncertainty_type sfn_tow_uncentainty_type;
414 /* if type is UAGPS_CP_SFN_TOW_UNCERTAINTY_10MS_THRESHOLD, 0 for UAGPS_CP_SFN_TOW_UNCERTAINTY_LESS_THAN_10, 1 for UAGPS_CP_SFN_TOW_UNCERTAINTY_MORE_THAN_10,
415 if type is UAGPS_CP_SFN_TOW_UNCERTAINTY_MICROSECOND, unit is microsecond,
416 else don't care this field */
417 kal_uint32 sfn_tow_Uncertainty;
418
419 kal_bool utran_gps_driftrate_valid;
420 uagps_cp_utran_gps_driftrate utran_gps_driftrate;
421
422} utran_gps_ref_time_struct;
423
424
425typedef struct
426{
427 kal_uint16 bcch_carrier; /* BCCH Carrier of 2G serving cell: 0~1023 */
428 kal_uint8 bsic; /* BSIC of 2G serving cell: 0~63 */
429 kal_uint32 FNm; /* FNm (frame number with MSB is truncated): 0~(2^21-1) */
430 kal_uint8 tn; /* TN (timeslot number): 0~7 */
431 kal_uint8 bn; /* BN (bit number): 0~156 */
432} gsm_gps_ref_time_struct;
433
434
435typedef struct
436{
437 kal_uint16 week; /*GPS week number spec not said range*/
438 kal_uint32 tow; /*unit0.08 GPS time of week of the transmission of the $ character at the start of the message [0 ~ 604800]*/
439 kal_uint16 tow_rms; /*set to 3000*/
440 kal_uint16 fs_tow; /*set to 0*/
441 kal_uint16 fs_rms; /*set to 0*/
442 kal_uint8 n_sat; /*number of tow assist sates*/
443 gps_assist_tow_assist_struct tow_assist[GPS_ASSIST_DATA_N_SATE_TOW_ASSIST];
444
445 /* 2G Timing Sync. Info */
446 kal_bool gsm_gps_ref_time_valid;
447 gsm_gps_ref_time_struct gsm_gps_ref_time;
448
449 /* 3G Timing Sync. Info */
450 kal_bool utran_gps_ref_time_valid;
451 utran_gps_ref_time_struct utran_gps_ref_time;
452
453} gps_assist_ref_time_struct;
454
455
456typedef struct
457{
458 kal_bool sign_latitude; /* true: SOUTH, false: NORTH */
459 kal_uint32 latitude; /* N1, encoded latitude */
460 kal_uint32 longitude; /* N2, encoded longtitude with 2's complement */
461 kal_bool sign_altitude; /* true: DEPTH, false: HEIGHT */
462 kal_uint16 altitude; /* no encoding, unit in meter */
463 kal_uint16 unc_smaj; /* in m */
464 kal_uint16 unc_smin; /* in m */
465 kal_uint16 bearing; /* in degree */
466 kal_uint16 unc_vert; /* in m, uncertain altitue */
467 kal_uint8 confidence; /* 0 to 100, in % */
468} gps_assist_ref_location_struct;
469
470
471typedef struct
472{
473 kal_int8 a0; /*Alpha0 (x 2^-30 seconds)*/
474 kal_int8 a1; /*Alpha1 (x 2^-27 seconds per semicircle)*/
475 kal_int8 a2; /*Alpha2 (x 2^-24 seconds per semicircle ^2)*/
476 kal_int8 a3; /*Alpha3 (x 2^-24 seconds per semicircle ^3)*/
477 kal_int8 b0; /*Beta0 (x 2 ^ 11 seconds)*/
478 kal_int8 b1; /*Beta1 (x 2 ^ 14 seconds per semicircle)*/
479 kal_int8 b2; /*Beta2 (x 2 ^ 16 seconds per semicircle ^2)*/
480 kal_int8 b3; /*Beta3 (x 2 ^ 16 seconds per semicircle ^3)*/
481} gps_assist_ionosphere_struct;
482
483
484typedef struct
485{
486 kal_int32 a1;
487 kal_int32 a0;
488 kal_uint8 tot;
489 kal_uint8 wnt;
490 kal_int8 delta_ls;
491 kal_uint8 wnlsf;
492 kal_int8 dn;
493 kal_int8 delta_lsf;
494} gps_assist_utc_struct;
495
496
497typedef struct
498{
499 kal_uint8 number_bad;
500 kal_uint8 bad_svid[GPS_ASSIST_DATA_N_SATE_RTI]; /* 6 bits for each sat */
501} gps_assist_real_time_integrity_struct;
502
503
504typedef struct
505{
506 kal_uint8 sv_id; /*Satellite PRN number [1~32]*/
507 kal_int16 dopp0; /*unit 2.5Hz, 0th order term of satellite Doppler [-2048 ~ 2047]*/
508 kal_int8 dopp1; /*unit 1/42Hz, 1th order term of satellite Doppler [-42.0 ~ 21]*/
509 kal_uint8 dopp_sr; /*Doppler search range [2^-n * (200) Hz, n = 0 - 4]*/
510 kal_uint16 code_p; /*GPS satellite code chips [0 ~ 1022] (chip)*/
511 kal_uint8 int_code; /*Integer code phase [0 ~ 19]*/
512 kal_uint8 bit; /*GPS bit number [0 ~ 3]*/
513 kal_uint8 code_sr; /*Code phase search window [GPS task will lookup table covert to 1 ~ 512]*/
514 kal_uint8 azimuth; /*unit 11.25 deg,Satellite azimuth angle [0 ~ 31]*/
515 kal_uint8 elevation; /*unit 11.25 deg, Satellite elevation angle [0 ~ 7]*/
516} gps_assist_acquisition_single_struct;
517
518typedef struct
519{
520 kal_uint8 n_sat; /* 4 bits */
521 kal_uint32 tow; /*unit 0.08sec, GPS time of week [0 ~ 7559999] 23bits*/
522 gps_assist_acquisition_single_struct sate_data[GPS_ASSIST_DATA_N_SATE_ACQUISITION];
523
524 /* 2G Timing Sync. Info */
525 kal_bool gsm_gps_ref_time_valid;
526 gsm_gps_ref_time_struct gsm_gps_ref_time;
527
528 /* 3G Timing Sync. Info */
529 kal_bool utran_gps_ref_time_valid;
530 utran_gps_ref_time_struct utran_gps_ref_time;
531} gps_assist_acquisition_struct;
532
533
534typedef struct
535{
536 kal_uint8 sat_id; /*Satellite PRN for which the corrections are applicable [1 ~ 32]*/
537 kal_uint8 iode; /*The sequence number [0 ~ 255] for the sphemeris for the particular satellite.*/
538 kal_uint8 udre; /*Provides an estimate [0 ~ 3] of the uncertainty (1-sigma) in the corrections for the particular satellite.*/
539 kal_int16 prc; /*Unit 0.32m, The correction [+/-2047] to the pseudorange for the particular satellite at the GPS Reference Time.*/
540 kal_int8 rrc; /*Unit 0.032m, The rate of change of the pseudorange correction [+/- 127] for the particular satellite.*/
541} gps_assist_dgps_sate_data_struct;
542
543typedef struct
544{
545 kal_uint32 tow; /*Unit sec, GPS TOW [0 ~ 604799] indicates the baseline time for which the corrections are valid*/
546 kal_uint8 status; /*This field indicates the status [0 ~ 7] of the differential corrections contained in the broadcast message. The "UDRE Factor" value is applied to the UDRE values contained in the message.*/
547 kal_uint8 n_sat; /*The number of satellites for which differential corrections are available. Corrections for up to 11 satellites.*/
548 gps_assist_dgps_sate_data_struct sat_data[GPS_ASSIST_DATA_N_SATE_DGPS];
549} gps_assist_dgps_correction_struct;
550
551typedef struct
552{
553 kal_uint16 ref_bcch_carrier; /* ARFCN of current serving cell */
554 kal_uint8 ref_bsic; /* BSIC of current serving cell */
555} gps_gsm_loc_info_struct;
556
557typedef struct
558{
559 kal_bool ref_frame_msb_valid;
560 kal_uint8 ref_frame_msb;
561 kal_bool tow_subms_valid;
562 kal_uint16 tow_subms;
563 kal_bool delta_tow_valid;
564 kal_uint8 delta_tow;
565 kal_bool ref_time_unc_valid;
566 kal_uint8 ref_time_unc;
567} gsm_gps_ref_time_result_struct;
568
569
570typedef struct
571{
572 kal_uint16 w_n;
573 kal_uint16 toe;
574 kal_uint8 n_sat;
575 kal_uint8 limit;
576 kal_uint8 sat_id[GPS_ASSIST_DATA_SUB_ITEMS_FEILDS];
577 kal_uint16 iode[GPS_ASSIST_DATA_SUB_ITEMS_FEILDS];
578} gps_sat_related_data_struct;
579
580
581typedef struct
582{
583 LOCAL_PARA_HDR
584 kal_uint8 transaction_id;
585 kal_bool req_time_assist_meas;
586 kal_bool environment_valid;
587 kal_uint8 environment;
588 gps_pos_qop_struct qop;
589 lcs_sim_source_enum sim_source; /* for Gemini SIM1/SIM2 */
590 /**
591 * Doug 20130326
592 * CP Auto Reset refine for OTA TIS 3G:
593 * if network does not sent RESET msg, periodicalReporting with reportingAmount is ra1
594 * autoResetTrigger is set to TRUE, and inform GPS task within POS(MEAS)_GAD_REQ.
595 */
596 kal_bool autoResetTrigger;
597} gps_pos_gad_req_struct;
598
599
600typedef struct
601{
602 LOCAL_PARA_HDR
603 kal_uint8 transaction_id;
604 gps_error_code_enum error_code;
605 kal_bool bitmap_valid;
606 kal_uint16 bitmap;
607 gps_sat_related_data_struct sat_data;
608 gps_pos_result_struct pos_result;
609
610 kal_bool gsm_loc_info_valid;
611 gps_gsm_loc_info_struct gsm_loc_info; /* for 2G ref. time timing sync. to indicate the serving cell */
612
613 kal_bool gsm_gps_ref_time_result_valid;
614 gsm_gps_ref_time_result_struct gsm_gps_ref_time_result;
615
616 kal_bool utran_gps_ref_time_result_valid;
617 utran_gps_ref_time_result_struct utran_gps_ref_time_result;
618} gps_pos_gad_cnf_struct;
619
620
621typedef struct
622{
623 LOCAL_PARA_HDR
624 kal_uint8 transaction_id;
625 kal_bool req_time_assist_meas;
626 kal_bool environment_valid;
627 kal_uint8 environment;
628 gps_meas_qop_struct qop;
629 lcs_sim_source_enum sim_source; /* for Gemini SIM1/SIM2 */
630 /**
631 * Doug 20130326
632 * CP Auto Reset refine for OTA TIS 3G:
633 * if network does not sent RESET msg, periodicalReporting with reportingAmount is ra1
634 * autoResetTrigger is set to TRUE, and inform GPS task within POS(MEAS)_GAD_REQ.
635 */
636 kal_bool autoResetTrigger;
637} gps_lcsp_meas_gad_req_struct;
638
639
640typedef struct
641{
642 LOCAL_PARA_HDR
643 kal_uint8 transaction_id;
644 gps_error_code_enum error_code;
645 kal_bool bitmap_valid;
646 kal_uint16 bitmap;
647 gps_sat_related_data_struct sat_data;
648 gps_meas_result_struct meas_result;
649
650 kal_bool gsm_loc_info_valid;
651 gps_gsm_loc_info_struct gsm_loc_info; /* for 2G ref. time timing sync. to indicate the serving cell */
652
653 kal_bool gsm_gps_ref_time_result_valid;
654 gsm_gps_ref_time_result_struct gsm_gps_ref_time_result;
655
656 kal_bool utran_gps_ref_time_result_valid;
657 utran_gps_ref_time_result_struct utran_gps_ref_time_result;
658} gps_lcsp_meas_gad_cnf_struct;
659
660typedef struct
661{
662 LOCAL_PARA_HDR
663 kal_uint8 transaction_id;
664} gps_lcsp_abort_req_struct;
665
666
667typedef struct
668{
669 LOCAL_PARA_HDR
670} gps_lcsp_agps_restart_ind_struct;
671
672
673typedef union {
674 gps_assist_navigation_model_struct navigation_model;
675 gps_assist_almanac_struct almanac;
676 gps_assist_ref_time_struct ref_time;
677 gps_assist_ref_location_struct ref_location;
678 gps_assist_ionosphere_struct ionosphere;
679 gps_assist_utc_struct utc;
680 gps_assist_dgps_correction_struct dgps;
681 gps_assist_acquisition_struct acquisition;
682 gps_assist_real_time_integrity_struct rti;
683} assist_data_union;
684
685typedef struct
686{
687 LOCAL_PARA_HDR
688 kal_uint8 transaction_id;
689 kal_bool req_time_assist_meas;
690 gps_assist_data_type_enum type;
691 assist_data_union assist_data;
692 kal_bool ref_time_uncertain_valid;
693 kal_uint32 ref_time_uncertain;
694 lcs_sim_source_enum sim_source; /* for Gemini SIM1/SIM2 */
695} gps_lcsp_assist_data_req_struct;
696
697
698typedef struct
699{
700 LOCAL_PARA_HDR
701 kal_uint8 transaction_id;
702 gps_assist_data_type_enum type;
703 gps_result_enum result;
704} gps_lcsp_assist_data_cnf_struct;
705#endif /*__AGPS_SUPPORT__*/
706#endif /*__GPS2LCSP_STRUCT_H__*/
707