×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    8

    Question Problem: NonSatellitePositioningMethods with TOO LARGE updateIntervalls

    Hi,
    I would like to use NonSattelitePositioningMethods to provide the alternative geo positioning indoor. I made an simple application just with a usage of NonSattelitePositioningMethods, to test the accuracy and first set updateInterval to 10 sek. BUT the updateInterval while testing is too large! I got no timeouts, everything working well but the updatetimes are not wokring as expected!
    I use use QT 4.6.3 and QTMobility 1.0.2. Here are some Parts of my code:

    Code:
    //initial infosource call once in the beginning
    void LocationManager::initCell(){
         sourceCell = QGeoPositionInfoSource::createDefaultSource(this);
                if (sourceCell) {
                        sourceCell->setPreferredPositioningMethods(QGeoPositionInfoSource::NonSatellitePositioningMethods);
                        sourceCell->setUpdateInterval(10000);
                        startcell();
                }
    } 
    //enable cellpositioning when needed
    void LocationManager::startcell(){
        if(!sourceCell){
            initCell();
            connect(sourceCell, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
            connect(sourceCell, SIGNAL(updateTimeout()), SLOT(onPositionTimeoutCELL()));
            sourceCell->startUpdates();
        }else{
            connect(sourceCell, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
            connect(sourceCell, SIGNAL(updateTimeout()), SLOT(onPositionTimeoutCELL()));
            sourceCell->startUpdates();
        }
    }
    
    //disable cell if needed....
    void LocationManager::cellOff(){
        sourceCell->stopUpdates();
        disconnect(sourceCell, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
        disconnect(sourceCell, SIGNAL(updateTimeout()),this, SLOT(onPositionTimeout()));
    }
    
    //timeout
    void LocationManager::onPositionTimeoutCELL(){
       
    qDebug()<<"cellupdate timeout";
        if(sourceCell){
            cellOff();
        }
      ....
    }
    //my positionupdate slot:
    void LocationManager::positionUpdated(const QGeoPositionInfo &info) {
        if (info.isValid())
           {
               QGeoCoordinate geoCoordinate = info.coordinate();
               latGPS = geoCoordinate.latitude();
               longGPS = geoCoordinate.longitude();
               altGPS = geoCoordinate.altitude();
               accGPS = info.attribute(info.HorizontalAccuracy);
               timeGPS = info.timestamp().toLocalTime().toString();
    
               qDebug()<<"timeGPS:"+timeGPS;
    
           } 
    }
    Here is the output of that time when positionUpdated(const QGeoPositionInfo &info) slot is called (in format:hh:mm:ss). First you see the approx. device time, and as second "timeGPS" from positionUpdated slot :
    Code:
    ...
    QDateTime::currentDateTime():  15:54:49     timeGPS: 13:54:44  
    QDateTime::currentDateTime():  15:57:49     timeGPS: 13:54:44
    QDateTime::currentDateTime():  16:00:49     timeGPS: 14:00:45
    QDateTime::currentDateTime():  16:03:49     timeGPS: 14:00:45
    QDateTime::currentDateTime():  16:06:49     timeGPS: 14:06:45
    QDateTime::currentDateTime():  16:09:49     timeGPS: 14:06:45
    .......
    SO from this output a can see i have updateintervals every 3 minutes on my device, so every 3 minutes positionUpdated is emited, but the timestamp of infosource shows that in reality coordinates are updated just every 6 minutes, and i would think if the coordinates are really still same, its not so bad. But its anyway too LONG!

    I just would like to understand where coming this 3 and 6 minutes from?
    And Why my setting of setupdateInterval of 10 sek(10000ms) are not working at all?
    I just cant find any explanation on my own, so i need help.

    Thank you in advance!
    Last edited by Summer_time; 2013-05-17 at 12:34.

Similar Threads

  1. XML large attributes CParser problem
    By mstrug in forum Symbian
    Replies: 4
    Last Post: 2013-01-29, 01:25
  2. QGeoPositionInfoSource::NonSatellitePositioningMethods blocks app
    By catharsis in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2012-05-16, 15:35
  3. How to accommodate large large text data in CAknListQueryDialog?
    By slinx in forum Symbian User Interface
    Replies: 1
    Last Post: 2012-01-25, 05:18
  4. large UDP(>MTU) sending problem
    By stenlik in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-07-19, 13:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •