| Chunk |
|---|
| Conflicting content |
|---|
double imageHeight; // Total Height in Pixels
double imageWidth; // Total Width imn Pixels
<<<<<<< HEAD
double verticalFOV; // Vertical Field of View in Feet
double horizontalFOV; // Horizontal Field of View in Feet
double verticalViewingAngle; // Vertical Camera Viewing Angle
double horizontalViewingAngle; // Horizontal Camera Viewing Angle
double horizontalRattle; // Horizontal off-centerness of center of goal
double verticalRattle; // Vertical off-centerness of center of goal
=======
double vertFOV; // Verticle Field of View in Feet
double horFOV; // Horizontal Field of View in Feet
double vertVA; // Verticle Camera Viewing Angle
double horVA; // Horizontal Camera Viewing Angle
double leftRight; // Horizontal off-centerness of center of goal
double upDown; // Verticle off-centerness of center of goal
double wdth1Px; // Distance from the center of a Goal to the nearest Horizontal edge
double hght1Px; // Distance from the center of a Goal to the nearest Verticle edge
double horTheta1; // Horizontal Angle from the Edge to Camera to center of Goal
double vertTheta1; // Verticle Angle from the Edge to Camera to center of Goal
double horHypot; // Length in feet from camera to Horizontal Edge of Field of View
double vertHypot; // Length in feet from camera to Verticle Edge of Field of View
>>>>>>> fe43258e757c284017ba0b8a8077f5c3d204e23a
double centerDistance = 0; // Distance Variable to be used in firing Calculation
double offCenterPixels = 0; |
| Solution content |
|---|
double imageHeight; // Total Height in Pixels
double imageWidth; // Total Width imn Pixels
double verticalFOV; // Vertical Field of View in Feet
double horizontalFOV; // Horizontal Field of View in Feet
double verticalViewingAngle; // Vertical Camera Viewing Angle
double horizontalViewingAngle; // Horizontal Camera Viewing Angle
double horizontalRattle; // Horizontal off-centerness of center of goal
double verticalRattle; // Vertical off-centerness of center of goal
double centerDistance = 0; // Distance Variable to be used in firing Calculation
double offCenterPixels = 0; |
| File |
|---|
| FindDistance.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
return;
}
<<<<<<< HEAD
verticalViewingAngle = 47; // Defines the Viewing
horizontalViewingAngle = 47; // Angles of our camera
imageHeight = 480; // Image Height
targetHeight = TrackingCamera.targetGoal.boundingRectHeight; // Sets the height of our target.
targetHeightFt = 1.5; // Defines goal's constant ft height
=======
ttlHght = 480; // Image Height
ttlWdth = 640; // Image Width
tgtHght = TrackingCamera.targetGoal.boundingRectHeight; // Sets the height of our target.
tgtHghtFt = 1.5; // Defines goal's constant ft height
vertFOV = tgtHghtFt / tgtHght * ttlHght; // Gets the Foot Value of our Verticle Field of View
vertVA = 47; // Defines the Viewing
horVA = 47; // Angles of our camera
System.out.println("Checkpoint 10b");
tgtWdth = TrackingCamera.targetGoal.boundingRectWidth; // Sets the width of our target.
tgtWdthFt = 2.0; // Defines goal's constant ft width
horFOV = tgtWdthFt / tgtWdth * ttlWdth; // Gets the ft value of our horizontal Field of View
leftRight = Math.abs(TrackingCamera.targetGoal.center_mass_x - (ttlWdth/2)); // Finds the horizontal off-centerness
upDown = Math.abs(TrackingCamera.targetGoal.center_mass_y - (ttlHght/2)); // Finds the Verticle off-ceneterness
wdth1Px = (ttlWdth/2) - leftRight; // Defines the distance from the Horizontal Edge to center of Goal in Pixels
hght1Px = (ttlHght/2) - upDown; // Defines the distance from the Verticle Edge to center of Goal in Pixels
>>>>>>> fe43258e757c284017ba0b8a8077f5c3d204e23a
imageWidth = 640; // Image Width
targetWidth = TrackingCamera.targetGoal.boundingRectWidth; // Sets the width of our target. |
| Solution content |
|---|
return;
}
verticalViewingAngle = 47; // Defines the Viewing
horizontalViewingAngle = 47; // Angles of our camera
imageHeight = 480; // Image Height
targetHeight = TrackingCamera.targetGoal.boundingRectHeight; // Sets the height of our target.
targetHeightFt = 1.5; // Defines goal's constant ft height
imageWidth = 640; // Image Width
targetWidth = TrackingCamera.targetGoal.boundingRectWidth; // Sets the width of our target. |
| File |
|---|
| FindDistance.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
targetWidth = TrackingCamera.targetGoal.boundingRectWidth; // Sets the width of our target.
targetWidthFt = 2.0; // Defines goal's constant ft width
<<<<<<< HEAD
verticalFOV = imageHeight*(targetHeightFt/targetHeight); // Gets the Foot Value of our Vertical Field of View.
horizontalFOV = imageWidth*(targetWidthFt/targetWidth); // Gets the ft value of our horizontal Field of View.
horizontalRattle = Math.abs(TrackingCamera.targetGoal.center_mass_x - (imageWidth/2)); // Finds the horizontal off-centerness.
verticalRattle = Math.abs(TrackingCamera.targetGoal.center_mass_y - (imageHeight/2)); // Finds the vertical off-ceneterness.
verticalDistanceResult = Math.sqrt(4/3)*(verticalFOV/2)/Math.tan(verticalViewingAngle/2); // Provides the Result of our Vertically-Based Calculation.
horizontalDistanceResult = Math.sqrt(3/4)*(horizontalFOV/2)/Math.tan(horizontalViewingAngle/2); // Provides the Result of our Horizontally-Based Calculation.
centerDistance = (verticalDistanceResult + horizontalDistanceResult) / 2; // Take the average to try get a more accurate measurement.
offCenterPixels = Math.sqrt((verticalRattle*verticalRattle) + (horizontalRattle*horizontalRattle)); // Finds the Linear Distance from the Center of the Image to the Center of the Goal.
offCenterFt = offCenterPixels*(Math.sqrt((verticalFOV*verticalFOV)+(horizontalFOV*horizontalFOV))); // Converts the above Caluclated measurement into its proper Ft value.
trueDistance = Math.sqrt((centerDistance*centerDistance)+(offCenterFt*offCenterFt)); // Find the Linear Distance form the Lens of our Camera to the Center of our Goal.
=======
horHypot = (horFOV/2 /23.5); // Finds the Distance from our Camera to the Horizontal Edge of our Field of View
vertHypot = (vertFOV/2 /23.5); // Finds the Distance from our Camera to the Verticle Edge of our Field of View
horTheta1 = (wdth1Px / horHypot); // Finds the angle from Horizontal Edge<>camera<>center of goal
vertTheta1 = (hght1Px / vertHypot); // Finds the angle from Verticle Edge<>camera<>center of goal
TrackingCamera.d1 = (hght1Px) / Math.toDegrees(Math.tan(vertTheta1)); // Gets a distance from the center of our goal using Horizontal Theta
TrackingCamera.d2 = (wdth1Px) / Math.toDegrees(Math.tan(horTheta1)); // Double checks distance with a Vertcial Theta
>>>>>>> fe43258e757c284017ba0b8a8077f5c3d204e23a
//if distance to target is invalid, just set it to some number |
| Solution content |
|---|
targetWidth = TrackingCamera.targetGoal.boundingRectWidth; // Sets the width of our target.
targetWidthFt = 2.0; // Defines goal's constant ft width
verticalFOV = imageHeight*(targetHeightFt/targetHeight); // Gets the Foot Value of our Vertical Field of View.
horizontalFOV = imageWidth*(targetWidthFt/targetWidth); // Gets the ft value of our horizontal Field of View.
horizontalRattle = Math.abs(TrackingCamera.targetGoal.center_mass_x - (imageWidth/2)); // Finds the horizontal off-centerness.
verticalRattle = Math.abs(TrackingCamera.targetGoal.center_mass_y - (imageHeight/2)); // Finds the vertical off-ceneterness.
verticalDistanceResult = Math.sqrt(4/3)*(verticalFOV/2)/Math.tan(verticalViewingAngle/2); // Provides the Result of our Vertically-Based Calculation.
horizontalDistanceResult = Math.sqrt(3/4)*(horizontalFOV/2)/Math.tan(horizontalViewingAngle/2); // Provides the Result of our Horizontally-Based Calculation.
centerDistance = (verticalDistanceResult + horizontalDistanceResult) / 2; // Take the average to try get a more accurate measurement.
offCenterPixels = Math.sqrt((verticalRattle*verticalRattle) + (horizontalRattle*horizontalRattle)); // Finds the Linear Distance from the Center of the Image to the Center of the Goal.
offCenterFt = offCenterPixels*(Math.sqrt((verticalFOV*verticalFOV)+(horizontalFOV*horizontalFOV))); // Converts the above Caluclated measurement into its proper Ft value.
trueDistance = Math.sqrt((centerDistance*centerDistance)+(offCenterFt*offCenterFt)); // Find the Linear Distance form the Lens of our Camera to the Center of our Goal.
//if distance to target is invalid, just set it to some number |
| File |
|---|
| FindDistance.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |