Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RostockSolution.h Source File

RostockSolution.h

00001 #ifndef ROSTOCKSOLUTION_H
00002 #define ROSTOCKSOLUTION_H
00003 #include "libs/Module.h"
00004 #include "libs/Kernel.h"
00005 #include "BaseSolution.h"
00006 #include "libs/nuts_bolts.h"
00007 
00008 #include "libs/Config.h"
00009 
00010 #define arm_length_checksum         CHECKSUM("arm_length")
00011 #define arm_radius_checksum         CHECKSUM("arm_radius")
00012 
00013 #define alpha_angle_checksum                CHECKSUM("alpha_angle")
00014 #define beta_relative_angle_checksum         CHECKSUM("beta_relative_angle")
00015 #define gamma_relative_angle_checksum        CHECKSUM("gamma_relative_angle")
00016 
00017 class RostockSolution : public BaseSolution {
00018     public:
00019         RostockSolution(Config*);
00020         void cartesian_to_actuator( float[], float[] );
00021         void actuator_to_cartesian( float[], float[] );
00022 
00023         float solve_arm( float millimeters[] );
00024         void rotate( float in[], float out[], float sin, float cos );
00025 
00026         float arm_length;
00027         float arm_radius;
00028         float arm_length_squared;
00029 
00030         float sin_alpha;
00031         float cos_alpha;
00032         float sin_beta;
00033         float cos_beta;
00034         float sin_gamma;
00035         float cos_gamma;
00036 };
00037 
00038 
00039 
00040 
00041 
00042 
00043 #endif // ROSTOCKSOLUTION_H