Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High Precision Implementation #35

Merged
merged 25 commits into from Mar 14, 2023

Conversation

ExeRSolver
Copy link
Contributor

Changes:

  • Added settings tab 'High precision'
    • Column for tall res pixel corrections
      • Checkbox to enable/disable
      • Textbox for screen res height
    • Column for precise angle measurement
      • Checkbox to enable/disable
      • Textbox for sensitivity
      • Hotkey to indicate resetting angle with a boat
  • Correction offset for yaw-based eye error
  • Increased decimals shown in various displays

@ExeRSolver
Copy link
Contributor Author

Remaining required changes:

  • Boat angle reset hotkey functionality
  • Language support
  • Support precise angle measurement during calibration

src/main/java/ninjabrainbot/gui/frames/OptionsFrame.java Outdated Show resolved Hide resolved
src/main/java/ninjabrainbot/gui/frames/OptionsFrame.java Outdated Show resolved Hide resolved
alpha += preferences.crosshairCorrection.get();

// Determined experimentally, exact cause unknown
alpha -= 0.00079 * Math.sin((alpha + 45) * Math.PI/180.0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know if im comfortable adding this if we know so little about it. Ill think about it. What was your method of gathering the 400 data points?

Copy link
Contributor Author

@ExeRSolver ExeRSolver Jan 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spawn into a random world, throw and measure an eye, then move ~20 blocks to the side and measure another eye (2 throws to guarantee 100% confidence). I repeated this 200 times, after each world printing the angle and error for the 2 throws using a modified ninbot.

You can also check for a particular position by changing your yaw with commands until pixels change, then find how much the yaw interval for each pixel is shifted to the left/right. I've used this to confirm that the effect seems to also be present without tall res and for different distances.

I expect that we'll eventually get a better understanding of why this happens, and then we can probably optimize the adjustment. But I think the main thing is that the current adjustment is much better than no adjustment.

@Ninjabrain1 Ninjabrain1 marked this pull request as ready for review March 14, 2023 21:07
@Ninjabrain1 Ninjabrain1 merged commit 2e0f063 into Ninjabrain1:main Mar 14, 2023
@ExeRSolver ExeRSolver deleted the High-Precision-pr branch December 20, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants