×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

How to make USB GPS receiver work for me

  • Posts: 22
  • Thank you received: 1
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.
6 years 5 months ago #20321

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

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.
The following user(s) said Thank You: Chad Andrist
6 years 5 months ago #20322

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

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.
The following user(s) said Thank You: Chad Andrist
6 years 5 months ago #20323

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

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?
The following user(s) said Thank You: Chad Andrist
6 years 5 months ago #20324

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

  • Posts: 22
  • Thank you received: 1
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.
6 years 5 months ago #20326

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

  • Posts: 983
  • Thank you received: 375
Yes, it does. It's one of the recent fixes to the driver.
The following user(s) said Thank You: Jasem Mutlaq
6 years 5 months ago #20327

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

  • Posts: 22
  • Thank you received: 1
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: 6 years 5 months ago by Chad Andrist.
6 years 5 months ago #20332
Attachments:

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

  • Posts: 22
  • Thank you received: 1
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: 6 years 5 months ago by Chad Andrist.
6 years 5 months ago #20333

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

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?
6 years 5 months ago #20336

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

  • Posts: 983
  • Thank you received: 375
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
The following user(s) said Thank You: Chad Andrist
Last edit: 6 years 5 months ago by Radek Kaczorek.
6 years 5 months ago #20340

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

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

The following user(s) said Thank You: Radek Kaczorek, Chad Andrist
Last edit: 6 years 5 months ago by Jasem Mutlaq.
6 years 5 months ago #20346

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

  • Posts: 22
  • Thank you received: 1
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: Jasem Mutlaq
Last edit: 6 years 5 months ago by Chad Andrist.
6 years 5 months ago #20351

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

Time to create page: 0.196 seconds