Astrofriend's homepage

www.astrofriend.eu
Share: Twitter Reddit Facebook Gmail Gmail Email
Search Astrofriend's homepage:

Valid CSS!

All pages shall now have been validated

Info Cookies (Kakor) / GDPR

Navigation

Advertisement /
Annons:

Twitter @AstrofriendLars

Follow Astrofriend

Astro tutorial News

Advertisement / Annons:

Project:
HEQ5 as portable mount


Contents:

  1. Introduction
  2. EQDIRECT from D-sub to RJ45
  3. Power terminal of HEQ5 changed
  4. Installing the 300 mm lens on HEQ5
  5. Rewiring the electric cables
  6. Connecting the Raspberry
  7. Setup GPSD
  8. Setup GPS NMEA
  9. Power consumption
  10. To be continued

Note:
I take no responsibility or liability for what are written here, you use the information on your own risk!


7: Setup GPSD

As told earlier, correct time and observatory position is important to get star positioning working correct. When having the astro equipment as a portable unit you get new positions whenever you change your location. The time is not correct either because there is no battery backup clock in the Raspberry. When on a stationary place and have access to internet there is no need for a GPS unit, Astroberry will find correct time and position from internet.

There are two alternatives that I tested and setup, first GPSD driver.


GPSD:

I already have a GPS dongle and would like to use it for this purpose. Here are instruction how to setup GPSD:

In Raspberry / Astroberry this is handling by the GPSD driver. I have tried to setup this driver earlier, many times, but never got it correct.

Setup of GPSD, Raspberry / Astroberry

Example of how it could look at the setup of GPSD. When clicking on the GPS refresh button it looks that it receive information from the GPS dongle, but it work as well even when the GPS dongle is inside the flat with no reception. It take the information from a local site on internet or locally what's stored on this computer, the default setup I did in the beginning. It must have the virtual mode disabled in the GPS setup properly, it's done with sudo commands, can not be done from the menu.


Setup of GPSD, Raspberry / Astroberry

From the terminal window I gave this command:

  • cgps -s

Quit with this command:

  • Ctrl+c

And got information from the default GPS device, it's not the same position as I have in the Indi window. How to solve this information up and get a working setup ?


Luckily there is the internet. Found a new video that looks to solve this problem, very similar to what I'm struggling with.

Masa is a very good guy, I learn a lot from his video.

Setup of GPSD, Raspberry / Astroberry

In the command window of Raspberry I gave the command according to the example in the video above. The GPS dongle is not connected:

  • ls -l /dev/tty*

I connect the USB dongle to a USB port on the HUB.

Setup of GPSD, Raspberry / Astroberry

I gave the same command once again:

  • ls -l /dev/tty*

Now a new port appear, the "/dev/ttyUSB1" as its device name on the last line. Now I know where my GPS dongle is connected.


Setup of GPSD, Raspberry / Astroberry

With the knowledge of the device name of the GPS dongle I now get some information from it with this command:

  • vi /etc/default/gpsd

Now I have to change the information in this file according to the video, but with my device name. But the file is write protected. I asked my friend who is working with Linux, he told me: Use this command instead, it's easier to use.

  • sudo nano /etc/default/gpsd

With that I could change the text in the file and save it.

DEVICES="/dev/ttyUSB1"

GPSD_OPTIONS=""


Then back to the video and follow the instructions:

Setup of GPSD, Raspberry / Astroberry

The GPSD service must be stopped and restarted. I gave the following commands.

  • sudo systemctl stop gpsd
  • sudo systemctl disable gpsd
  • sudo systemctl enable gpsd
  • sudo systemctl start gpsd

Note:
Some of the command could take a minute to execute.


Setup of GPSD, Raspberry / Astroberry

Connect to GPSD as earlier, but now it should not be the virtual GPS, instead the real one that is connected to the USB port.

  • cgps -s

You quit the GPS window with:

  • Ctrl+c

A new window comes up, waiting and waiting, no data. It's like the GPS dongle isn't working. I got the same result one year ago when I last tried to get this GPS function to work. In Windows I also had problem to setup the GPS dongle to use NMEA protocol. Never found a way to do it in Linux, time to ask the expert, Lars. It took the whole evening to solve this problem and others.


Lars found to change the GPS dongle mode to NMEA these two commands are needed:

  • sudo stty -F /dev/ttyUSB0 4800
  • sudo gpsctl -n -D 4 /dev/ttyUSB0

Note:
After I changed some other USB ports the USB changed to USB0. These two commands are for the BU-353 GPS, maybe not work for your device.

Setup of GPSD, Raspberry / Astroberry

With this command you can listen on the USB port:

  • sudo screen /dev/ttyUSB0 4800

If it's in the NMEA mode text strings shall be received and show up on the screen.

You quit the data stream with:

  • Ctrl+a k y

Setup of GPSD, Raspberry / Astroberry

Execute the command once again and now all GPS satellite data show up.

  • cgps -s

You quit the GPS window with:

  • Ctrl+c

Setup of GPSD, Raspberry / Astroberry

Even if you always keep the GPS dongle on the same USB port it can change number when other USB connects. Open the properties for this file and copy the name. Sorry that some names are in Swedish, haven't found out how to solve that yet.


Setup of GPSD, Raspberry / Astroberry

Replace the DEVICES= with the name from above. The idea is to have it always found correct port even if the device numbers are changed. If it works ? Don't know yet.


GPS dongle:

Setup of GPSD, Raspberry / Astroberry

This is the GPS dongle I have, sometimes I can have the drivers in Windows to work too, but it's the old PL2303 chip, not good.

More about GPS navigation:


Setup of GPSD, Raspberry / Astroberry

It's the common but old model BU-353.


A look inside the GPS dongle:

Setup of GPSD, Raspberry / Astroberry

The cable is very long to this unit, can it be shortened easy ?


Setup of GPSD, Raspberry / Astroberry

Open the lid on the backside, hold by five screws.


Setup of GPSD, Raspberry / Astroberry

The satellite receiver.


Setup of GPSD, Raspberry / Astroberry

Behind the receiver, the cable, it's glued in place.


Setup of GPSD, Raspberry / Astroberry

I cut the cable at the GPS end, but recommend to do it at the USB contact instead.


Setup of GPSD, Raspberry / Astroberry

It's very narrow space here and the cable is glued into the GPS chassi. I solder together the two cables that I cut earlier.


Setup of GPSD, Raspberry / Astroberry

After a lot of efforts I got it together again.


Setup of GPSD, Raspberry / Astroberry

I use one of the holes I have made in the tube rings to place a screw, it will hold the GPS module which has a magnet.


Setup of GPSD, Raspberry / Astroberry

Much better now when I got rid of the long cable.

Go Back to content

Go Back
To page VIII

Advertisement / Annons: