Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI biquadFilter
geometry.h@2:fc869e45e672, 2016-11-02 (annotated)
- Committer:
- ronvbree
- Date:
- Wed Nov 02 08:51:12 2016 +0000
- Revision:
- 2:fc869e45e672
- Parent:
- 0:494acf21d3bc
- Child:
- 7:a80cb6b06320
abcdg
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ronvbree | 2:fc869e45e672 | 1 | /* |
| ronvbree | 2:fc869e45e672 | 2 | Constants |
| ronvbree | 2:fc869e45e672 | 3 | */ |
| ronvbree | 2:fc869e45e672 | 4 | |
| ronvbree | 2:fc869e45e672 | 5 | const float L_max = 50.0; // Max arm length |
| ronvbree | 2:fc869e45e672 | 6 | const float L_min = 30.0; // Min arm length |
| ronvbree | 2:fc869e45e672 | 7 | |
| ronvbree | 2:fc869e45e672 | 8 | const float d = 30.0; // Distance between arm centres of rotation |
| ronvbree | 2:fc869e45e672 | 9 | const float h = 30.0; // Height of lower arm centre of rotation TODO -- Determine |
| ronvbree | 2:fc869e45e672 | 10 | |
| ronvbree | 2:fc869e45e672 | 11 | const float reach = 2*sqrt(pow(L_max,2)-pow(L_min,2))-d; // Total length of wall that can be covered |
| ronvbree | 2:fc869e45e672 | 12 | |
| ronvbree | 2:fc869e45e672 | 13 | const float y_max = (2*h + d)/2 + reach/2; |
| ronvbree | 2:fc869e45e672 | 14 | const float y_min = (2*h + d)/2 - reach/2; |
| ronvbree | 2:fc869e45e672 | 15 | |
| ronvbree | 2:fc869e45e672 | 16 | const float x_min = L_min; |
| ronvbree | 2:fc869e45e672 | 17 | const float x_max = 0; |
| ronvbree | 2:fc869e45e672 | 18 | |
| ronvbree | 2:fc869e45e672 | 19 | /* |
| ronvbree | 2:fc869e45e672 | 20 | Methods |
| ronvbree | 2:fc869e45e672 | 21 | */ |
| ronvbree | 0:494acf21d3bc | 22 | |
| ronvbree | 0:494acf21d3bc | 23 | void getArmLengthsForRollerPosition(float x, float y, float &upper, float &lower); |
| ronvbree | 0:494acf21d3bc | 24 | |
| ronvbree | 0:494acf21d3bc | 25 | float getMinimalArmLength(); |
| ronvbree | 0:494acf21d3bc | 26 | float getMaximalArmLength(); |