How do I use the GPS on Linux?

700 views
Skip to first unread message

M.Yamada

unread,
Oct 5, 2015, 9:55:25 PM10/5/15
to Chromium-dev
I need your help.

I am running the Chromium on the ARM CPU-board computer.
It's OS is Linux.

The board computer have a GPS Receiver of USB-Serial I/F.
The receiver outputs data in NMEA 0183 format .

Applications of the Linux can get its data via USB-Sriral Driver.

I want to get the location information by using the geolocation API on Chromium by the GPS receiver.

In order to do so, I need the chromium and the driver of GPS receiver to work together.
I do not know how.

Will I need special libraries and chromium command switches?

Michael van Ouwerkerk

unread,
Oct 6, 2015, 5:19:34 AM10/6/15
to yama...@gmail.com, Chromium-dev
That's not currently implemented on Linux, we just rely on wifi access point scanning, and use the ip address as a fallback signal. See NetworkLocationProvider for more details.

/m


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

M.Yamada

unread,
Oct 6, 2015, 8:18:59 PM10/6/15
to Chromium-dev, yama...@gmail.com
Michael, Thank you for your reply.

Can Chromium for Linux not use the GPS yet?
It's very disappointing.

Do you know the implementation plan?
It probably undecided......

Thank you.

Lei Zhang

unread,
Oct 6, 2015, 8:37:24 PM10/6/15
to 山田雅昭, Chromium-dev

Michael van Ouwerkerk

unread,
Oct 7, 2015, 6:23:11 AM10/7/15
to the...@chromium.org, 山田雅昭, Chromium-dev
Yes there were some experimental attempts at supporting GPS location on Linux, but this was removed due to lack of support and usefulness. By far, most Linux systems just don't have any GPS hardware, or move around enough outdoors to yield added accuracy beyond what we get from the NetworkLocationProvider.

/m


M.Yamada

unread,
Oct 8, 2015, 12:13:25 AM10/8/15
to Chromium-dev, the...@chromium.org, yama...@gmail.com
Hi, Michael.

Thank you for your reply.

I don't know NetworkLocationProvider.
What is NetworkLocationProvider?

Is NetworkLocationProvider the object that can be retained from JavaScript?
Or is it a mechanism that navigator.geolocation object is used internally?

I am looking at the network_location_provider.cc of program source, Is this the NetworkLocationProvider?

If it's this, It seems like a mechanism that navigator.geolocation object uses internally to me.
And it looks like a mechanism that gets the location from WiFi. .

If so, I think it needs a mechanism to send some kind of position information from WiFi.
If you have any kind of document concerning this, I would appreciate it if you could share it with me.
I want to read and learn more about it.



Michael van Ouwerkerk

unread,
Oct 8, 2015, 11:32:06 AM10/8/15
to 山田雅昭, Chromium-dev, the...@chromium.org
Hi, the code is the best source of truth, but here's a partial class diagram:

So basically, this is all we have, there is no GPS hardware in use, except for Android. We use whatever the system provides on Android, which uses a mix of sensor signals, including GPS. We also have no plans to change this right now.

Regards,

Michael


M.Yamada

unread,
Oct 8, 2015, 9:07:17 PM10/8/15
to Chromium-dev, yama...@gmail.com, the...@chromium.org
Hi, Michael.

Thank you for your infomation.
It will be very helpful.

And I will try something.

Thank you very much.

Masaaki Yamada.

Nitin Patil

unread,
Oct 10, 2015, 12:00:04 AM10/10/15
to Chromium-dev
Hi M. Yamada,

Its very easy to interface a GPS with linux environment.
Without using any API you can get GPS coordinates by using a single command.

awk -F"," '/GGA/ {print $3,$5}' /dev/ttyAMA0

The above command gives you the 3rd and 5th argument of GPGGA, i.e., Latitude and longitude
You can change the arguments and get the appropriate value.

Hope it will help you.

M.Yamada

unread,
Oct 10, 2015, 6:54:37 AM10/10/15
to Chromium-dev
Hi Nitin Patil.

Thank you for your advice.

Your advice, it is how to get the GPS coordinates from the serial driver.
It's very simple. 

Your command can easily GPS test.
I try to GPS test in your command.

Thank you.
Reply all
Reply to author
Forward
0 new messages