Advertisement / Annons:
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.
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.
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.
From the terminal window I gave this command:
Quit with this command:
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.
In the command window of Raspberry I gave the command according to the example in the video above. The GPS dongle is not connected:
I connect the USB dongle to a USB port on the HUB.
I gave the same command once again:
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.
With the knowledge of the device name of the GPS dongle I now get some information from it with this command:
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.
With that I could change the text in the file and save it.
Then back to the video and follow the instructions:
The GPSD service must be stopped and restarted. I gave the following commands.
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.
You quit the GPS window with:
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:
With this command you can listen on the USB port:
If it's in the NMEA mode text strings shall be received and show up on the screen.
You quit the data stream with:
Execute the command once again and now all GPS satellite data show up.
You quit the GPS window with:
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.
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.
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:
It's the common but old model BU-353.
A look inside the GPS dongle:
The cable is very long to this unit, can it be shortened easy ?
Open the lid on the backside, hold by five screws.
The satellite receiver.
Behind the receiver, the cable, it's glued in place.
I cut the cable at the GPS end, but recommend to do it at the USB contact instead.
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.
After a lot of efforts I got it together again.
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.
Much better now when I got rid of the long cable.