Firefox OS/Geolocation: Difference between revisions

m
API */
m (AGPS cleanup)
m (API */)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
=API=
=API=
Firefox OS geolocation API is the W3C Standard API at http://dev.w3.org/geo/api/spec-source.html
Firefox OS geolocation API is the W3C Standard API at http://dev.w3.org/geo/api/spec-source.html
As an Application Developer, you should be aware that certain SUPL service providers may have terms of use for their SUPL service - [https://wiki.mozilla.org/Firefox_OS/AGPS_service_provider_terms learn more]”
As an Application developer, you should ask the User permission before storing their location.


=Usage=
=Usage=
The underlying implementation can be different for different hardware providers. As a developer, you should be transparent to the underlying implementation, and write apps using the APIs which specifies whether you want enableHighAccuracy or not. eg: if you are writing a navigation app, which needs accuracy upto a few meters, then enableHighAccuracy=TRUE. If you are writing a weather app which just needs w coarse location, then your app can consume less power by enableHighAccuracy=FALSE.  
The underlying implementation of geolocation can be different per hardware provider. As an Application developer, you should be transparent to the underlying implementation. You should write apps using the APIs which specifies the accuracy requirement of your app. eg:
*A navigation app, which needs accuracy upto a few meters, then enableHighAccuracy=TRUE.  
*A weather app which just needs coarse location, then your app can consume less power by enableHighAccuracy=FALSE.
 
 
=Commercial Implementations=
=Commercial Implementations=
Mozilla does not produce Firefox OS images for commercial devices-- we provide source code to chip manufacturers and OEMs.  These parties customize various parts and create binary images for devices.  The final Firefox OS image is mostly representative of what we have in the public source repositories.  This is an important distinction because the configuration of some parts (like linux config, device setup, etc) is not in Mozilla's hands.
Mozilla does not produce Firefox OS images for commercial devices-- we provide source code to chip manufacturers and OEMs.  These parties customize various parts and create binary images for devices.  The final Firefox OS image is mostly representative of what we have in the public source repositories.  This is an important distinction because the configuration of some parts (like linux config, device setup, etc) is not in Mozilla's hands.
Line 11: Line 18:
==Details==
==Details==
The geolocation provider use a few different method to compute location based on the environment:
The geolocation provider use a few different method to compute location based on the environment:
1)Satellite - Uses GPS Receiver  to locate the device.
#Satellite - Uses GPS Receiver  to locate the device.
2)Network methods - Uses nearby WiFi Access points and Cell towers
#Network methods - Uses nearby WiFi Access points and Cell towers


These two methods complement each other to improve geolocation
These two methods complement each other to improve geolocation
Availability: GPS works well in open sky, where Network methods are not as accurate. Network methods work well in deep indoor, where GPS does not work well. Having both increases availability.  
Availability: GPS works well in open sky, where Network methods are not as accurate. Network methods work well in deep indoor, where GPS does not work well. Having both increases availability.  
Time To First Fix: GPS is accurate, and take some time, while Network is coarse and is faster. Network location can be used by GPS to opti
#Time To First Fix: GPS is accurate, and take some time, while Network is coarse and is faster. Network location can be used by GPS to opti


===AGPS===
===AGPS===
For the Satellite fixes, GPS is used. To shorten the searching for satellites, methods for assistance are used. Some of them are:
For the Satellite fixes, GPS is used. To shorten the time to search for satellites, methods for assistance are used. Some of them are:
1) SUPL: Standardized
# SUPL: Standardized
2) Proprietary Extended Ephemeris solutions: GPS HW providers implement optimizations.
# Proprietary Extended Ephemeris solutions: GPS HW providers implement optimizations.


So, to recap – Mozilla does not ship binaries.  Mozilla does not configure Modems.  If you are shipping devices, you must ensure that a-gps is configured properly with the HW provider.  Configuration of a-gps is completely outside of the scope of Firefox OS.
So, to recap – Mozilla does not ship binaries.  Mozilla does not configure Modems.  If you are shipping devices, you must ensure that a-gps is configured properly with the HW provider.  Configuration of a-gps is outside of the scope of Firefox OS.
canmove, Confirmed users
312

edits