Another Script - SMART TRACKING SYSTEM

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
nandojoe
Posts: 18
Joined: Wed May 06, 2026 4:15 pm

Another Script - SMART TRACKING SYSTEM

#1

Post by nandojoe »

Hi guys!
First of all, I apologize for creating yet another topic in the scripting section...! It's just that I love creating things and I get carried away. When I discovered that I could use Python with Sharpcap, I decided to learn the Python language to create things.

This time I created something I called "The Smart Tracking System", and was created to solve a specific practical limitation in my astrophotography workflow. When Sharpcap is opened, it runs automatically. The ideia is to use Sharpcap in my laptop screen, and the panel in other monitor. I'm gradually improving it, adding fields, things, and information. The last thing I added was the object's rotation calculation.

Because my setup does not use a traditional equatorial guiding system (I use alt/az munt), I cannot use software such as PHD2 for real-time guiding analysis and tracking correction. Instead of relying on external autoguiding hardware, I decided to build a custom monitoring environment capable of extracting and interpreting tracking data directly from SharpCap.

The system uses live telemetry generated by SharpCap itself — especially Live Stack drift data and Plate Solve information — to create a real-time tracking analysis platform similar in concept to a lightweight integrated guiding monitor.

The main goal was not to replace professional autoguiding software, but to create an intelligent monitoring layer capable of:

analyzing mount stability;
visualizing tracking drift in real time;
calculating RMS tracking error;
identifying drift trends and tracking degradation;
monitoring alignment quality;
assisting with manual corrections;
improving long-exposure tracking reliability;
reducing dependence on dedicated guiding hardware.

The Tracking Radar and RMS monitoring modules were specifically designed to provide a visual representation of mount behavior over time. By plotting drift vectors and calculating average tracking deviation, the system allows continuous observation of tracking quality without requiring a separate guide camera or guiding software.

One of the core features of the system is its automated recentering logic. Instead of performing constant guiding corrections like a traditional autoguider, the software periodically executes intelligent Plate Solve + Sync operations to recenter the target and compensate for accumulated drift.

To make this process adaptable to different observing conditions and mount behaviors, three operational synchronization modes were implemented:

Smart Mode
Designed as the balanced operational mode. It calculates synchronization intervals dynamically based on the current exposure time and applies moderate timing margins. This mode prioritizes stability while minimizing unnecessary corrections during normal imaging sessions.
Precision Mode
Optimized for maximum framing accuracy and tighter target centering. Synchronizations occur more frequently, reducing accumulated drift at the cost of higher synchronization activity. This mode is intended for long focal lengths, smaller sensors, or sessions requiring highly accurate framing consistency.
Aggressive Mode
Designed for unstable tracking conditions, portable mounts, or situations with poor polar alignment. The system performs recentering operations much more frequently to compensate for rapid drift accumulation. This mode prioritizes maintaining target position even under difficult tracking conditions.

The synchronization intervals are automatically calculated using the current camera exposure time combined with configurable timing margins. This adaptive logic allows the system to behave differently depending on imaging conditions and operational priorities.

In addition, the project evolved into a broader observatory interface by integrating:

fully functional embedded Stellarium integration;
automated solve-and-sync routines;
live telemetry panels;
FWHM analysis;
focus quality indicators;
and an independent SkyCam monitoring system for atmospheric observation.

The SkyCam module was added as a lightweight sky monitoring solution to observe clouds, sky transparency, horizon conditions, and general atmospheric behavior during imaging sessions.

The system dynamically detects connected webcams and USB cameras through DirectShow enumeration and allows portable deployment across different Windows systems without requiring hardcoded camera configurations.

Real-time image enhancement controls were also implemented for the SkyCam module, allowing brightness and contrast adjustment through FFmpeg video filtering. This improves visual monitoring of the night sky under varying atmospheric and light pollution conditions.

Overall, the Smart Tracking System became a custom-built observatory monitoring platform optimized for non-guided or minimally guided astrophotography workflows using SharpCap as the central data source.
Attachments
Smart track system.jpg
Smart track system.jpg (332.2 KiB) Viewed 709 times
User avatar
admin
Site Admin
Posts: 17606
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Another Script - SMART TRACKING SYSTEM

#2

Post by admin »

Hi,

