×

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

Bi-monthly release with minor bug fixes and improvements

EQMod snoop "Site Management" from a GPS Driver

I think to keep it simple is better. So the GPS driver either sends time and/or location if they are correct, or sends NOTHING. If time is valid, send time only. If location is valid, send location only, if both are valid, send both. If none, don't send anything. This way it is simpler and there are no extra semantics. Also, IPSState cannot be extended because INDI library must conform to the INDI wire protocol v1.7
8 years 7 months ago #4852

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

  • Posts: 72
  • Thank you received: 21
Dear Jasem.

Thanks for you clear answer.
I've gone on in the changes done on INDI::Telescope related to the GSPSimulation, and found my mistake. In fact I've an unappropriate use of the IDSetText() and IDSetNumber(). It should be better now.
- Could you confirm this is not possible to refresh the Text or Number values displayed on the INDI interface without sending a snoop message the registred device?
- Is a snoop message is sent to the registred device when DefineNumber() or defineText() are calling by UpdateProperrties() ? It seems yes.

Regards
Philippe
Philippe Besson
Skywatcher HEQ5, Televue 101-IS, Takahashi FS-60CB
Focus Boss II with OptecInc TCF-S focuser and Starlight Instruments HSM20 handy stepper motor
Guiding camera ZWO ASI120MM
Filterwheel OptecInc IFW
Camera not set yet
Switzerland
8 years 7 months ago #4853

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

1. Yes, once the message leaves the driver, it goes to all clients & snooping drivers.
2. Yes, if the device is already snooping then it would receive it (in our case Telescope will receive it).

I added a condition in INDI::Telescope so that it would only accept the time and location properties if their state is IPS_OK only. So even in defineNumber().. it would only accept it if it was OK.
The following user(s) said Thank You: Philippe
8 years 7 months ago #4854

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

  • Posts: 117
  • Thank you received: 5
I am also going to integrate a GPS module in my setup, and I am surprised to see discussions about writing drivers.

After reading some doc of the gps module, I saw that the pps signal is disconnected when one reads position data. I would read some time position data just for averaging the noise on the position information. Once position is stable, and because I am not moving my setup, I do not need to measure the position anymore. I would at that moment switch to timing, so that the pps signal is again active.

For timing I would integrate the gps in a dedicated RPi, configured as stratum 1 ntp server. Via the OS and the ntp protocol, the clock of my machines on the network are synchronised, and also ekos and kstars will see and use this correct time or not?

As such my only problem is to read the position in Ekos. I was hoping to use the arduino integration for this.

May I have your views on this way of working?
7 years 7 months ago #9696

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

  • Posts: 983
  • Thank you received: 375
All you're talking about is right and feasible. I'm using such a setup on my Raspberry Pi.
You need GPSD server that's reading your PPS ready GPS receiver and NTPD server that integrates to GPSD over shared memory and can handle PPS signal. Beware that binary NTPD distributed with you system updates might not support handling PPS signal (this is the case for ubuntu). In such a case you need to compile NTPD from sources.
To keep it very short and simple:
1. Install GPSD and make it autorun on system boot
2. Install NTPD a configure it to read time and PPS signal from GPSD via shared memory
3. Configure GPIO pin in /boot/configure.txt for PPS signal handling by kernel interrupt

WIth such a setup I use GPS as a reliable time source with nanoseconds level precision.
The following user(s) said Thank You: Stefan Nonneman
7 years 7 months ago #9717

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

  • Posts: 117
  • Thank you received: 5
Thanks a lot for the info. Are you also reading GPS position information for updating the Geo-settings in KStars? I am a bit worried about the fact that positioning and timing use different settings of the GPS module and it seems that the positioning setup disables the PPS signal. As I already mentioned, during the observations the position does not change, and the GPS module can be put directly in timingmode.

You wrote that you are doing this on a Raspberry Pi! Not on a Pi 2 and without Arduino???
Regards,
Stefan
Last edit: 7 years 7 months ago by Stefan Nonneman.
7 years 7 months ago #9720

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

  • Posts: 983
  • Thank you received: 375
You don't need to worry about positioning vs timing - GPSD daemon wil take care for handling data read from GPS module and you don't need to manage it manually
I connect GPS module to Raspberry Pi via built-in serial interface which is exactly the same across all Raspberry Pi versions. This means that you connect module like this directly to GPIO 8 (TX) and GPIO 10 (RX). This is enough for location and timing but does not support PPS. If you need PPS handling you need to connect PPS pin from GPS module to a selected GPIO eg. GPIO 18 and configure PPS interrupt handling in /boot/configure.txt.
You don't need Arduino at all for GPS location and timing handled by Raspberry Pi.
7 years 7 months ago #9726

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

  • Posts: 117
  • Thank you received: 5
That is indeed as I understood it is working. I found a very interesting article here but that you probably know already :)
Thanks for the help.
7 years 7 months ago #9727

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

  • Posts: 983
  • Thank you received: 375
Yes the article is a good starting point.
The key configuration for raspberry pi in the /boot/configure.txt (in case you connect gps pps signal to gpio18) is:
dtoverlay=pps-gpio,gpiopin=18dtoverlay=pps-gpio,gpiopin=18

and in the /etc/ntpd.conf:
# time from shared memory provided by gpsd
server 127.127.28.0 minpoll 3 maxpoll 4 iburst prefer
fudge 127.127.28.0 time1 0.512 flag1 1 refid GPS
 
# pps from shared memory provided by gpsd
# server 127.127.28.1 minpoll 4 maxpoll 4
# fudge 127.127.28.1 refid PPS
 
# Kernel-mode PPS ref-clock for the precise seconds
server 127.127.22.0 minpoll 3 maxpoll 4
fudge 127.127.22.0 refid PPS

In my case I'm using ntpd 4.2.8p7 compiled from source for pps handling.
The following user(s) said Thank You: Stefan Nonneman
7 years 7 months ago #9765

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

Time to create page: 0.850 seconds