×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Question Network based location in Python?

    Hi happy Python friends,

    Does positioning module support network based location?

    http://www.forum.nokia.com/main/reso...hnologies.html

    "These messages let the device owner decide if a network-resident LBS application, such as a weather service, may use the device’s location to provide the service requested by the device owner."

    The benefits of this is that the location information is always available (even inside) when GPS satellite signal is missing. Also, looks like GPS receiver eats battery fast, so keeping GPS on is not a good idea?

    Google Maps 2.0 uses network based location. It's not Python app, however.

    We made some preliminary tests and looks like positioning.position() gives only assisted GPS signal i.e. you cannot ask direct network based location, but it helps to boostrap your GPS satellite signal. We might be using API wrong way.

    If someone could point some examples, I'd be grateful!

    Cheers,
    Mikko
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

  2. #2
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: Network based location in Python?

    You can get the Cell ID with

    Code:
    import location
    print location.gsm_location()
    After that you need to find out where the base station is located, though... The ID does not tell you that...

    Hartti

  3. #3
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: Network based location in Python?

    Quote Originally Posted by hartti View Post
    You can get the Cell ID with

    After that you need to find out where the base station is located, though... The ID does not tell you that...

    Hartti
    The point is that Series 60 3.0 FP1 devices do this cell id <-> location matching internally. You don't need to write your custom code for it.

    Check Settings -> Positioning. You can define access point and server which is used for the cell location data fetching (my guess).
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

  4. #4
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Finland
    Posts
    209

    Re: Network based location in Python?

    Quote Originally Posted by miohtama View Post
    Does positioning module support network based location?
    Yes it should as the Python extension "positioning" is agnostic to the location provider. It offers what ever means for obtaining location fix is available by using the "Location Acquisition API". In the following, "Verkkoperustainen" should be the network based location option:

    Code:
    >>> import positioning
    >>> positioning.modules()
    [{'available': 0, 'id': 270526873, 'name': u'Bluetooth GPS'}, {'available': 1, '
    id': 270526860, 'name': u'Avustettu GPS'}, {'available': 1, 'id': 270526858, 'na
    me': u'Sis\xe4inen GPS'}, {'available': 1, 'id': 270559509, 'name': u'Verkkoperu
    stainen'}]
    >>> positioning.module_info(270559509)
    {'available': 1, 'status': {'data_quality': 0, 'device_status': 3}, 'version': u
    '10.00(0)', 'name': u'Verkkoperustainen', 'position_quality': {'vertical_accurac
    y': 200.0, 'time_to_first_fix': 12000000L, 'cost': 2, 'time_to_next_fix': 120000
    00L, 'horizontal_accuracy': 200.0, 'power_consumption': 2}, 'technology': 2, 'id
    ': 270559509, 'capabilities': 1, 'location': 1}
    >>> positioning.module_info(270526860)
    {'available': 1, 'status': {'data_quality': 0, 'device_status': 3}, 'version': u
    '1.00(0)', 'name': u'Avustettu GPS', 'position_quality': {'vertical_accuracy': 1
    0.0, 'time_to_first_fix': 1000000L, 'cost': 2, 'time_to_next_fix': 1000000L, 'ho
    rizontal_accuracy': 10.0, 'power_consumption': 3}, 'technology': 4, 'id': 270526
    860, 'capabilities': 127, 'location': 1}
    >>>
    (Above example in English in the PyS60 API documentation, under "positioning")

    Quote Originally Posted by miohtama View Post
    http://www.forum.nokia.com/main/reso...hnologies.html

    "These messages let the device owner decide if a network-resident LBS application, such as a weather service, may use the device’s location to provide the service requested by the device owner."
    To my understanding this sentence has nothing to do with the PyS60 "positioning" extension.

    Quote Originally Posted by miohtama View Post
    Also, looks like GPS receiver eats battery fast, so keeping GPS on is not a good idea?
    Have you tried adding a longer interval between the location fix invocation ("POSITION INTERVAL")?

    Hope this helps.

  5. #5
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: Network based location in Python?

    Quote Originally Posted by otsov View Post
    Yes it should as the Python extension "positioning" is agnostic to the location provider. It offers ...
    Hope this helps.
    Thanks otsov!

    Looks like I was bugged by this bug (select_module crashing Python):

    http://sourceforge.net/tracker/index...55&atid=790646
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

Similar Threads

  1. Please help installing Python libraries on S60
    By ericroijen in forum Symbian
    Replies: 11
    Last Post: 2009-07-18, 10:43
  2. Developing a location based application
    By avi1000 in forum General Development Questions
    Replies: 3
    Last Post: 2007-08-15, 12:17
  3. getting country - location based service
    By funworld_0815 in forum Mobile Java General
    Replies: 4
    Last Post: 2003-08-18, 00:25

Posting Permissions

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