Craig Evans / Utils

Dependents:   Leg

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Utils.h Source File

Utils.h

Go to the documentation of this file.
00001 /**
00002 @file Utils.h
00003 
00004 @brief Header file containing various structs and convenience methods
00005 
00006 @author Craig A. Evans
00007 @date June 2015
00008 
00009 
00010 */
00011 
00012 #ifndef UTILS_H
00013 #define UTILS_H
00014 
00015 // CONSTANTS
00016 
00017 // used to convert RADIANS to DEGREES
00018 #define RAD2DEG 57.2957795
00019 #define PI 3.1415926536
00020 
00021 // STRUCTS
00022 
00023 // struct used to store coordinates in 3D space
00024 typedef struct vector_t vector_t;
00025 struct vector_t {
00026     float x;
00027     float y;
00028     float z;
00029 };
00030 
00031 typedef struct pose_t pose_t;
00032 struct pose_t {
00033     float tx;  // translation in x
00034     float ty;  // translation in y
00035     float tz;  // translation in z
00036     float pitch;  // rotation around x
00037     float roll;   // rotation around y
00038     float yaw;    // rotation around z
00039 };
00040 
00041 /** Vector constructor (floats)
00042 * @param x - x value
00043 * @param y - y value
00044 * @param z - z value
00045 */
00046 vector_t create_vector(float x,float y,float z);
00047 
00048 #endif