Coordinates value exactly at the Pole


Charles
 

Hi Francois,

I spend a bit time yesterday on that topic. and probably it is easier for us to change a bit Markus Noga lib.
Currently Markus lib derived 2 angles from the matrix... A solution is to extract euler angles from the rotation Matrix.
https://www.geometrictools.com/Documentation/EulerAngles.pdf

Now the game is to find the right rotation sequences for the different task.
  1. Probably for the instrument rotation relative to the horizontal we can just take an arbitrary rotation sequence.
  2. For the instrument we have first a Rotation over the Z axe then X then Y (field rotator)
For the horizontal to sky coordinates we have the following sequence
Rotation over X (for the latitude) then Rotation over  Z (for the hour angle) then Rotation over X (for the declination)

I would be happy if we could have a call before I put to much energy in the wrong direction.

Charles


Charles
 
Edited

if one of you has time to review the changes, they are on this branch
https://github.com/charleslemaire0/TeenAstro/tree/Release_1.4_Refactor_trafo_instr2sky

Charles


 

Hi Charles:
 
I had a look at the new code, and I am sorry I don't understand how this works. Would it be possible to write a short document that explains how we change the current alignment matrix that cannot compute the hour angle around the pole, to another system that does?
 
Thanks 
François
 
I would be happy to make a call, but not this week since I am away from home, returning 18 March

On 11/03/2023 11:50 CET Charles <charleslemaire37@...> wrote:
 
 
Hi Francois,

I spend a bit time yesterday on that topic. and probably it is easier for us to change a bit Markus Noga lib.
Currently Markus lib derived 2 angles from the matrix... A solution is to extract euler angles from the rotation Matrix.
https://www.geometrictools.com/Documentation/EulerAngles.pdf

Now the game is to find the right rotation sequences for the different task.
  1. Probably for the instrument rotation relative to the horizontal we can just take an arbitrary rotation sequence.
  2. For the instrument we have first a Rotation over the Z axe then X then Y (field rotator)
For the horizontal to sky coordinates we have the following sequence
Rotation over X (for the latitude) then Rotation over  Z (for the hour angle) then Rotation over X (for the declination)

I would be happy if we could have a call before I put to much energy in the wrong direction.

Charles


John Archbold
 

Hi All,
If I understand correctly, the existing code used the transformation library is used to transform the target location in cartesian co-ordinates (x, y, z). Any transformations (e..g. for mount misalignment) are applied to these cartesian values. If the scope is pointing to the pole, the values become (0, 0, 0) so tracking fails for rotation in RA. Although the scope should be rotating in RA, the cartesian co-ordinates indicate that it is 'at target'.

Using euler angles, the target location is specified as (angle(lat), angle(RA), angle(DEC)). The transfomation library transforms the three angles rather than cartesian cordinates. Tracking in RA succeeds, because it is one of the angles.

Is my understanding correct?
Archie


Charles
 

Yes exactly 👍

currently we have a vector that is pointing to  a direction in the sky. And I would like to migrate to rotation matrix and compute the euler angles from the resulting matrix.

The field rotator is then also supported for free :)

I am implementing some example that illustrates how it works. And then I will modify the main unit

Charles


Le sam. 11 mars 2023, 23:51, John Archbold <jmarchbold@...> a écrit :
Hi All,
If I understand correctly, the existing code used the transformation library is used to transform the target location in cartesian co-ordinates (x, y, z). Any transformations (e..g. for mount misalignment) are applied to these cartesian values. If the scope is pointing to the pole, the values become (0, 0, 0) so tracking fails for rotation in RA. Although the scope should be rotating in RA, the cartesian co-ordinates indicate that it is 'at target'.

Using euler angles, the target location is specified as (angle(lat), angle(RA), angle(DEC)). The transfomation library transforms the three angles rather than cartesian cordinates. Tracking in RA succeeds, because it is one of the angles.

Is my understanding correct?
Archie


Charles
 

Hi Archie

Here is the sample to convert from HA, DEC,LAT, EQ Field rotation to alt az field rotation.
https://github.com/charleslemaire0/TeenAstro/tree/Release_1.4_Refactor_trafo_instr2sky/libraries/TeenAstroCoordConv/examples/test3
I am so happy that it works :)
I will enjoy the evening and watch a bit TV

Charles


John Archbold
 

