View Single Post
  #5   Spotlight this post!  
Unread 17-07-2016, 01:37
E, Palmer E, Palmer is offline
Registered User
FRC #6239 (The Irrational Engineers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2009
Location: Maryland
Posts: 15
E, Palmer will become famous soon enoughE, Palmer will become famous soon enough
Re: Tower Tracker 1.0

I am very likely working on a faulty understanding of FOV but wouldn't this be much simpler?

Code:
double AngleToHalfScreen = Vertical_FOV/2;
      
        double OffsetFromMiddle = Math.abs(targetY - pixelHeight/2);

        double FractionofOffset = OffsetFromMiddle/(pixelHeight/2);

        FinalAngle =  AngleToHalfScreen+(AngleToHalfScreen*FractionofOffset);
This is way to simple to be right.

Thank you so much for taking the time to explain this.
Reply With Quote