thanks for sharing your ideas - it sounds as though you are having a lot of fun creating custom scripting tools inside SharpCap. It's great to see this, since this is really the sort of thing I was hoping for when I added the scripting - people able to customize SharpCap to their own requirements and in ways that would not make sense for inclusion in the main program.

cheers,

Robin
Jean-Francois
Posts: 859
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Another Script - SMART TRACKING SYSTEM

#3

Post by Jean-Francois »

Hello,

Interesting.

Do you know about the ASCM functions RightAscensionRate and DeclinationRate ?

They are used for moving the mount (telescope) at the speed of a comet or asteroid.

I think that these functions can be used in your script, if the mount driver has these functions implemented.
After 2 or more images, you can calculate the drift in RA and DEC ... and then set the RightAscensionRate and DeclinationRate for moving the mount in the same direction. If after more images the drift reappear, then a new set *Rate can be calculated and send to the mount.

In the case of large drift, it could produce some elongated stars. If the mount moves in the drift direction, then no more elongated stars.
Note the RA PEC will be still visible on the images.

Regards,
Jean-Francois
nandojoe
Posts: 18
Joined: Wed May 06, 2026 4:15 pm

Re: Another Script - SMART TRACKING SYSTEM

#4

Post by nandojoe »

Thank you very much for your idea Jean. I´ll try to see what I can do (or do better) with this two function. I am now committed to putting together an astrometric mechanical integrity validation system.

In practice, it combines:

real mount movement;
plate solving;
angular error analysis;
live sky position validation;

to determine whether:

the telescope actually moved;
the motors successfully handled the load;
the axis slipped;
the mount stalled;
the telescope is unbalanced;
the commanded movement was physically executed.
Attachments
test.jpg
test.jpg (34.16 KiB) Viewed 686 times
Jean-Francois
Posts: 859
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Another Script - SMART TRACKING SYSTEM

#5

Post by Jean-Francois »

Hello,

for the Plate Solve ... which solver do you use ?
The integrated SharpSolve is very quick and useful, but I guess that a dedicated extern solver will produce more precise results.
SharpSolve has a reduced data set of the stars coordinates. Robin can explain a little bit. The solver calculates only the image centre and orientation.
The full astrometric calculation does more ... it calculates some polynomial fit for compensating of any distortion.
For SharpSolve and the index ... the question is : are the coordinates in the index the stars positions with proper motion of the stars at a defined J-epoch ? Also not the J2000 coordinates of the stars at the J-date 2000. For precise astrometry, you need the J2000 coordinates of the stars calculated with each individual proper motion for the date of observation. You want the coordinates for today, not a quarter century back :-)
Note ... it is the same question for the other Plate Solve software.

Regards,
Jean-Francois
Jean-Francois
Posts: 859
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Another Script - SMART TRACKING SYSTEM

#6

Post by Jean-Francois »

Hello,

I did a quick check of different Plate Solve software (SharpCap, PlateSolve 3.8, ASTAP 2026.03.25 and Prism 10).
Here the centre of an image (Live Stack ~ 300s) done few days ago with my RASA8 and QHY268 camera:

SharpCap 4.2 : 20h 22m 8.56s | 40° 15' 25.78"
PlateSolve 3.8 : 20h 22m 8.33s | 40° 15' 27.89"
ASTAP 2026 : 20h 22m 8.43s | 40° 15' 28.55"
Prism 10 : 20h 22m 8.52s | 40° 15' 27.84"

I remarked that different software used different reference pixel. So the coordinates could be little bit different only because it is not the same pixel on the image that is used as reference. Here PlateSolve3.8 and ASTAP2026 ... the value for CRPIX1 and CRPIX2 are different (1 and 3 pixel difference).
SharpCap_PlateSolve3.8_ASTAP.jpg
SharpCap_PlateSolve3.8_ASTAP.jpg (229.59 KiB) Viewed 648 times
Regards,
Jean-Francois
nandojoe
Posts: 18
Joined: Wed May 06, 2026 4:15 pm

Re: Another Script - SMART TRACKING SYSTEM

#7

Post by nandojoe »

Hello Jean.
I´m using Sharpsolve, because its solve my problem since the beginning and so I have neve tried other solve. But, following your suggestion, I´ll try another one (I´ll start with ASTAP).

I´ll compare both this weekend.

Thanks again for your help!!
Post Reply