Closed JPhilC closed 1 year ago
Many years ago, when the alignment was first discussed, the issue of observation errors in three-point alignment was raised. I don't recall the exact details, but the Taki method includes an investigation of the errors introduced by the point selection. Is that what you are referring to when you mention "the tolerance distance "? In the Taki method, small differences between the RA's or DEC's of the chosen alignment points can have a large effect on the accuracy of the transformation matrix. So points chosen should have the largest RA difference and DEC difference for all three points to minimise the effect that the observation errors have on the calculations.
On Mon, Jan 16, 2023 at 9:53 PM JPhilC @.***> wrote:
The original machine learning, best fit , approach to alignment has been removed. The DLL projects have been deleted.
In its place the Alignment folder in the GS.Server project has been extended to include all alignment logic.
At it's code the new alignment logic uses the same approach as EQMOD. When calculating the axis positions for a slew the logic looks for 3 alignment points near to the target position. The three points (or rather the corrections recorded at the 3 positions) are then used to calculate a transformation matrix which is used to determine the actual axis position required.
When determining the currently coordinates for the mount a reverse transformation matrix is calculated that is applied to the actual (raw) axis positions of the mount. The resulting axis positions are the fed into the existing logic for determining RA/Dec etc.
Using options on the alignment tab the user control how the 3 alignment points are calculated. It can use take the nearest 3 points or it can take the nearest 3 points that create a triangle enclosing the target position (n-Star). The can also choose with n-Star they can also choose whether to use the nearest 3 points than for a triangle enclosing the target position or they can use the points that create a triangle whose centroid is nearest the target position. Then can also choose whether to limit the search for alignment points to just the same pier side, the same quadrant or to consider all alignment points.
It is also possible to set a tolerance in arcseconds to allow alignment points to be replaced. When an alignment point is created any existing points closer than the tolerance distance will be removed. Effectively replace them with the new alignment point.
You can view, comment on, or merge this pull request online at:
https://github.com/rmorgan001/GSServer/pull/39 Commit Summary
- 66e970f https://github.com/rmorgan001/GSServer/pull/39/commits/66e970fb32119b2ae5d1127ac1b002c1e47f516c Eqmod Alignment integration WIP commit.
- 64fa839 https://github.com/rmorgan001/GSServer/pull/39/commits/64fa83909c1d5e6a8914eaecc7b49d9c09cf3d21 Merging Robs advance check box.
- 82ebfa5 https://github.com/rmorgan001/GSServer/pull/39/commits/82ebfa5b3280f9deb6b6a7803573316e8ecefdaf Removing code to allow a mount type of AstroEQ that was put in prior to Robs Advanced Command check box.
- 044c540 https://github.com/rmorgan001/GSServer/pull/39/commits/044c5402293fd02e8edd4102e5fc6976ebe80ddb WIP Check in, working on unit tests for save and loading alignment points and building Taki and Affine matrices compared to Eqmod values.
- 41efbb1 https://github.com/rmorgan001/GSServer/pull/39/commits/41efbb15b25606bcbcb31dbe7c75b5edc80c3a35 WIP check-in. The coordinate type (PolarSpherical, Cartes2Polar etc) seem to be producing the same results as EQMOD (tests with one point in each quadrant). Matrix mapping is not working yet.
- 1411b5f https://github.com/rmorgan001/GSServer/pull/39/commits/1411b5f03654f7055a98252f4ad16cbd74f64f3e TestMarices and Delta_Matrix_Reverse_Map now passing unit tests comparing to EQMOD.
- 03c7159 https://github.com/rmorgan001/GSServer/pull/39/commits/03c7159a681d08aa48b19a77342acbe60d7585e6 WIP: Synching now records what looks like sensible encoder positions. Moved EqmodNStarAlignment from .NET Std 2.0 to .NET Framework 4,7,2 to be compatibl with GS.Principles which it references. Removed old NStarAlignment project.
- 03b4033 https://github.com/rmorgan001/GSServer/pull/39/commits/03b403386267e66a21a873873c7454732f1a06ce Fixed Test project.
- 26c2c6c https://github.com/rmorgan001/GSServer/pull/39/commits/26c2c6c8b7415ca4a65dad289af8ba6f00c0eaae Expanded alignment code to include Taki transformations and goto target mapping.
- 6f6e837 https://github.com/rmorgan001/GSServer/pull/39/commits/6f6e8370d258780825e41f6e56d682f5a8adf0c0 Delta_Matrix_Map which is used for N-Star Goto is now testing correctly compared to EQMOD.
- a9e11fb https://github.com/rmorgan001/GSServer/pull/39/commits/a9e11fbe6b5d16318b06865024acd6cb2dd0c24c DeltaSync_Matrix_Map and DeltaSyncReverse_Matrix_Map are now testing compared to EQMOD results to within 25 arc seconds.
- 310e17e https://github.com/rmorgan001/GSServer/pull/39/commits/310e17ee3eb07a53d1ef3a63e20d97e4f864cdce Working on alignment settings in UI.
- b280be8 https://github.com/rmorgan001/GSServer/pull/39/commits/b280be8a9cba7c95e080cca279f7f834bfdbabce Update UI for AlignmentModel settings. Also fixed proximity check to use angular distance between points.
- f2e2379 https://github.com/rmorgan001/GSServer/pull/39/commits/f2e237989b7fccd45e8ab5795a18f786ca518127 Fixing spherical->polar conversions so that the quadrants can be compared correctly.
- 30e3842 https://github.com/rmorgan001/GSServer/pull/39/commits/30e38420e0eaf7e863b1fa337f4efdbe12cffd6d Updated model to use nearest point if there are less than 3 points available.
- 05648f7 https://github.com/rmorgan001/GSServer/pull/39/commits/05648f7eba68d56102d429051ac7ef1735cab2bf Removed AlignmentPoint OrigRaDec property as it is irrelevant.
- 7130058 https://github.com/rmorgan001/GSServer/pull/39/commits/7130058d9fe85a748f1e978388f8bd02f8eeabfb Merge pull request #3 from rmorgan001/master
- d2401a1 https://github.com/rmorgan001/GSServer/pull/39/commits/d2401a17da86ad0c7af2d44375c44169d4335dd6 Merge branch 'master' into AngleBasedAlignment
- 958cd97 https://github.com/rmorgan001/GSServer/pull/39/commits/958cd976ac56cab7aea187c3f1d80bfc299cd8a8 Merge pull request #4 from JPhilC/AngleBasedAlignment
- d28797b https://github.com/rmorgan001/GSServer/pull/39/commits/d28797bedb4f52d7ae74bd45bdd6482707e73773 Removing unused projects.
- 627f387 https://github.com/rmorgan001/GSServer/pull/39/commits/627f387830dfc5bf9b4ebb8736135b6cdf141dc9 Merge pull request #5 from rmorgan001/master
- 455b677 https://github.com/rmorgan001/GSServer/pull/39/commits/455b67710caaec8b9c7800b18faae4aa0463d06c Adding reference to LiveCharts and collection properties ready fo adding graphical representation of alignment points.
- 342bbe7 https://github.com/rmorgan001/GSServer/pull/39/commits/342bbe73ae8cb03c3ae5f1f8b1cb02ceb7201ba8 Merge branch 'master' of https://github.com/JPhilC/GSServer
- 48cc7cc https://github.com/rmorgan001/GSServer/pull/39/commits/48cc7cc22c6df3923081ba881e7ea96b25bcb600 Made Resharper suggested alterations.
File Changes
(44 files https://github.com/rmorgan001/GSServer/pull/39/files)
- M .gitignore https://github.com/rmorgan001/GSServer/pull/39/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947 (3)
- M GS.Ascom.SkyTelescope/CommandStrings.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-8cec48b099e6395711e25b7ff065d14c3b86961b6e916a4c9388e4ceaef0afd3 (6)
- M GS.Ascom.SkyTelescope/Telescope.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-1a58ed521fa86a614daea158f49b63ae6ffa2be2ac389b2ab299804383f710ed (41)
- A GS.Server/Alignment/AlignmentModel.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-c3c12c866184af0469758ec557d6f4a5c967371ab259dd761f3ff593c3521214 (456)
- A GS.Server/Alignment/AlignmentModel_EqModVector.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-fa2330b5addfb1e5009b4d302d4ffe96fb5fb75f5066097f5569a7408ded5950 (1533)
- A GS.Server/Alignment/AlignmentModel_EqmodAlignment.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-19e95f305b9cea7e6e76e7f95a689d29524b977df7b3e4e6477b1bdf723ba86c (82)
- A GS.Server/Alignment/AlignmentModel_Goto.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-eb1801f25095c58b6d9a9fe9722cfd851f2cf077f9f45509fff87b1b8ce92464 (80)
- A GS.Server/Alignment/AlignmentModel_Math.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-98ad9a7451d4576236a79cd003ff32c1571645d50f6405785a214d20b8013b84 (334)
- A GS.Server/Alignment/AlignmentPoint.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-717e45ef71e30136f6932d3e95b5ee1ec982624fbe96cef4bb682ca789e544e8 (131)
- M GS.Server/Alignment/AlignmentSettings.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-dffc150340cf3a3f937e386bfbd09871b18805a7cd3e4cd0d1d0c98e9e904c59 (45)
- M GS.Server/Alignment/AlignmentV.xaml https://github.com/rmorgan001/GSServer/pull/39/files#diff-b8dff5c76b1a7980e37c8f0ff7079bb05a0a147d4b64e59bc923e6e5eb88e8be (123)
- M GS.Server/Alignment/AlignmentVM.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-a994c70dad63f963b31b88ff8dcc91488c344f27a91dede7a01c467ccae3f45f (75)
- A GS.Server/Alignment/AxisPosition.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-f26754b9f050e8570719cbf7fa4d431971a8be1039c14d8fb3c578623f73e2b4 (200)
- A GS.Server/Alignment/EqascomDataTypes.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-c882bab31a8d6ea5bfcc9e90011469cd191ab0e9c470ef1a836f8549ab32ce9f (145)
- A GS.Server/Alignment/MapResult.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-0b36acf9a44f1f4c016119266cbf148e1532e14a99730fe9f9d1cafdfaf2a69f (13)
- M GS.Server/App.config https://github.com/rmorgan001/GSServer/pull/39/files#diff-eedb5873ecb8ac95b2fcd27499df8501a49cf443c5d14758165e9c971f76c246 (20)
- M GS.Server/Focuser/FocuserVM.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-3262fe3cf8d3b81d8f68352c325b8c72ef45b763b9bb373943d667485505e788 (1)
- M GS.Server/GS.Server.csproj https://github.com/rmorgan001/GSServer/pull/39/files#diff-f93ed326da5012955bbbc15b1ee0d3b39bda7a25c66b5f970ff85466d79de555 (1)
- M GS.Server/Properties/Alignment.Designer.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-3eafb5cc190771ee5e0ea3dfd6966703f24e2fa58ae9e50eebb6b95a6bfdec89 (42)
- M GS.Server/Properties/Alignment.settings https://github.com/rmorgan001/GSServer/pull/39/files#diff-63052ba5628ecb0d63fd79412ad4b97a956b55b52dfb4b8f0265ccea5d943095 (13)
- M GS.Server/Properties/launchSettings.json https://github.com/rmorgan001/GSServer/pull/39/files#diff-0ffb3de34851c52677be59dbe624572cda03dda1059f235b38894a7c2fa58794 (2)
- M GS.Server/SkyTelescope/Axes.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-aa6e070c1e8572bb9ca724aea6f1c59c2a0b31bff3cfd03808133b6ac7d31f1a (2)
- M GS.Server/SkyTelescope/SkyServer.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-399a7ec328aa693308bfe075bc208d8bc1956419d5a354d3570b4800af410158 (280)
- A GS.Shared/Domain/EnumTypeConverter.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-3a2eebf97bc7468054e9e0202e989a0c4d6c779b1e292c2bba1e6c6f3eef1598 (57)
- A GS.Shared/Domain/EnumValueBindingSourceExtension.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-c080eac794f7063eebb19cb5882398c16cac16ff4825a874123cd85747f410c4 (71)
- M GS.Shared/Languages/StringResServer_en-us.xaml https://github.com/rmorgan001/GSServer/pull/39/files#diff-80902044455fadca427bc6f042d27c4a5ab9cee7dfd75f7b8f98bee268dfacc2 (10)
- M GS.Shared/Model3D.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-80259f32520fe1fa762d3e53c269f944c131e3f88475bf8f9cbbe91a14aa259d (2)
- M GS.SkyWatcher/Commands.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-79fc612bbe3a31b517794f84fe7e19236e80306899b3026f69a4c02958e02ff6 (2)
- M GSSolution.sln https://github.com/rmorgan001/GSServer/pull/39/files#diff-29b202371061b49029e631255b33a1240399528f94c5eaaf374e9098c5aa3c2f (20)
- D MigrationBackup/67336608/NStarAlignment/NStarAlignment.csproj https://github.com/rmorgan001/GSServer/pull/39/files#diff-6dd45cb18442e86f450c0c50b07bf6b9f5dd2b91914f56bb62df210e3dd11ca4 (88)
- D MigrationBackup/67336608/NStarAlignment/NuGetUpgradeLog.html https://github.com/rmorgan001/GSServer/pull/39/files#diff-3863c7986a29d8706db7d97d9ee9a55c3ed87962ed42bfffd8cdc5f4102d655f (162)
- D MigrationBackup/67336608/NStarAlignment/packages.config https://github.com/rmorgan001/GSServer/pull/39/files#diff-f9d98b693c91f6cd958716257cf84745b3810162fd94b602f392c6c11b17de41 (4)
- D MigrationBackup/ec178c51/NINA/NINA.csproj https://github.com/rmorgan001/GSServer/pull/39/files#diff-d38de19b7fb9b1a35880fb47703db22f50f214bf42f50585892791b419fa2007 (92)
- D MigrationBackup/ec178c51/NINA/NuGetUpgradeLog.html https://github.com/rmorgan001/GSServer/pull/39/files#diff-e32e0b4c216f9baf53c8e9de833762732927ad0f735b547ecd92a195e1ebd070 (162)
- D MigrationBackup/ec178c51/NINA/packages.config https://github.com/rmorgan001/GSServer/pull/39/files#diff-4789a1ca2fc321a9cb747d6b50cfa6d7ed6c2143b910176b6bff8c9e8012e91b (4)
- M NINA/Model/MyFocuser/AscomFocuser.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-e9a57e9a405eef566f3ba5dab210082e0777cf6df4a35f2e0826386d25f8aed7 (4)
- D NStarAlignment.Tests/MatrixTests.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-a3fe7fe12594290e4936dd3fd5d93ad2982865bcef54a0c5fcddb28e282e276d (79)
- D NStarAlignment.Tests/NStarAlignment.Tests.csproj https://github.com/rmorgan001/GSServer/pull/39/files#diff-ba94642515fb12f37a0596c1c2aac984a8c58402674ada40dc37ca1759ea3e9a (80)
- D NStarAlignment.Tests/NStarTriangleCentre.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-599b8ce73840e5342fde09c179edeead1dbe4d8906c1172d1015c940f7281467 (182)
- D NStarAlignment.Tests/NearestTriangleCentre.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-2082d99b13347fcc4681f179add8559b732707c4e4a86f81824ba57181a36e7b (182)
- D NStarAlignment.Tests/Properties/AssemblyInfo.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-51ef99ef2f7cfca578f6fc2fb95ef75aee2b007a0997ed7bd5888ee00fc4d25c (19)
- D NStarAlignment.Tests/SphericalPolarTests.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-6523ac9150e7f9f5110b9590ee2b841a5af62649fb50dfbed96ced7d9f819b9c (479)
- D NStarAlignment.Tests/TimeUtils.cs https://github.com/rmorgan001/GSServer/pull/39/files#diff-8544f07a88c5e0980a05d6447ebb1e584ebb5764afe8c8e64159a4fbf501934e (140)
- D NStarAlignment.Tests/packages.config https://github.com/rmorgan001/GSServer/pull/39/files#diff-9b63581b9f695b95713de6978e2c078292118b2d07c5941fc6895edc8784a88a (5)
Patch Links:
- https://github.com/rmorgan001/GSServer/pull/39.patch
- https://github.com/rmorgan001/GSServer/pull/39.diff
— Reply to this email directly, view it on GitHub https://github.com/rmorgan001/GSServer/pull/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRN2J26IDXDJ4VLB5WCEZTWSUZCPANCNFSM6AAAAAAT4U2X7A . You are receiving this because you are subscribed to this thread.Message ID: @.***>
No it is simply to allow you to correct a mis-synced point. If you sych again on the same star and the included arch distance between the original and the second sync is less than the value set then the first point is removed.
Interestingly you mention the Taki method. This is only used when calculating the transformation for gotos. See the Delta_Matrix_Map method in the AlignmentModel_Math.cs file. When going from the sky back to the mount the logic calculates an Affine transformation matrix, see Delta_Matrix_Reverse_Map in the same file.
I don't know why this is the case, possibly someone around at the time will remember. Possibly it was a performance thing. I would be interested to know the reason why.
I have no great theoretical understanding of the logic used. So far I have simply taken the EQMOD code, converted the salient parts to C# and made it more object orientated and data binding friendly. I also modified it where necessary to work with GSS axis positions that are already in degrees or radians whereas the VB code is working in encoder step positions. What is not reflected in the checked-in code are the unit tests that I ran on an earlier draft of the code to make sure that at a functional level the C# code returned the same results for the same input as the VB code.
If you read Toshimi Taki's original paper he works with Alt/Az angles. The EQMOD code works with Cartesian coordinates for both the Taki calcs and the Affine calcs. Years ago when I first attempted a conversion of the EQMOD code this threw me. At that time I could only read the code, not run it in the VB6 development environment and step through it. This time I have just accepted that it works without questioning why!
I think the original code from Mon was based on RA/DEC. The encoder counts directly translate to RA/DEC since they are zeroed when pointed to the celestial pole. I have attached the earliest code that I kept (~2006) where the Taki method using n-star alignment basic functions were being integrated. The functions include cartesian co-ordinate translation and RA/DEC based alignment. A comment from the code:
'Implement a TAKI transformation on a Polar coordinate system
'This is done by converting the Polar Data to Cartesian, Apply TAKI transformation
'Then restore the transformed Cartesian Coordinates back to polar
A little bit historical and probably not relevant to the current code base. Thankyou for the great work, Cheers Archie releasenotes.txt [From_V112l.zip](https://github.com/rmorgan001/GSServer/files/10429890/From_V112l.zip)
The original machine learning, best fit , approach to alignment has been removed. The DLL projects have been deleted.
In its place the Alignment folder in the GS.Server project has been extended to include all alignment logic.
At it's code the new alignment logic uses the same approach as EQMOD. When calculating the axis positions for a slew the logic looks for 3 alignment points near to the target position. The three points (or rather the corrections recorded at the 3 positions) are then used to calculate a transformation matrix which is used to determine the actual axis position required.
When determining the currently coordinates for the mount a reverse transformation matrix is calculated that is applied to the actual (raw) axis positions of the mount. The resulting axis positions are the fed into the existing logic for determining RA/Dec etc.
Using options on the alignment tab the user control how the 3 alignment points are calculated. It can use take the nearest 3 points or it can take the nearest 3 points that create a triangle enclosing the target position (n-Star). The can also choose with n-Star they can also choose whether to use the nearest 3 points than for a triangle enclosing the target position or they can use the points that create a triangle whose centroid is nearest the target position. Then can also choose whether to limit the search for alignment points to just the same pier side, the same quadrant or to consider all alignment points.
It is also possible to set a tolerance in arcseconds to allow alignment points to be replaced. When an alignment point is created any existing points closer than the tolerance distance will be removed. Effectively replace them with the new alignment point.