Include GPS/NMEA support for location

Bug #1448673 reported by Caysho on 2015-04-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

This is a feature request.

I see there is support to get the location from the network.
It would be nice to expand this to include GPS data.

As an example, I can install BlueNMEA on my Android phone and have it send NMEA data via bluetooth or via TCP.
On linux, this can be read by gpsd and displayed nicely with cgps

This would be useful in a remote location where there is only GPS available.
Linux can be configured to get the time via GPS (refer )

To get the time from GPS on Windows, it seems the solutions are expensive (assuming they work), so further configuration would be needed (maybe running a Raspberry Pi with both an NTP server and NMEA feed ?)

Related branches

Changed in stellarium:
importance: Undecided → Wishlist
gzotti (georg-zotti) wrote :

Sure! Working patch welcome ;-)

gzotti (georg-zotti) on 2017-03-22
Changed in stellarium:
assignee: nobody → gzotti (georg-zotti)
status: New → In Progress
milestone: none → 1.0.0
gzotti (georg-zotti) wrote :

To Caysho: Can you elaborate (for the Guide) on how to get this Bluetooth thingy to work? I could get my hands on a GPS mouse for a week or two and have it working now with GPSD on Linux/Mac(?) and NMEA queries to (virtual) COM ports on Windows. Having GPS via smartphone would be very handy outdoors.

Changed in stellarium:
milestone: 1.0.0 → 0.16.0
gzotti (georg-zotti) on 2017-03-26
Changed in stellarium:
status: In Progress → Fix Committed
Caysho (caysho) wrote :

How I have configured it:
On my phone (Android), I have installed BlueNMEA.

It uses port 4352.

I then run gpsd with the following commandline:

sudo gpsd -n -D8 -S 1001 tcp://

Explanation of why I am using these options:
 -n do not wait for data, just poll the device.
 -D8 maximum debug level.
 -S 1001 send the data to the localhost port 1001 (default is 2947 according to the gpsd documentation).
 - tcp:// this says to get the data from the phone via TCP/IP using the port that BlueNMEA publishes to on the phone.

Then point the GPS client at localhost:1001
For example:
cgps localhost:1001

I had problems with getting bluetooth to work, so I went with IP address instead.

Will stellarium get the time from the NMEA data as well, or will it rely on the time on the computer ?

gzotti (georg-zotti) wrote :


Thanks for these instructions. So this needs a WiFi connection in the field and only works for systems where gpsd is available. I hope I can get this to work. I also failed getting Bluetooth, but I am not used to Bluetooth (it never worked on my previous notebook, now I am used to not having it...) Maybe somebody can find this out...

No, I have no plans to retrieve time from GPS inside Stellarium. The advantage of using gpsd is that this should do the time and location control outside of Stellarium. You can set up chronyd or ntpd with GPSD as time source to have a proper system time (I just made a PPS-disciplined Raspberry Pi time server, this GPS work here is a spinoff of this work!).

gzotti (georg-zotti) wrote :

Hah, I just managed to install a virtual COM port in Windows which transmits BlueNMEA's data to Stellarium! :-)

Chris (cburford1) wrote :

It would really be nice if Stellarium could read NMEA sentences from a Windows virtual COM port. I have a ublox M8N module just waiting to team up with your app. Keep up the good work.

gzotti (georg-zotti) wrote :

Have you tried a current beta? My device works.

Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers