Getting GPS fix every second | developer.brewmp.com Getting GPS fix every second | developer.brewmp.com

Developer

Getting GPS fix every second

Forums:

hi,

 

I need to get GPS fix for every seconds for tracking app.

I am following below procedure to get GPS fix. 

steps...

1) create instance for "pd_AEECLSID_CPosition".

2) create instance for "AEECLSID_SignalCBFactory".

3) call ISignalCBFactory_CreateSignal with gps_callback.

4) call  "pd_IPosition_OnPositionEvent"

5)  call back will be called, in side callback get gps fix and repeate step 2,3 and 4 for getting gps fix every second.

I was expecting to get a fix every second, however some times for 4 to 5 seconds gps fix was not getting i.e gps_callback is not getting called every seconds.

 

Is there way to get GPS fix every seconds?

 

fix criteria used are 

first time :

fixCriteria.validMask = (pd_FIX_CRIT_VALID_RECURRENCE_TYPE 

| pd_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE 

| pd_FIX_CRIT_VALID_PREFERRED_ACCURACY 

| pd_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME

| pd_FIX_CRIT_VALID_MIN_INTERVAL

| pd_FIX_CRIT_VALID_INTERMEDIATE_POS_REPORT_ENABLED);

fixCriteria.preferredAccuracy = 1;

fixCriteria.recurrenceType = pd_SINGLE_FIX;

fixCriteria.preferredResponseTime = 60000; //(60 * 1000 ms)

fixCriteria.preferredOperationMode = pd_OPER_MODE_MSA;

fixCriteria.minInterval = 1;

result = pd_IPosition_SetfixCriteria(gps_info->gps_handle, &fixCriteria) ;

 

next time on wards...

 

fixCriteria.validMask = (pd_FIX_CRIT_VALID_RECURRENCE_TYPE 

| pd_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE 

| pd_FIX_CRIT_VALID_PREFERRED_ACCURACY 

| pd_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME

| pd_FIX_CRIT_VALID_MIN_INTERVAL);

fixCriteria.preferredAccuracy = 1;

fixCriteria.recurrenceType = pd_SINGLE_FIX;

fixCriteria.preferredResponseTime = 1000; //(1 * 1000 ms)

fixCriteria.preferredOperationMode = pd_OPER_MODE_DEFAULT;

result = pd_IPosition_SetfixCriteria(gps_info->gps_handle, &fixCriteria) ;

result = pd_IPosition_RequestPosition(gps_info->gps_handle);

Plz help me on this...