mirror of
https://github.com/brendanhaines/mecanum.git
synced 2024-11-09 21:14:51 -07:00
adds aileron/elevator scalability
This commit is contained in:
parent
be2130610c
commit
23ae387dd5
|
@ -8,6 +8,8 @@
|
||||||
// Tuning Parameters
|
// Tuning Parameters
|
||||||
#define throScale 1
|
#define throScale 1
|
||||||
#define ruddScale 1
|
#define ruddScale 1
|
||||||
|
#define aileScale 2
|
||||||
|
#define elevScale 1
|
||||||
|
|
||||||
// Wiring Parameters
|
// Wiring Parameters
|
||||||
#define frontLeftChannel 4
|
#define frontLeftChannel 4
|
||||||
|
@ -86,7 +88,7 @@ public:
|
||||||
double rudd = InterLink->getRudd();
|
double rudd = InterLink->getRudd();
|
||||||
SmartDashboard::PutNumber( "Rudder", rudd );
|
SmartDashboard::PutNumber( "Rudder", rudd );
|
||||||
|
|
||||||
double driveAngle = atan2( -aile, elev );
|
double driveAngle = atan2( -aile*aileScale, elev*elevScale );
|
||||||
SmartDashboard::PutNumber( "Drive Angle", driveAngle );
|
SmartDashboard::PutNumber( "Drive Angle", driveAngle );
|
||||||
|
|
||||||
double driveSpeed = sqrt( aile*aile + elev*elev );
|
double driveSpeed = sqrt( aile*aile + elev*elev );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user