Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
a1e9805
Added ASCOM driver support
rkinnett Aug 10, 2021
cb23ccf
added ASCOM alt/az mount support
rkinnett Aug 23, 2021
bc015b9
Revert "added ASCOM alt/az mount support"
rkinnett Aug 23, 2021
b3d7088
refactor hw
gustavmpettersson Sep 20, 2021
eb4f3be
Update hw docs
gustavmpettersson Sep 20, 2021
6344db3
added TLE lookup
rkinnett Nov 18, 2021
bd7cd4a
trying to get rate control working
rkinnett Nov 22, 2021
e76455e
added rate inversion control
rkinnett Nov 22, 2021
9813fab
fixing rate control for ioptron mount
rkinnett Nov 28, 2021
e58d9c2
overhauled
rkinnett Dec 14, 2021
47938f8
Merge branch 'sandbox'
rkinnett Dec 14, 2021
2432528
fixed camera gain setting method
rkinnett Dec 14, 2021
e3dd102
various improvements
rkinnett Dec 15, 2021
4b1346f
Added sidereal tracking, fixed binning
rkinnett Dec 16, 2021
3db15e1
minor edits
rkinnett Dec 19, 2021
70d15aa
try to fix com threading issue and cleanup device identity handling
rkinnett Dec 20, 2021
27c2136
updated my own startup script
rkinnett Dec 20, 2021
121cfa4
Added iOptron protocol and fixed CoInitialize error
rkinnett Dec 23, 2021
c4ddc00
fixed minor error
rkinnett Dec 24, 2021
45c9ef0
incorporating ephem lookup
rkinnett Dec 25, 2021
ded1923
integrated ephem lookup
rkinnett Dec 25, 2021
bfda9b4
improved device init arg parsing and improved stop behaviors
rkinnett Dec 29, 2021
c94a257
revised start template with improved device parameter handling
rkinnett Dec 29, 2021
20de46e
cleanup and robustness improvements
rkinnett Dec 29, 2021
7794be6
Merge branch 'sandbox'
rkinnett Dec 29, 2021
9566150
minor improvements and bug fixes
rkinnett Jan 6, 2022
440f7fc
Robustness improvements with AZMP
rkinnett Jan 20, 2022
fccd2ac
updated requirements.txt and other minor mods
rkinnett Feb 23, 2022
14b7bcf
fix satellitetle import
rkinnett Feb 26, 2022
a68ab87
fix pywin32 import
Feb 26, 2022
1f972e6
expose smoothing parameter in Tracker settings
rkinnett Mar 1, 2022
1bd0b9b
Merge branch 'master' of https://github.com/rkinnett/pypogs
rkinnett Mar 1, 2022
02c7a0b
add tracking settings to example startup script and improve control s…
rkinnett Mar 1, 2022
d94919f
removed ascom 8bit casting
rkinnett Mar 6, 2022
b44f23e
added lines to enable recording coarse images
rkinnett Mar 6, 2022
856dd18
return unhandled message for ascom camera frame rate setter
rkinnett Mar 6, 2022
aa04774
improvements to auto alignment
rkinnett Mar 7, 2022
95d6857
auto align get new image
rkinnett Mar 9, 2022
6a0bf54
improvements to self alignment and loading alignment
rkinnett Mar 9, 2022
be6026f
merged tetra3_update from esa
rkinnett Mar 10, 2022
744d11e
exclude star catalogs and custom tetra3 databases
rkinnett Mar 10, 2022
cee6dab
don't stop star alignment if can't solve one position
rkinnett Mar 10, 2022
25897b7
fix auto alignment settle time and failure
rkinnett Mar 10, 2022
8b847b4
minor details
rkinnett Mar 10, 2022
d26bc92
fixed serial hang problem
rkinnett Mar 11, 2022
61d54ff
Merge branch 'master' into hw_ascom
gustavmpettersson Mar 11, 2022
0e8db9c
Update submodule link
rkinnett Mar 11, 2022
d4fc635
pass more properties to star camera
rkinnett Mar 11, 2022
1d5da92
Update tetra3
rkinnett Mar 11, 2022
85b5269
added star alignment failure tolerance parameter and improved tetra3 …
rkinnett Mar 13, 2022
8b75c10
Project target intercept position for initial tracking slew
rkinnett Mar 17, 2022
87209dd
fix target projection at start of tracking
rkinnett Mar 17, 2022
d3d289f
fixed initial slew at start of tracking
rkinnett Mar 19, 2022
ee1d664
minor fixes for mount robustness
rkinnett Mar 25, 2022
393aba2
add telescope server for stellarium
rkinnett Mar 25, 2022
2bc5427
fixing issues per 3/29/22 discussion
rkinnett Apr 2, 2022
1c8d9c4
fix ascom mount deinit
rkinnett Apr 2, 2022
450694c
Initial zwoasi support (work in progress)
gustavmpettersson Apr 7, 2022
e36940f
Add zwoasi license notice
gustavmpettersson Apr 7, 2022
84761e6
Implemented zwoasi property setting
gustavmpettersson Apr 8, 2022
d89dde6
add add-offset to star camera
rkinnett Apr 8, 2022
5fd965c
misc cleanup
rkinnett Apr 8, 2022
70ed23b
Merge remote-tracking branch 'upstream/hw_ascom'
rkinnett Apr 8, 2022
eb1cebf
Revert "Merge remote-tracking branch 'upstream/hw_ascom'"
rkinnett Apr 8, 2022
4b22b7e
hardware subdir
rkinnett Apr 8, 2022
a3fa3f0
hardware subdir
rkinnett Apr 8, 2022
8d050a8
hardware subdir
rkinnett Apr 9, 2022
fcd9e17
ignore tetra3
rkinnett Apr 9, 2022
aca34b0
integrated zwoasi from esa/pypogs/hw_ascom
rkinnett Apr 10, 2022
5ff1e30
Merge branch 'master' of https://github.com/rkinnett/pypogs
rkinnett Apr 10, 2022
a77971d
ignore hardware log
rkinnett Apr 10, 2022
826c8a9
improve zwoasi interfaces
rkinnett Apr 24, 2022
eb8816d
ignore log files
rkinnett Apr 24, 2022
0f4c5f6
fix hardware popup clear on removal
rkinnett Apr 24, 2022
8a79d09
pull in bayer handling from hw_ascom
rkinnett Apr 24, 2022
de9b36f
make zwoasi default model
rkinnett Apr 24, 2022
9ead869
fix hardware log file dir and misc other adjustments
rkinnett Apr 24, 2022
bb01d09
change example gui update rate
rkinnett Apr 24, 2022
d796ce4
add exposure control and generally resynch with hw_ascom
rkinnett Apr 28, 2022
7c5a5b7
fix plate scale auto calc
rkinnett Apr 28, 2022
cf462e3
fix readout size and misc other cleanup
rkinnett Apr 29, 2022
097e42d
fixing minor bugs
rkinnett Apr 30, 2022
043b21c
add common sats selection
rkinnett May 13, 2022
74af3e3
added saved targets selection
rkinnett May 13, 2022
43cc846
try to improve exposure setting robustness
rkinnett May 13, 2022
cddf957
suppress img prints in gui log
rkinnett May 13, 2022
e80507b
suppress extraneous logging
rkinnett May 14, 2022
9b2d87a
add auto-align max trials parameter
rkinnett May 14, 2022
1dd22e0
rearrange target popup
rkinnett May 15, 2022
b3d1ee2
add target server
rkinnett May 15, 2022
13554ee
update server start commands
rkinnett May 15, 2022
925b8a5
Clarify differences between this fork and main project
rkinnett May 19, 2022
5643af1
slight tweaks to readme
rkinnett May 19, 2022
9e28cb5
add zwoasi
rkinnett May 19, 2022
ec2219e
minor tweaks
rkinnett May 20, 2022
be1425c
reorganize templates
rkinnett May 25, 2022
d642c4c
resynch with parent project hw_ascom
rkinnett May 25, 2022
f655121
fix azmp serial interfaces
rkinnett May 25, 2022
3ddb503
minor bug fixes
rkinnett May 26, 2022
a6db366
fix azmp normal mode state lookup
rkinnett May 27, 2022
9ef8e3a
add tracking settings adjustments
rkinnett May 27, 2022
d03b3f8
Update mount_only.py
rkinnett May 27, 2022
d828353
minor cleanup
rkinnett Jun 4, 2022
6e7fe11
improve serial port init robustness and error reporting
rkinnett Jun 4, 2022
885bd3d
add rate avoidance
rkinnett Jul 15, 2022
deda691
fix rate avoidance
rkinnett Jul 15, 2022
12bf6a5
add projection time delta feedback setting
rkinnett Aug 25, 2022
609fff3
reenable ASCOM chooser
rkinnett Feb 2, 2024
1df2058
Update README.rst
rkinnett Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
# Cache
*__pycache__*

# Personal
*my_*
/my_&
*My*

# System data and debug
/pypogs/data/*
/pypogs/debug/*
*.txt

# Builds
/build/*
Expand All @@ -16,3 +22,12 @@

# Settings
/setup.cfg

# Exclude custom tetra3 databases (except default_database.npz)
*.npz
!default_database.npz

#Exclude tetra3 source database files (tyc_main.dat, hip_main.dat)
*.dat
*.pyc
tetra3
183 changes: 182 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,187 @@
Welcome to pypogs!
Welcome to (unofficial) pypogs!
==================

*Experimental fork for satellite imaging*
-----------------------------------------

====

Relation to main ESA project
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This fork is unaffiliated with ESA and is managed outside of the main ESA project, but
coordinates informally with the main project. This fork pulls updates form the main project
and in some cases may feed forward new features, developed and tested here, if deemed robust
and useful to the optical comm goals of the main ESA project.

+ pypogs **main project**: https://github.com/esa/pypogs
+ pypogs **documentation**: https://pypogs.readthedocs.io/

====

Geared toward satellite imaging
^^^^

With several features added for user convenience:

+ ASCOM mount control (partially tested)
+ ASCOM camera control (for non-ZWO astro cameras; limited to ~5 fps)
+ Expanded target selection methods:
+ "saved" target selection pull-down menu (users can append this short list via startup scripts)
+ TLE lookup by NORAD ID
+ JPL horizons epehemeris lookup (for JWST, Psyche, etc!)
+ Configurable TCP application links to:
+ Stellarium for graphical display of telescope pointing and receipt of go-to requests
+ SkyTrack for receiving target TLEs
+ Expanded configurability of auto-alignment routine
+ Self-alignment vectors configurable by command (to avoid my neighbor's trees)
+ Additional user controls for settling time, retry counts, etc.
+ Sidereal tracking button (sometimes useful for finding faint satellites)
+ Camera settings (gain, exposure, etc) exposed to initialization commands (useful in startup scripts)
+ Improved start of tracking by projecting intercept point
+ Additional control offset in coarse camera view (to help recover from severe misalignment)


====

Hardware Compatibility
^^^^^^^^^^^^^^^^^^^^^^

| **!!!! Presently restricted to alt-az mounts only !!!!**
| *Equatorial mount support is under consideration but would require refactoring the entire pypogs architecture.*

The telescope mount must be capable of smoothly executing continuous floating-point rate commands.

**Telescope Mounts:**

+ Celestron CPC (tested, *recommended*) & NexStar (tested)
+ iOptron AZMP with `latest firmware <https://www.ioptron.com/Articles.asp?ID=290>`_ (tested)
+ Probably: HAZ31, HAZ46 (not tested)
+ Possibly others via ASCOM (*not* tested)
+ Planned: Meade LX200 (*not* tested)
+ Not testd: Sky-Watcher

**Cameras:**

+ Point Gray (tested)
+ ZWO (tested, *recommended*)
+ QHY via ASCOM (tested, limited by driver to 5 fps)
+ Possibly others via ASCOM (not tested, limited by driver to 5 fps)
+ Under consideration: QHY direct driver (*not* tested)
+ Under consideration: directshow (for webcams and non-ZWO cameras, *not* tested)

====

Optical Configuration Considerations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Image outside of pypogs** *(for now)*

Presently, pypogs cannot record frames from a camera at full frame rate while simultaneously
controlling from the same camera. Therefore, it is recommended that users operate main imaging
cameras through separate software (e.g. SharpCap, FIreCapture, ASICap, etc) while tracking a
satellite with one or two dedicated control cameras in pypogs.

**Wide field of view for auto-alignment**

Pypogs provides a brilliant auto-alignment routine which measures and compensates for a mount's
inherent alignment error. The auto-alignment routine dramatically improves pypogs target
acquisition and tracking performance. It is highly recommended that operators run auto-alignment
prior to tracking, or load a previous alignment solution if a mount and telescope system has not
changed. The plate solver used by pypogs' auto-alignment routine works best with wide fields of
view, roughly 10 degrees or more.

::

field of view = arctan( camera sensor width / focal length)

Focal lengths of 35mm and 50mm have been found to work well with with small-chip (asi120, asi290,
asi178, asi224, etc) and large-chip (asi174) guide cameras, respectively. C-mount/CS-mount CCTV
lenses work well, but must be of decent optical quality. The plate solver is sensitive to
optical distortion from low-quality lenses. Several ultra-cheap CCTV lenses were found not to
work due to field distortion and field flatness (corners out of focus).

Recommended star camera lenses:

+ For small-chip guide cameras (asi290, etc): `Fujinon hf35ha-1s 35mm Lens <https://www.rmaelectronics.com/fujinon-hf35ha-1s/>`_ ($110 USD)
* For large-chip guide cameras (asi174): `Fujinon hf50ha-1s 50mm Lens <https://www.rmaelectronics.com/fujinon-hf50ha-1s/>`_ ($155 USD)
+ Budget option for large-chip guide cameras (asi174): `Arducam C-Mount 50mm Lens <https://www.arducam.com/product/50mm-c-mount-lens-for-hq-camera/>`_ ($46 USD, one test article shows noticeable tilt but works reliably)




**Competing constraints: auto-alignment and bright target acquisition vs tracking precision**

In addition to being better suited for plate solving, a wide field of view coarse camera
configuration can reduce susceptibility to alignment error during initial target acquisition by
presenting a larger patch of sky for pypogs to search. This wide field advantage can only be
realized with targets that are bright enough (visual magnitude ~3 or less) to be detected in the
wide view. Small or distant, dim targets generally require longer focal length to detect and
track. Moreover, longer focal length (narrower field of view) yields better tracking performance.
As a rule of thumb, it is recommended that the finest view used by pypogs have focal length not
less than about 1/10th that of the primary imaging telescope. For example, with a C8 at f/10
(2032 mm focal length), the guide scope focal length should be at least 200 mm.

*In a nutshell, although it may be possible to operate pypogs with a single guide scope and
camera, competing objectives of auto-alignment, initial target acquisition, and tracking
generally warrant operating pypogs with at least 2 optical systems - one wide field optical
system for auto-alignment and bright object initial acquisition, and a separate, longer focal
length system for dim object initial acquisition and fine guiding.*

**Star Camera, Coarse Camera, or Fine Camera?**

Which camera "role" in pypogs should be associated with which optical system? It depends.

If you are planning to track only bright objects like ISS and CSS, use a wide field system as
your Coarse Camera, and enable "Link Star/Coarse Cameras" to use this camera in both roles.
Select a narrow field of view system as the Fine Camera. This way, the wide field system
will be used for both auto-alignment and initial target acquisition and tracking, and once
the pypogs locks onto the target in the coarse view, it should then automatically search for
and lock onto the target in the fine camera, providing best stabilization for a primary imaging
system (operated outside of pypogs).

If you are planning to track dim objects (visual magnitude >2.5 or so) which cannot be
detected in the wide field camera view, configure the wide field system as your Star Camera
only, and load the narrow field of view camera as the Coarse Camera.


====

Getting Started
^^^^

Install `ASI Camera SDK<http://zwoastro.com/software>` if using ZWO cameras.

Check hardware compatiblity before proceeding.

| Follow `installation instructions <https://pypogs.readthedocs.io/en/latest/installation.html>`_
provided from the main project, **but**
| clone "https://github.com/rkinnett/pypogs.git"
| instead of "https://github.com/esa/pypogs.git".

Once installed, run graphical pypogs by:

::

cd examples
python run_pypogsGUI.py

This is a starting point configuration without any hardware initialized, and with default
settings for everything.

The file run_pypogsGUI.py contains many commented-out (via # and ''') configuration commands
as examples of how to customize a startup configuration.

The user may copy run_pypogsGUI.py to a new file titled "my_pypogs.py" or similar, specifically
prefixed by "my\_" so that git will not try to configuration manage unique configuration files
when the user updates pypogs via git.


====

pypogs general overview (from main project)
-------------------------------------------

*pypogs is an automated closed-loop satellite tracker for portable telescopes written in Python.*

Use it to control your optical ground station, auto-align it to the stars, and automatically acquire
Expand Down
2 changes: 2 additions & 0 deletions examples/clear_logs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo. 2> ../pypogs/debug/pypogs.txt
echo. 2> ../pypogs/debug/gui.txt
49 changes: 49 additions & 0 deletions examples/mount_only.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
"""
Run the pypogs GUI
==================

Run this script (i.e. type python run_pypogsGUI.py in a termnial window) to start the pypogs Graphical User Interface.
"""
import sys
sys.path.append('..')
import pypogs

# ClEAR LOGS:
open('../pypogs/debug/pypogs.txt', 'w').close()
open('../pypogs/debug/gui.txt', 'w').close()

# INITIALIZE PYPOGS SYSTEM:
sys = pypogs.System()

# CONFIGURE GROUND STATION SITE:
class MySite:
lat = 34.2 # degrees N
lon = -118.2 # degrees E
elev = 600 # meters above MSL
sys.alignment.set_location_lat_lon(lat=MySite.lat, lon=MySite.lon, height=MySite.elev)
sys.alignment.set_alignment_enu()


# ADD MOUNT:
#sys.add_mount(model="ASCOM", identity="Simulator")
#sys.add_mount(model="ASCOM", identity="DeviceHub", axis_directions=(1, -1)) # ascom inverts alt axis?
sys.add_mount(model="iOptron AZMP", identity="COM2", max_rate=(16, 16))
#sys.add_mount(model="Celestron", identity="COM5")

# APPLICATION LINKS
# Use address 127.0.0.1 if the external application runs on this computer.
# Use address 0.0.0.0 if the external application runs on another computer on your local network.
sys.stellarium_telescope_server.start(address='127.0.0.1', port=10001, poll_period=1) # Stellarium connection
sys.target_server.start(address='127.0.0.1', port=12345, poll_period=1) # SkyTrack connection


# START GUI:
try:
pypogs.GUI(sys, 500)
#sys.do_auto_star_alignment(max_trials=2, rate_control=True, pos_list=[(40, -135), (60, -135)])

except Exception:
raise
finally:
sys.deinitialize()
Loading