The purpose of function getNorthAz is to make the cordwrap work even if the mount is powered up when the scope is not pointing at North. Since the CPC mount zeros the motor encoders at power up, getNorthAz compute the offset between North and scope direction at power up. This offset is subtracted in cordwrap angular computations. If the mount is not aligned, getNorthAz returns zero, otherwise it returns the real North azimuth.
Do you mean SkyPortal (SkySafari) driver? It connects to the indi server, not to the scope.
The 2000 port is a port of the Wi-Fi module in the telescope. You can connect to it with CAUX driver, Celestron SkyPortal or SkySafari.
The SkySafari *driver* speaks LX200 protocols on different port and acts as a bridge between indi server and the SkySafari application.
Quick follow-up about signedness of angles in AUX commands. I have reviewed my notes and it seems that the angles are indeed 24bit unsigned ints which are farctional full rotations. So 360deg = 2^24 in the angle field.
Thanks! Ok, so I'm thinking about the tracking & guiding now.
1. Equatorial Mode: Mount is tracking sidereally (or using custom rate), so the driver should not perform any active tracking on its own beyond that. Guiding pulses are sent directly to the mount via AUX commands.
2. Alt-Az mode: Is the Celestron on-board controller doing any tracking on its own? or it purely expects MC_SET_POS_GUIDERATE and MC_SET_NEG_GUIDERATE ? If the latter, then the AUX documents suggests we do this every 30 secs (why)? What if we perform the variable rate adjustments each second? Furthermore, since we are actively tracking now by calculating the difference between current and target alt-az position, how does guiding come in the picture? If we use the regular AUX Guide pulses, this would actually shift out tracking target slightly in the sky by a couple of steps. But then the active tracking computes current vs. target positions and does not account for guiding, so it ends up fighting back[/b] any guide pulses.
So before I continue down this path, I wanted to know your thoughts on this. Thanks!
The initial driver was intended only for the AltAz mount, like the Evolution. The Eq mode is an afterthought. Nevertheless, the same approach will still work for Eq, since no mount is perfectly aligned and the input from the alignment routines can be still used to correct rates in Dec and RA - thus eliminating the necessity for very precise polar alignment. Thus, I would not switch to a completely different tracking mode for Eq mounts. Since the standard Eq mode (sidereal rate in RA + guiding pulses) is much simpler, it should be fairly easy to add it as a switchable option. Remember that not everyone has a guider - thus removing corrective guiding would make the driver less functional. As for the fight between the tracking and guiding pulses: I do not know really. But, I think that it should be fine since we are controlling the speed not the position and the target position is not changing. Thus, we are correcting only the errors of the mount not the tracking rates and target position.The motor controllers handle constant angular velocity and two types of goto movements. You specify angles for the gotos, and then you specify the tracking rates in both axis (with MC_SET... commands). These rates are constant - if you switch off the driver or lose the connection, the scope will keep rotating with constant angular velocity. That is why it may be unsafe to operate without limit switches or supervision. The 30s period is arbitrary and probably fine for visual observing. It is definitely not enough for high-Alt positions (the AZ rate changes rapidly). We are actually sending adjustments every second in the current driver based on +/- one-minute position difference. The controllers seem to have no problem with this rate of adjustments. In my view the guiding does not shift the position on the sky it only corrects for the errors in the mount. The tracked position (thus also tracking rates) does not change. So in this respect we should be fine as long as we are not reading back the encoder positions to modify the rates. The first version of the driver actually did just that, and I had huge difficulties with making it consistent. At present, the tracked position is changed only when we use movement controls. But in this case we are supposed to move the tracked position on the sky (that is an assumption).
Do not hesitate to ask if something is still unclear. The interplay between tracking, guiding and manual movement is really tricky to get right. I do not think we can avoid making some assumptions. Otherwise, there are simply too many degrees of freedom.
One more thought. I really do not know what happens after the guide pulse. I guess encoders got updated, and the effect is the same as would be if we moved the mount with slew commands. But this is just my guess. It is possible that the MC hides this update and subtracts the guided angle from the reported position. In other words: if the position on the axis does not change after guide pulse, we are good. Otherwise, we need to do this subtraction in the driver by keeping track of the guiding shifts - this may be tricky but seems doable (the guiding pulses are simulated anyway, thus there is a strict relation between length of the pulse and actual number of steps shifted).
Last night there was some nice weather and I decided to run a bunch of tests of a current driver. Most of my previous comments and conclusions stands, but I have a little bin more data and some additional conclusions and comparisons.
It was run with astroberry compiled caux and other drivers and kstars compiled from git.
My setup was deliberately sloppy - no precise levelling or pointing. I just moved my mount to the balcony, connected, it levelled the tube with marks on the mount and started.
First, I checked the "point to the moon" scenario - it does not work. Here we are worse than skyportal/skysafari. It <em>should</em> work if we would have all our ducks in the row in the alignment subsystem. It should be able to handle the rigid rotation in both axis (shifted zeros) without any problems. Something is wrong either in my handling of the plugins or in the plugins themselves. So Maciek was <em>right</em>. Jasem, please during your refactor pay attention to my usage of the alignment routines. They are programmed after one of the tutorials, but maybe I did something wrong. BTW, instructions of skyportal tell us to do the same and I remember it got confused few times when I didn't.
The alternative scenario: point to the northern horizon (my pointing was +/-10deg approx), do a goto some object, center it and sync, repeat two more times. This works fine even with visual centering (no plate solver). The result was adequate for visual observing.
A similar procedure with plate solver and sync points (30-60deg) around the target worked much better.
By doing 3-7 sync points, I was able to reach the field rotation barrier with my expositions (60-120s).
I run the setup alternatively between skysafari and indi by disconnecting the CAUX driver and connecting SS. Without dropping calibration in both. It worked for at least four cycles. I synced the positions in SS on bright stars and live view in the camera. The first was a bit tricky, but the rest were easy. I had to go outside only once during the run.
There seems to be no large qualitative difference between these drivers. The SS is a bit smoother in operation (being on the tablet). There seems to be some quantitative advantage to SS with alignment. It is more tolerant and the accuracy falls off slower with the distance.
Both internal and SVD plugin worked similarly with a small edge towards internal. The nearest plugin did not track.
Maybe this will help Jasem in identifying weak and strong places to work on/transplant to his refactored driver and help users getting the current driver working.
Ok tested on Magnus's CGE-Pro via PC port. While I can read from the mount, issuing GOTO has no response at all. Any idea what would cause this? Anyone with an equatorial mount can checkout the branch?