codevoor esther
Dependencies: Encoder MODSERIAL mbed
Revision 9:ca6c6295b5f1, committed 2013-11-04
- Comitter:
- gerjan
- Date:
- Mon Nov 04 21:14:30 2013 +0000
- Parent:
- 8:e3e972c4e249
- Child:
- 10:36281503362a
- Commit message:
- met werkende assen
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 04 21:05:55 2013 +0000 +++ b/main.cpp Mon Nov 04 21:14:30 2013 +0000 @@ -73,8 +73,8 @@ //x = (potmeter1.read()*297.0); //y = (potmeter2.read()*210.0); - x = sin(inputsinus)*297.0; - y = 0; + x = 0;//sin(inputsinus)*297.0; + y = sin(inputsinus)*210.0; inputsinus = inputsinus + (Ts*0.1)*pi; @@ -97,7 +97,7 @@ //theta = atan(y/x)+0.25*pi; //r = (sqrt(x*x+y*y)) ;// * (2577/461.335); - theta = atan((y+69.80)/(x+69.80)); + theta = atan((x+69.80)/(y+69.80)); r = sqrt( ((x + 69.8)*(x + 69.8))+ ((y + 69.8)*(y + 69.8)) );