Hi Charles
I will try it out in the southern hemisphere after breakfast🥐
Have a great night 
Archie 

On Tue, 14 Mar 2023 at 6:49 am, Charles <charleslemaire37@...> wrote:
Hi Archie

Here is the sample to convert from HA, DEC,LAT, EQ Field rotation to alt az field rotation.
https://github.com/charleslemaire0/TeenAstro/tree/Release_1.4_Refactor_trafo_instr2sky/libraries/TeenAstroCoordConv/examples/test3
I am so happy that it works :)
I will enjoy the evening and watch a bit TV

Charles


Charles
 

Hi,

I am almost done with the example and the test....

here you can find how it works when a mount misalignment is defined:
https://github.com/charleslemaire0/TeenAstro/blob/Release_1.4_Refactor_trafo_instr2sky/libraries/TeenAstroCoordConv/examples/test2/test2.ino

is this case the misalignment is just an Equatorial Mount without any error


Charles
 
Edited

Hi developper Team,

The first version of the Main Unit with the new transformation pipeline is done and ready for code review:
https://github.com/charleslemaire0/TeenAstro/tree/Release_1.4_Refactor_trafo_instr2sky/

@Francois could you check that the Main unit is working correctly with your test software
@Armando, @Archie it would be nice if you review the change :)

I am happy that this issue is finally fixed and that the path is prepared to support a field Rotator.

Charles


 

Hi Charles:

I synchronized on this branch. It appears to work (RA does update when I activate E or W at the pole), but I am unable to test with mountSim because the command GXP1 (which returns the RA axis angle in degrees) returns in fact the declination angle. I checked the code and it is missing a break statement. What is weird is that it still fails even if I add the break statement. 

François


  case 'P':
    // :GXPn# Intrument position
    switch (command[3])
    {
    case '1':
      cli();
      f1 = staA1.pos / geoA1.stepsPerDegree;
      sei();
      doubleToDms(reply, &f1, true, true, highPrecision);
      strcat(reply, "#");

** should have a break statement here **

    case '2':
      cli();
      f1 = staA2.pos / geoA2.stepsPerDegree;
      sei();
      doubleToDms(reply, &f1, true, true, highPrecision);
      strcat(reply, "#");
    }
    break;




On 24 Mar 2023, at 20:35, Charles <charleslemaire37@...> wrote:

Hi developper Team,

The first version of the Main Unit with the new transformation pipeline is done and ready for code review:
https://github.com/charleslemaire0/TeenAstro/blob/Release_1.4_Refactor_trafo_instr2sky/libraries/TeenAstroCoordConv/

@Francois could you check that the Main unit is working correctly with your test software
@Armando, @Archie it would be nice if you review the change :)

I am happy that this issue is finally fixed and that the path is prepared to support a field Rotator.

Charles


Charles
 

I can reproduce what you describe and I am working on this I had already one time that the command doesn't switch at the right place

Charles

Am Sa., 25. März 2023 um 15:00 Uhr schrieb François Desvallées via groups.io <fdesvallees=mailbox.org@groups.io>:

Hi Charles:

I synchronized on this branch. It appears to work (RA does update when I activate E or W at the pole), but I am unable to test with mountSim because the command GXP1 (which returns the RA axis angle in degrees) returns in fact the declination angle. I checked the code and it is missing a break statement. What is weird is that it still fails even if I add the break statement. 

François


  case 'P':
    // :GXPn# Intrument position
    switch (command[3])
    {
    case '1':
      cli();
      f1 = staA1.pos / geoA1.stepsPerDegree;
      sei();
      doubleToDms(reply, &f1, true, true, highPrecision);
      strcat(reply, "#");

** should have a break statement here **

    case '2':
      cli();
      f1 = staA2.pos / geoA2.stepsPerDegree;
      sei();
      doubleToDms(reply, &f1, true, true, highPrecision);
      strcat(reply, "#");
    }
    break;




On 24 Mar 2023, at 20:35, Charles <charleslemaire37@...> wrote:

Hi developper Team,

The first version of the Main Unit with the new transformation pipeline is done and ready for code review:
https://github.com/charleslemaire0/TeenAstro/blob/Release_1.4_Refactor_trafo_instr2sky/libraries/TeenAstroCoordConv/

