Romain Fafet replied to the topic 'Re: Old Sat Tracking script' in the forum. 3 weeks ago

I am actually working on a software dedicated to the tracking of satellites based on this. Unfortunately it's not yet ready to be released, some features are missing and it only kinda work for my specific setup. I have to look at the variable tracking operation of typical drivers such as EQMOD to make it compatible.
Here is a preview of the interface:


Github

I tracked 4 O3B satellites . The tracking is pretty stable with most of the error being caused by the periodic error of the mount.
[video]
(30x15s per satellite, Orion 203/1000 on SkyViewPro, Canon 1000D)

Read More...

Ilia thanked Romain Fafet in topic Inova CCD 2 years ago

Romain Fafet replied to the topic 'Inova CCD' in the forum. 2 years ago

Indi v1.5.0 has been released with a driver for Inova cameras: indi_inovaplx_ccd. It works fine for me both on my laptop and on my raspberry :)

The driver is not installed automatically when you update indi, you have to install it manually with the sdk:

sudo apt-get install indi-inovaplx libinovasdk


Read More...

Romain Fafet thanked Jasem Mutlaq in topic Inova CCD 2 years ago

Romain Fafet replied to the topic 'Satellite confusion' in the forum. 2 years ago

Thanks you for the feedback. It was the kind of problem I was expecting. Reducing the guiding duration may help but I am skeptical about the fact that it will allow a smooth tracking (do not try to reduce update_delay in the script, it wiil have no effect as pyephem has a time resolution of 1s).

It would be better to control individually RA and DEC speed but I haven't found a standard way to do that. I will add a dedicated property in the driver of my homemade mount. For other drivers I was thinking about timed pulse guide but it seems to be limited to very low speed. Do you have an idea ?

Read More...

Romain Fafet replied to the topic 'Satellite confusion' in the forum. 2 years ago

The computer date is used for the tracking. If you want to simulate the tracking for an other date you can add a bias by changing this line:

obs.date = ephem.now()
in
obs.date = ephem.now() + 4*ephem.hour + 40*ephem.minute
for an event 4h40 in the future

Read More...

Romain Fafet replied to the topic 'Satellite confusion' in the forum. 2 years ago

I forgot to mention that python 3 was required. I am still working on it and I will write the documentation when it will be finished.

Has anyone tried it? Could you give me your feedback on the tracking ?

Read More...

pauledd thanked Romain Fafet in topic Satellite confusion 2 years ago

Andrew thanked Romain Fafet in topic Satellite confusion 2 years ago

Romain Fafet replied to the topic 'Satellite confusion' in the forum. 2 years ago

I have done a small script in python for satellite tracking but I haven't yet tested it on real hardware.

You need Python (follow instructions on indilib.org/support/tutorials/166-instal...on-raspberry-pi.html) and PyEphem:

$ pip3 install --user pyephem

Here is the script in python:
# --- Settings ---
# Change following parameters according to your need

# Geographic location
latitude = '43:43:47.0'
longitude = '6:54:00.0'

# Satellite TLE (can be retreived on https://www.space-track.org)
TLE_line_1 = '1 25078U 97077B   16358.24735839  .00000123  00000-0  34052-4 0  9990'
TLE_line_2 = '2 25078  86.3977  85.5078 0003714 108.4484 251.7118 14.38084761998341'

# INDI settings
host = 'localhost'
port = 7624
driver_name ="Telescope Simulator"

# Script settings
update_delay = 1 # delay in s between updates

# --- Code ---
import PyIndi
import time
import sys
import threading
import ephem
from math import pi

# default client
class IndiClient(PyIndi.BaseClient):
    def __init__(self):
        super(IndiClient, self).__init__()
    def newDevice(self, d):
        pass
    def newProperty(self, p):
        pass
    def removeProperty(self, p):
        pass
    def newBLOB(self, bp):
        pass
    def newSwitch(self, svp):
        pass
    def newNumber(self, nvp):
        pass
    def newText(self, tvp):
        pass
    def newLight(self, lvp):
        pass
    def newMessage(self, d, m):
        pass
    def serverConnected(self):
        pass
    def serverDisconnected(self, code):
        pass



    
# connect the server
print("Connection to " + host + ":" + str(port) + " ... ", end='')
indiclient=IndiClient()
indiclient.setServer(host,port)
if (not(indiclient.connectServer())):
    print("FAILED")  
    print("No indiserver running on "+indiclient.getHost()+":"+str(indiclient.getPort()))
    sys.exit(1)
print("OK")

# get the telescope device
print("Get driver '"+ driver_name + "' ... ", end='')
device_telescope=None
telescope_connect=None
device_telescope=indiclient.getDevice(driver_name)
while not(device_telescope):
    time.sleep(0.5)
    device_telescope=indiclient.getDevice(driver_name)
print("OK")

# wait CONNECTION property be defined for telescope
print("Wait CONNECTION property be defined ... ", end='')
telescope_connect=device_telescope.getSwitch("CONNECTION")
while not(telescope_connect):
    time.sleep(0.5)
    telescope_connect=device_telescope.getSwitch("CONNECTION")
print("OK")

# if the telescope device is not connected, we do connect it
if not(device_telescope.isConnected()):
    print("Driver not connected, try to connect it ... ", end='')
    # Property vectors are mapped to iterable Python objects
    # Hence we can access each element of the vector using Python indexing
    # each element of the "CONNECTION" vector is a ISwitch
    telescope_connect[0].s=PyIndi.ISS_ON  # the "CONNECT" switch
    telescope_connect[1].s=PyIndi.ISS_OFF # the "DISCONNECT" switch
    indiclient.sendNewSwitch(telescope_connect) # send this new value to the device
    t=10
    while not(device_telescope.isConnected()) and t>0:
        time.sleep(1)
        t-=1
    if not(device_telescope.isConnected()):
        print("FAILED")  
        print("Failed to connect the driver")
        sys.exit(1)
    print("OK")

# We want to set the ON_COORD_SET switch to engage tracking after goto
# device.getSwitch is a helper to retrieve a property vector
print("Set tracking mode ... ", end='')
telescope_on_coord_set=device_telescope.getSwitch("ON_COORD_SET")
while not(telescope_on_coord_set):
    time.sleep(0.5)
    telescope_on_coord_set=device_telescope.getSwitch("ON_COORD_SET")
# the order below is defined in the property vector, look at the standard Properties page
# or enumerate them in the Python shell when you're developing your program
telescope_on_coord_set[0].s=PyIndi.ISS_ON  # TRACK
telescope_on_coord_set[1].s=PyIndi.ISS_OFF # SLEW
telescope_on_coord_set[2].s=PyIndi.ISS_OFF # SYNC
indiclient.sendNewSwitch(telescope_on_coord_set)
telescope_radec=device_telescope.getNumber("EQUATORIAL_EOD_COORD")
while not(telescope_radec):
    time.sleep(0.5)
    telescope_radec=device_telescope.getNumber("EQUATORIAL_EOD_COORD")
print("OK")

# Configure PyEphem
print("Configure PyEphem ... ", end='')
obs = ephem.Observer()
obs.lon = longitude
obs.lat = latitude
satellite = ephem.readtle('TARGET',TLE_line_1,TLE_line_2)
print("OK")

while 1:
    # compute satellite coordinates
    obs.date = ephem.now()
    satellite.compute(obs)
    print(obs.date)
    print("    RA: ",satellite.ra)
    print("    DEC:",satellite.dec)
    print("    ALT:",satellite.alt)
    print("    AZ: ",satellite.az)

    # We set the desired coordinates
    telescope_radec[0].value=ephem.hours(satellite.ra)*24/2/pi
    telescope_radec[1].value=ephem.degrees(satellite.dec)*360/2/pi
    indiclient.sendNewNumber(telescope_radec)

    time.sleep(update_delay)   


Read More...