m0jec
Posts: 6
Joined: Fri Sep 25, 2015 1:36 pm

Data transfer between programmes help needed.

Fri Sep 25, 2015 1:56 pm

Hi,

Thanks for taking the time to read my request. I'll briefly explain the problem and then maybe someone out there might have a solution.

I am in the process of building a Rotator for tracking satellites (the ISS is my main interest) using an old CCTV rotator (elevation and Azimuth) controlled by a Raspberry Pi B+ (the quad core version) I have written the code (in Python) that takes 'coordinates' and then drives the rotator to that position (0-360 on the 'x' axis and in theory 0-90 on the 'y' axis) I have downloaded a copy of Gpredict for the Pi which will track satellites and has an 'output' to drive a rotator.

I have yet to find how to get the data from Gpredict to my code. I was under the impression that it is a 'simple' IP packet based system, I have managed to write routines for my code that will send and receive data, so I know that I CAN get data into my code (both locally on the Pi and from a nearby PC) but have yet to find a way to get the data output by Gpredict.

It might be that another programme may suit my needs better in which case I'm open to suggestions. I have SDR-Radio on my PC which also has a 'rotator' interface over IP but I'm having similar issues with that too.

I'm sure it's probably something simple I'm misunderstanding, so wondered if anyone has done this before and can point me in the right direction.

My eventual plan is to have a magnetometer and tilt sensor as feedback so the Pi 'knows' where the rotator is pointing, (my code uses timings to drive it within a degree or so at this stage so accurate enough for testing) and I might need a little help getting that sorted too. (I've managed to get the magnetometer working on an arduino but can't seem to get it to initalise from the Pi so maybe a small piece of code I'm missing?) This however is secondary to my getting the data problem sorted.

Thanks in advance for anyone who can help.

Once finished I plan to make my code available so it can be used by others for similar projects.

Norman
M0JEC

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Data transfer between programmes help needed.

Fri Sep 25, 2015 9:46 pm

I don't have any experience in this domain, but I had a quick look at the manual for Gpredict. From a quick read of the manual (section 7 controlling radios and rotators) it says
Beginning with version 1.0 gpredict can do Doppler tuning of radios and tracking of antenna rotators via Hamlib, see http://hamlib.sourceforge.net/. This is done via hamlib's rigctld and rotctld TCP/IP interface and requires that hamlib version 1.2.8 or later is installed on the computer to which your radio and/or rotator device is connected.

m0jec
Posts: 6
Joined: Fri Sep 25, 2015 1:36 pm

Re: Data transfer between programmes help needed.

Thu Nov 19, 2015 1:55 pm

OK I have now managed to get Gpredict to output data (was something I'd missed!) my rotator is now working semi automatically.

My next hurdle on the project is 'feedback', I'm currently using 'dead reckoning' which does seem to be working very well, certainly more than accurate enough for Radio work.

I have a PiHat (AstroPi) and was hoping to use that for a compass and tilt sensor, whilst it is working it seems to be less useful (less actuate?) than my 'dead reckoning' system.

Does anyone else have experience of using the PiHat as a compass/tilt sensor and maybe can advise if (like my last issue) it is something I have overlooked?

I have tired (a few times now) to 'calibrate' the PiHat 3 axis mag/acel/gyro system and have made some improvements but it is still not as good as I hoped it would be.

I have put up a version of my code on github (currently without the feedback routine) https://github.com/M0JEC/PiTator feel free to take a look and see what you think.

Any help greatly appreciated

Norman

turorit
Posts: 1
Joined: Thu Nov 26, 2015 11:57 am

Re: Data transfer between programmes help needed.

Thu Nov 26, 2015 12:04 pm

Hi there,

Cool project so far. Hoping to do a similar thing myself, though I have near zero programming knowledge at this point!
Good luck, looking forward to seeing it all working!

Originally I was going to use a potentiometer on the rotator for position feedback. Now I'm considering a magnetometer & came across this page http://ozzmaker.com/2014/12/01/compass1/. Might be useful for you?

Interested to see how accurate a pot is vs magnetometer given my mag sensor would be on a large radio tower!


T

m0jec
Posts: 6
Joined: Fri Sep 25, 2015 1:36 pm

Re: Data transfer between programmes help needed.

Thu Nov 26, 2015 2:38 pm

Thanks for that, and yes I did wonder if all the computer equipment I have in my room might be affecting the readings on the magnetometer.

I'll read that site when I get a few mins but at first glance it does look interesting.

Good luck with your project, let me know how it progresses?

Norman

Return to “General programming discussion”