Commit 0868da8a authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Claude: Demote INDX_VX/VY/STRENGTH/FRAC to method-local constants



These four constants described the layout of TDCorrTile.getMismatchVector()
return values and had no business being class-level statics in CuasMotion.
Moved to local scope in the two methods that use them: getTargetsFromCorr2d
and refineMotionVectors.

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 115acc78
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -46,10 +46,6 @@ public class CuasMotion {
	final public static String CLEAN_SUFFIX = "-CLEAN";
	final static public  int MAX_ALT_TARGETS = 100; // convenient to be power of 10
	
	final static private int INDX_VX =         0;
	final static private int INDX_VY =         1;
	final static private int INDX_STRENGTH =   2;
	final static private int INDX_FRAC =       3;
	final static public String LEGEND_TITLE = "Legend";
	final static public String[] ICON_DESCRIPTIONS = {
			"Identified UAS",
@@ -1933,6 +1929,8 @@ public class CuasMotion {
					fat_zero * scale_fat_zero, // *scale_fat_zero,  // final double        gpu_fat_zero,
					debugLevel);    // final int           debug_level

			// Indices into TDCorrTile.getMismatchVector() result {vx, vy, strength, fraction} // By Claude on 05/08/2026
			final int INDX_VX = 0, INDX_VY = 1, INDX_STRENGTH = 2, INDX_FRAC = 3;
			double [][] vector_field = TDCorrTile.getMismatchVector( // full tiles in gpu (512*512)
					corr_tiles_pd,  // final double[][] tiles,
					rstr,           // double              rmax,
@@ -2169,6 +2167,8 @@ public class CuasMotion {
				corr2d_ref[nseq] = corr_tiles_pd;
			}

			// Indices into TDCorrTile.getMismatchVector() result {vx, vy, strength, fraction} // By Claude on 05/08/2026
			final int INDX_VX = 0, INDX_VY = 1;
			double[][] vector_field = TDCorrTile.getMismatchVector(
					corr_tiles_pd,
					-rstr,        // rmax < 0: no relative-strength filter (same convention as getTargetsFromCorr2d)