×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Satellite confusion

3 years 5 months ago
Ihoujin
Platinum Boarder
Platinum Boarder
Posts: 874
Karma: 3
More
Topic Author
Satellite confusion #13186
I'm new to EKos, so while this may be obvious to some, it wasn't for me and perhaps should be better documented.
I was trying to get satellites to appear, and for a time was frustrated that updating TLEs would clear the list of satellites I had chosen after having updated satellite orbital elements beforehand.
I know now that I must first select the satellites I wish to track and apply the changes before updating satellite orbital elements, and finally update TLEs. It just not at all intuitive.
Adding a button to update orbital elements in the Satellites section of the KStars configuration next to Update TLEs would probably help along with better documentation.

I would also like to echo a wish to implement satellite mount tracking features with both differential tracking rate control and leapfrogging techniques for mounts that don't support differential tracking. Perhaps even implement some computer vision smarts to search for and identify the moving target in the vicinity and keep it centered in a finder FOV.

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.

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

3 years 5 months ago
knro
Administrator
Administrator
Posts: 7999
Karma: 51
Satellite confusion #13219
Yes I fixed that so that it saves the list before updating TLEs. Updating Orbital Elements and updating TLEs is the same thing. For the last feature, is this something you would like to contribute to the project? If yes, it would be great!

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

3 years 5 months ago
Ihoujin
Platinum Boarder
Platinum Boarder
Posts: 874
Karma: 3
More
Topic Author
Satellite confusion #13242
Excellent thank you.

As for satellite tracking feature, I would love to contribute if I could. But I don't have the skills to do so.

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.

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

3 years 5 months ago
farom
Fresh Boarder
Fresh Boarder
Posts: 18
Karma: 1
More
Satellite confusion #13298
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)   
The following user(s) said Thank You pauledd, fehlfarbe, Kaczorek, Ihoujin, petrush

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

3 years 5 months ago
Ihoujin
Platinum Boarder
Platinum Boarder
Posts: 874
Karma: 3
More
Topic Author
Satellite confusion #13306
This looks amazing. Haven't tried it yet. But I can tell this is some nice work. Is it possible to enable GPSD for automatically setting location? And can this work while offline if I update the TLE's from space-track first?

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.

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

3 years 5 months ago
Ihoujin
Platinum Boarder
Platinum Boarder
Posts: 874
Karma: 3
More
Topic Author
Satellite confusion #13344
How do I run this?

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.

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

3 years 5 months ago
Ihoujin
Platinum Boarder
Platinum Boarder
Posts: 874
Karma: 3
More
Topic Author
Satellite confusion #13345
I am getting a Syntax Error on line 59 when running it in terminal.
print("connection to " + host + ":" + str(port) + " ... ", end= ' ')

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.

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

3 years 5 months ago 3 years 5 months ago by pauledd.
pauledd
Platinum Boarder
Platinum Boarder
Posts: 346
Karma: 3
More
Satellite confusion #13346

Ihoujin wrote: I am getting a Syntax Error on line 59 when running it in terminal.
print("connection to " + host + ":" + str(port) + " ... ", end= ' ')


Try to run with python above 2.7. I had to switch to python 3.x

--= human, without Windows™ =--
pls excuse my bad english! :)

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

3 years 5 months ago
Ihoujin
Platinum Boarder
Platinum Boarder
Posts: 874
Karma: 3
More
Topic Author
Satellite confusion #13368
I have installed Python 3.x. It is version 8.1.1. For some reason the upgrade command to 9.0.1 is downloading the upgrade package, but installs version 8.1.1

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.

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

3 years 5 months ago
pauledd
Platinum Boarder
Platinum Boarder
Posts: 346
Karma: 3
More
Satellite confusion #13369
I dont know what distribution you are using. I am on gentoo linux and here we have version 3.5.2 as latest.

--= human, without Windows™ =--
pls excuse my bad english! :)

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

3 years 5 months ago
farom
Fresh Boarder
Fresh Boarder
Posts: 18
Karma: 1
More
Satellite confusion #13370
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 ?

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

3 years 5 months ago
pauledd
Platinum Boarder
Platinum Boarder
Posts: 346
Karma: 3
More
Satellite confusion #13374

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

Just with the simulators, works so far. Waiting for clear sky for a real test. I recently tried to catch a
satellite in kstars by slewing to its track some minutes before it enters the field of view. But I did not find it
in the exposure. Maybe it was not bright enough or the track was wrong or something else... I'll report back on success.

--= human, without Windows™ =--
pls excuse my bad english! :)

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

Time to create page: 0.891 seconds