Skip to content

Commit

Permalink
Added deeper GTA solve for Teensy3.5/3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
hjd1964 committed Oct 8, 2018
1 parent 3ad966d commit eb04428
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
16 changes: 11 additions & 5 deletions AlignEq.ino
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ void TGeoAlign::autoModel(int n) {
}
ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe;

#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM)
#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT)
Ff=1; Df=0;
#else
Ff=0; Df=1;
#endif

// search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error
// DoPdPzPeTfFf Df OdOh
do_search(16384,0,0,1,1,0, 0, 0,1,1);
Expand All @@ -297,14 +297,20 @@ void TGeoAlign::autoModel(int n) {
if (num>4) {
// DoPdPzPeTfFf Df OdOh
do_search( 256,1,1,1,1,0,Ff,Df,1,1);
do_search( 128,1,1,1,1,0,Ff,Df,1,1);
do_search( 64,1,1,1,1,0,Ff,Df,1,1);
do_search( 32,1,1,1,1,0,Ff,Df,1,1);
do_search( 128,1,1,1,1,1,Ff,Df,1,1);
do_search( 64,1,1,1,1,1,Ff,Df,1,1);
#ifdef HAL_FAST_PROCESSOR
do_search( 32,1,1,1,1,1,Ff,Df,1,1);
do_search( 16,1,1,1,1,1,Ff,Df,1,1);
#endif
} else {
do_search( 256,1,0,1,1,0, 0, 0,1,1);
do_search( 128,1,0,1,1,0, 0, 0,1,1);
do_search( 64,1,0,1,1,0, 0, 0,1,1);
do_search( 32,1,0,1,1,0, 0, 0,1,1);
#ifdef HAL_FAST_PROCESSOR
do_search( 16,1,0,1,1,0, 0, 0,1,1);
#endif
}
#endif

Expand Down
19 changes: 11 additions & 8 deletions AlignHor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,8 @@ void TGeoAlignH::autoModel(int n) {
}
ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe;

#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM)
Ff=1; Df=0;
#else
Ff=0; Df=1;
#endif
// these don't apply for Alt/Az
Ff=0; Df=0;

// search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error
// DoPdPzPeTfFf Df OdOh
Expand All @@ -311,14 +308,20 @@ void TGeoAlignH::autoModel(int n) {
if (num>4) {
// DoPdPzPeTfFf Df OdOh
do_search( 256,1,1,1,1,0,Ff,Df,1,1);
do_search( 128,1,1,1,1,0,Ff,Df,1,1);
do_search( 64,1,1,1,1,0,Ff,Df,1,1);
do_search( 32,1,1,1,1,0,Ff,Df,1,1);
do_search( 128,1,1,1,1,1,Ff,Df,1,1);
do_search( 64,1,1,1,1,1,Ff,Df,1,1);
#ifdef HAL_FAST_PROCESSOR
do_search( 32,1,1,1,1,1,Ff,Df,1,1);
do_search( 16,1,1,1,1,1,Ff,Df,1,1);
#endif
} else {
do_search( 256,1,0,1,1,0, 0, 0,1,1);
do_search( 128,1,0,1,1,0, 0, 0,1,1);
do_search( 64,1,0,1,1,0, 0, 0,1,1);
do_search( 32,1,0,1,1,0, 0, 0,1,1);
#ifdef HAL_FAST_PROCESSOR
do_search( 16,1,0,1,1,0, 0, 0,1,1);
#endif
}
#endif

Expand Down
4 changes: 3 additions & 1 deletion src/HAL/HAL_Teensy_3/HAL_Teensy_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#define __ARM_Teensy3__

// Lower limit (fastest) step rate in uS for this platform
#if defined(__MK64FX512__) || defined(_mk20dx128_h_) || defined(__MK20DX128__)
#if defined(__MK64FX512__)
#define MaxRate_LowerLimit 12
#define HAL_FAST_PROCESSOR
#elif defined(__MK66FX1M0__)
#define MaxRate_LowerLimit 4
#define HAL_FAST_PROCESSOR
#else
#define MaxRate_LowerLimit 16
#endif
Expand Down

0 comments on commit eb04428

Please sign in to comment.