×

INDI Library v1.7.8 Released (11 May 2019)

Mid year release of INDI Library v1.7.8 comes with a few drivers and improvements to to existing drivers.

How to make USB GPS receiver work for me

  • Posts: 22
  • Thank you received: 1

How to make USB GPS receiver work for me was created by SparkyHT

Is there a tutorial or guide of some type to help me setup my GlobalSat USB GPS receiver to set the time and location in EKOS/KSTARS? I've already made sure I have gpsd installed and can get LAT/LONG/TIME in Terminal using gpsmon, so I know the device works. In INDI I added GPSD under one of the AUX devices, but I can't seem to find where or how to grab the data coming off the receiver to make it useful upon connection. I have a portable setup and no internet so I am really trying to avoid having to manually set the time every time I go out to image.
1 year 7 months ago #20321

Please Log in or Create an account to join the conversation.

Replied by knro on topic How to make USB GPS receiver work for me

Once the INDI GPS driver is active (and has data), it will relay this information to KStars and INDI.

To have KStars accept this data. Go to Settings --> INDI --> and change Device Updates to "Device"
For your mount, just go to Options and set GPS to GPSD and then click save configuration. Now if you go to GPSD and click "Update", both the mount and KStars will be updated. Next time you connect, all of this will happen automatically for you.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: SparkyHT
1 year 7 months ago #20322

Please Log in or Create an account to join the conversation.

Replied by knro on topic How to make USB GPS receiver work for me

and actually, I just now made a change in KStars so that all the steps above are not required. Once GPS INDI driver is detected, it will perform all the above automatically. It should be available in the next KStars release shortly.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: SparkyHT
1 year 7 months ago #20323

Please Log in or Create an account to join the conversation.

Replied by knro on topic How to make USB GPS receiver work for me

Ok. There is just one thing I am not sure about regarding GPSD. Is there UTC offset reported by GPSD accounts for day light saving time (DST) or not?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: SparkyHT
1 year 7 months ago #20324

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 1

Replied by SparkyHT on topic How to make USB GPS receiver work for me

When time finally polled in gpsmon, the offset for my location was -5 UTC, which was correct. I'll have to try it out next time I set up. Thanks for your help.
1 year 7 months ago #20326

Please Log in or Create an account to join the conversation.

  • Posts: 632
  • Karma: 6
  • Thank you received: 244

Replied by Kaczorek on topic How to make USB GPS receiver work for me

knro wrote: There is just one thing I am not sure about regarding GPSD. Is there UTC offset reported by GPSD accounts for day light saving time (DST) or not?

Yes, it does. It's one of the recent fixes to the driver.
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
The following user(s) said Thank You: knro
1 year 7 months ago #20327

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 1

Replied by SparkyHT on topic How to make USB GPS receiver work for me

Alright, finally got my setup inside and all hooked up. According to gpsmon, I have LAT/LONG and time. When connecting to GPSD in INDI, it appears the data stream from the receiver is not making it into EKOS/KSTARS: The status down at the bottom just says "GPS fix is in progress..." The fields for TIME and UTC offset are only populated because I have the RPi3 on my home network.
Last edit: 1 year 7 months ago by SparkyHT.
1 year 7 months ago #20332
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 1

Replied by SparkyHT on topic How to make USB GPS receiver work for me

OK so I apparently answered my own question. In order to get data to GPSD, I had to edit /etc/default/gpsd and set DEVICES="/dev/GPS" and reboot. After that, I got GPS and TIME data in the appropriate fields in EKOS. "GPS" is the name I gave my receiver in the serial port manager, its hardware address is ttyUSB2. The DEVICES field was originally blank, hence GPSD did not know where to look for a data stream.

Is there a way to automate this for future Stellarmate users, so they don't have to bang their heads on a keyboard for hours on end? I would imagine a lot of imagers who don't have an observatory to call home would like to use a GPS receiver to sync up to and have it be not so freakin' difficult. I had to leave this forum to find an answer that made it finally click for me, there is no guide on how to do this here. A novice wouldn't even realize they can't just go into the gpsd file outright and edit it. It ain't like Windows where any file can be edited anywhere. I had to gksudo Pluma to make the file writable. Luckily I know enough about Linux to get myself into trouble, which is both a good and bad thing ;)
Last edit: 1 year 7 months ago by SparkyHT.
1 year 7 months ago #20333

Please Log in or Create an account to join the conversation.

Replied by knro on topic How to make USB GPS receiver work for me

Good you're finding your way around in Linux!
I used U-Plux AG which I got from HardKernel and I never had to edit any files to get it working with StellarMate.

@Kaczorek, is there any editing necessary? or does it depends on the GPS device?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 7 months ago #20336

Please Log in or Create an account to join the conversation.

  • Posts: 632
  • Karma: 6
  • Thank you received: 244

Replied by Kaczorek on topic How to make USB GPS receiver work for me

Editing is necessary. It does not depend on a gps device as far as it is serial USB device.

GPSD driver relies on gpsd service running in the operating system you connect your gps receiver to. It was designed this way to use standard interface existing in linux system which enables sharing gps signal among various applications (not locking serial gps device by just INDI driver). This means that before using GPSD driver you need to have gpsd device configured correctly. It does work out of box in many cases, but not always.

gpsd service needs to know what serial device to use as a source for gps signal. So you must configure it in /etc/default/gpsd file by setting DEVICES="/dev/YOUR_GPS_SERIAL_DEV". The problem is that in our setups we use many serial devices over USB (mount, focuser, gps, other...) and each of them is represented by a device node i.e. /dev/ttyUSBx. Connecting these devices in different order may result in gps device is assigned different device node. To fix this you can assign unique name to your device in serial port manager (GUI) or in udev rules (terminal).

Now, how can we improve user experience? By removing driver's dependence on gpsd service and rewriting the driver to read gps data stream directly from a device. We could use connections plugin framework instead to search for gps device. However this approach is not the best practice for accessing gps device in linux systems and locks gps device for any other application that needs to use it (e.g. ntp server for syncing operating system time based on gps NMEA and PPS). So I would recommend to leave it as it is.

Just remember to set DEVICES="/dev/YOUR_GPS_SERIAL_DEV" in /etc/default/gpsd file and restart gpsd service before using INDI GPSD device driver
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
The following user(s) said Thank You: SparkyHT
Last edit: 1 year 7 months ago by Kaczorek.
1 year 7 months ago #20340

Please Log in or Create an account to join the conversation.

Replied by knro on topic How to make USB GPS receiver work for me

Serial Port Assistant Tool in StellarMate now works with the GPS too:

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: Kaczorek, SparkyHT
Last edit: 1 year 7 months ago by knro.
1 year 7 months ago #20346

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 1

Replied by SparkyHT on topic How to make USB GPS receiver work for me

I understand if automating such a thing is not an easy thing to do. I guess consider this thread a lesson on what to do if one has a USB GPS receiver and wants to have it reliably pass data into INDI/EKOS. The Stellarmate Serial Assistant was helpful in making the connection repeatable after reboot.
The following user(s) said Thank You: knro
Last edit: 1 year 7 months ago by SparkyHT.
1 year 7 months ago #20351

Please Log in or Create an account to join the conversation.

Time to create page: 0.274 seconds