@Francois could you check that the Main unit is working correctly with your test software
@Armando, @Archie it would be nice if you review the change :)

I am happy that this issue is finally fixed and that the path is prepared to support a field Rotator.

Charles


Charles
 

Hi François,
It is fixed . you can update. ;)
charles


Charles
 

when I run the autotest.py I receive this error:
Traceback (most recent call last):
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 385, in <module>
    Application(options)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 312, in __init__
    self.pp = pointingPlot(self.window, self.ts, self.ta)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\pointingPlot.py", line 27, in __init__
    self.ax.set_rticks([0,15,30,45,60,75,90],fontsize=20)  # radial ticks
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\projections\polar.py", line 1288, in set_rticks
    return Axes.set_yticks(self, *args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axes\_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axis.py", line 2072, in set_ticks
    raise ValueError('labels argument cannot be None when '
ValueError: labels argument cannot be None when kwargs are passed

I hope I install all the py  module correctly

Charles

Am Sa., 25. März 2023 um 15:52 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:

Hi François,
It is fixed . you can update. ;)
charles


 

Difficult to diagnose. Could be due to wrong communications, I will add some tests at startup.
Try to run mountSim.py which has fewer dependencies.

I tried your latest fix. GXP1 works now, but I think there is something wrong in the coordinates transformation: Here are the mount positions I get:


North



South


East and West are correct. I tried reversing the Dec axis but it is still wrong (North points South and vice-versa).


West

East


On 25 Mar 2023, at 16:21, Charles <charleslemaire37@...> wrote:

when I run the autotest.py I receive this error:
Traceback (most recent call last):
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 385, in <module>
    Application(options)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 312, in __init__
    self.pp = pointingPlot(self.window, self.ts, self.ta)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\pointingPlot.py", line 27, in __init__
    self.ax.set_rticks([0,15,30,45,60,75,90],fontsize=20)  # radial ticks
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\projections\polar.py", line 1288, in set_rticks
    return Axes.set_yticks(self, *args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axes\_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axis.py", line 2072, in set_ticks
    raise ValueError('labels argument cannot be None when '
ValueError: labels argument cannot be None when kwargs are passed

I hope I install all the py  module correctly

Charles

Am Sa., 25. März 2023 um 15:52 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:
Hi François,
It is fixed . you can update. ;)
charles




Charles
 

I found the root cause the new transformation Pipeline compute azimuth from the Sud. 

Charles 

Le sam. 25 mars 2023, 16:33, François Desvallées via groups.io <fdesvallees=mailbox.org@groups.io> a écrit :
Difficult to diagnose. Could be due to wrong communications, I will add some tests at startup.
Try to run mountSim.py which has fewer dependencies.

I tried your latest fix. GXP1 works now, but I think there is something wrong in the coordinates transformation: Here are the mount positions I get:


North



South


East and West are correct. I tried reversing the Dec axis but it is still wrong (North points South and vice-versa).


West

East


On 25 Mar 2023, at 16:21, Charles <charleslemaire37@...> wrote:

when I run the autotest.py I receive this error:
Traceback (most recent call last):
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 385, in <module>
    Application(options)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 312, in __init__
    self.pp = pointingPlot(self.window, self.ts, self.ta)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\pointingPlot.py", line 27, in __init__
    self.ax.set_rticks([0,15,30,45,60,75,90],fontsize=20)  # radial ticks
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\projections\polar.py", line 1288, in set_rticks
    return Axes.set_yticks(self, *args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axes\_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axis.py", line 2072, in set_ticks
    raise ValueError('labels argument cannot be None when '
ValueError: labels argument cannot be None when kwargs are passed

I hope I install all the py  module correctly

Charles

Am Sa., 25. März 2023 um 15:52 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:
Hi François,
It is fixed . you can update. ;)
charles




Charles
 

Hi Francois,

You can update and check if it is working correctly

Charles

Am Sa., 25. März 2023 um 23:39 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:

I found the root cause the new transformation Pipeline compute azimuth from the Sud. 

Charles 

Le sam. 25 mars 2023, 16:33, François Desvallées via groups.io <fdesvallees=mailbox.org@groups.io> a écrit :
Difficult to diagnose. Could be due to wrong communications, I will add some tests at startup.
Try to run mountSim.py which has fewer dependencies.

I tried your latest fix. GXP1 works now, but I think there is something wrong in the coordinates transformation: Here are the mount positions I get:


North



South


East and West are correct. I tried reversing the Dec axis but it is still wrong (North points South and vice-versa).


West

East


On 25 Mar 2023, at 16:21, Charles <charleslemaire37@...> wrote:

when I run the autotest.py I receive this error:
Traceback (most recent call last):
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 385, in <module>
    Application(options)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 312, in __init__
    self.pp = pointingPlot(self.window, self.ts, self.ta)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\pointingPlot.py", line 27, in __init__
    self.ax.set_rticks([0,15,30,45,60,75,90],fontsize=20)  # radial ticks
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\projections\polar.py", line 1288, in set_rticks
    return Axes.set_yticks(self, *args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axes\_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axis.py", line 2072, in set_ticks
    raise ValueError('labels argument cannot be None when '
ValueError: labels argument cannot be None when kwargs are passed

I hope I install all the py  module correctly

Charles

Am Sa., 25. März 2023 um 15:52 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:
Hi François,
It is fixed . you can update. ;)
charles




Charles
 

Now the Declination Axe is in the wrong direction...

Am So., 26. März 2023 um 16:10 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:

Hi Francois,

You can update and check if it is working correctly

Charles

Am Sa., 25. März 2023 um 23:39 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:
I found the root cause the new transformation Pipeline compute azimuth from the Sud. 

Charles 

Le sam. 25 mars 2023, 16:33, François Desvallées via groups.io <fdesvallees=mailbox.org@groups.io> a écrit :
Difficult to diagnose. Could be due to wrong communications, I will add some tests at startup.
Try to run mountSim.py which has fewer dependencies.

I tried your latest fix. GXP1 works now, but I think there is something wrong in the coordinates transformation: Here are the mount positions I get:


North



South


East and West are correct. I tried reversing the Dec axis but it is still wrong (North points South and vice-versa).


West

East


On 25 Mar 2023, at 16:21, Charles <charleslemaire37@...> wrote:

when I run the autotest.py I receive this error:
Traceback (most recent call last):
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 385, in <module>
    Application(options)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\autoTest.py", line 312, in __init__
    self.pp = pointingPlot(self.window, self.ts, self.ta)
  File "C:\Users\Charles\Documents\Git2\TeenAstro\TeenAstroTest\autoTest\pointingPlot.py", line 27, in __init__
    self.ax.set_rticks([0,15,30,45,60,75,90],fontsize=20)  # radial ticks
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\projections\polar.py", line 1288, in set_rticks
    return Axes.set_yticks(self, *args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axes\_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\Charles\AppData\Roaming\Python\Python39\site-packages\matplotlib\axis.py", line 2072, in set_ticks
    raise ValueError('labels argument cannot be None when '
ValueError: labels argument cannot be None when kwargs are passed

I hope I install all the py  module correctly

Charles

Am Sa., 25. März 2023 um 15:52 Uhr schrieb Charles via groups.io <charleslemaire37=gmail.com@groups.io>:
Hi François,
It is fixed . you can update. ;)
charles




Charles
 

Hi Francois,

I fixed the trouble (hope so), you can update and give a try.
I would be really happy If could use the test python script, You made a great job.
If anyone else is able to run the script on a windows computer I will be happy to get support.

I think it is also possible to create exe file from python script.
What is the version of pyglet you are using? I installed the version 2.0.5

Charles


 

Hi Charles.
 
I will update and test this week-end, and also try to improve mountSim and autoTest to give more meaningful error messages. In the meantime you can try TAConfig.py, which presents a dialog that searches for connected serial ports (in my case /dev/ttyACM0). It might be COM1, etc. on Windows. 
 
 
If you can connect and read the board info, then the other programs should work, as long as you enter the right options, for me it is
 
python3 mountSim.py -t serial -p /dev/ttyACM0 -b 57600
 
François
 
 

On 28/03/2023 20:48 CEST Charles <charleslemaire37@...> wrote:
 
 
Hi Francois,

I fixed the trouble (hope so), you can update and give a try.
I would be really happy If could use the test python script, You made a great job.
If anyone else is able to run the script on a windows computer I will be happy to get support.

I think it is also possible to create exe file from python script.
What is the version of pyglet you are using? I installed the version 2.0.5

Charles


Charles
 

I take a look tomorrow.

Thanks!