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

Simulation text question #568

Closed
blurfl opened this issue Jan 13, 2018 · 4 comments
Closed

Simulation text question #568

blurfl opened this issue Jan 13, 2018 · 4 comments
Labels

Comments

@blurfl
Copy link
Collaborator

blurfl commented Jan 13, 2018

After running a simulation, several text strings are filled in to indicate the distortion calculated. One string refers to the center of the sheet and two of the strings refer to the top corners but none refers to the bottom corners. Is one of the strings actually meant to refer to the bottom corner?

simulation-machinelabel-text-issue 567

@BarbourSmith
Copy link
Member

Yes, I think that is an astute observation and one of them almost certainly refers to the bottom of the sheet

@blurfl
Copy link
Collaborator Author

blurfl commented Jan 13, 2018

Priobably the bottom one 🙃? I've bot a PR ready to change the bottom one to 'bottom'...

@blurfl
Copy link
Collaborator Author

blurfl commented Jan 13, 2018

I'll close after I remember to get that PR entered...

@BarbourSmith
Copy link
Member

Looking at the code in simulationCanvas.py

       lengthMM = 800
        xOffset = 1100 - lengthMM/2
        yOffset = 500  - lengthMM/2

       #horizontal measurement 
        pointPlotted1, distortedPoint1 = self.testPointGenerator.plotPoint(-lengthMM/2, yOffset)
        pointPlotted2, distortedPoint2 = self.testPointGenerator.plotPoint(lengthMM/2,  yOffset)
        
        #vertical measurement
        pointPlotted3, distortedPoint3 = self.testPointGenerator.plotPoint(xOffset, lengthMM/2)
        pointPlotted4, distortedPoint4 = self.testPointGenerator.plotPoint(xOffset, -lengthMM/2)
        
        printString = "An 800mm square in the top corner on the sheet is distorted\n" + str(lengthMM - (distortedPoint2[0] - distortedPoint1[0])) + "mm horizontally, and " + str(lengthMM - (distortedPoint3[1] - distortedPoint4[1])) + "mm vertically."
        
        lengthMM = 800
        xOffset = 1100 - lengthMM/2
        yOffset = 500  - lengthMM/2
        
        #horizontal measurement 
        pointPlotted1, distortedPoint1 = self.testPointGenerator.plotPoint(-lengthMM/2, -yOffset)
        pointPlotted2, distortedPoint2 = self.testPointGenerator.plotPoint(lengthMM/2,  -yOffset)
        
        #vertical measurement
        pointPlotted3, distortedPoint3 = self.testPointGenerator.plotPoint(xOffset, lengthMM/2)
        pointPlotted4, distortedPoint4 = self.testPointGenerator.plotPoint(xOffset, -lengthMM/2)
        
        printString = printString + "\n\nAn 800mm square in the top corner on the sheet is distorted\n" + str(lengthMM - (distortedPoint2[0] - distortedPoint1[0])) + "mm horizontally, and " + str(lengthMM - (distortedPoint3[1] - distortedPoint4[1])) + "mm vertically."
        

I agree that it is the second one which should be the lower square.

Good catch picking up on that detail!

blurfl added a commit to blurfl/GroundControl that referenced this issue Jan 13, 2018
Change text to refer to bottom corner.
@blurfl blurfl closed this as completed Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants