S-curve acceleration / deceleration model generator S字加減速

Dependents:   2018NHK_gaku_ver2

example /media/uploads/UCHITAKE/log.png

Committer:
UCHITAKE
Date:
Fri Aug 03 03:57:44 2018 +0000
Revision:
1:aed2cca33061
Child:
2:2c5e4f521390
??????xy(???)???

Who changed what in which revision?

UserRevisionLine numberNew contents of line
UCHITAKE 1:aed2cca33061 1 #ifndef POSITION_CONTROLLER_H
UCHITAKE 1:aed2cca33061 2 #define POSITION_CONTROLLER_H
UCHITAKE 1:aed2cca33061 3
UCHITAKE 1:aed2cca33061 4 #include "mbed.h"
UCHITAKE 1:aed2cca33061 5
UCHITAKE 1:aed2cca33061 6 class PositionController {
UCHITAKE 1:aed2cca33061 7 public :
UCHITAKE 1:aed2cca33061 8 PositionController(int accDist, float maxV, int targetX, int targetY);
UCHITAKE 1:aed2cca33061 9
UCHITAKE 1:aed2cca33061 10 void compute(int positionX, int positionY);
UCHITAKE 1:aed2cca33061 11 float getVelocityX();
UCHITAKE 1:aed2cca33061 12 float getVelocityY();
UCHITAKE 1:aed2cca33061 13 private :
UCHITAKE 1:aed2cca33061 14
UCHITAKE 1:aed2cca33061 15 int accelerationDistance;
UCHITAKE 1:aed2cca33061 16 float maxVelocity;
UCHITAKE 1:aed2cca33061 17 double targetDistance;
UCHITAKE 1:aed2cca33061 18 int targetDistanceX;
UCHITAKE 1:aed2cca33061 19 int targetDistanceY;
UCHITAKE 1:aed2cca33061 20 double targetRadians;
UCHITAKE 1:aed2cca33061 21 double maxJerk;
UCHITAKE 1:aed2cca33061 22
UCHITAKE 1:aed2cca33061 23 float velocity[2];
UCHITAKE 1:aed2cca33061 24
UCHITAKE 1:aed2cca33061 25 float generateVelocity(int position);
UCHITAKE 1:aed2cca33061 26 };
UCHITAKE 1:aed2cca33061 27 #endif