diff options
author | cnlohr <lohr85@gmail.com> | 2017-02-11 01:08:26 -0500 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2017-02-11 01:08:26 -0500 |
commit | dffa6477a0ee5672a5b1763a8b99ab4e21b6c94a (patch) | |
tree | 4a38d8739c2c0d295c2154472fa760810053134d /tools/lighthousefind_tori/tori_includes.h | |
parent | 29400a2063fc740c3c33d35649d6f6a4504b6745 (diff) | |
parent | ae522f8a06848d467c835d87772580fa7cceb5cd (diff) | |
download | libsurvive-dffa6477a0ee5672a5b1763a8b99ab4e21b6c94a.tar.gz libsurvive-dffa6477a0ee5672a5b1763a8b99ab4e21b6c94a.tar.bz2 |
Merge branch 'addTorusFind6' of https://github.com/mwturvey/libsurvive into mwturvey-addTorusFind6
Diffstat (limited to 'tools/lighthousefind_tori/tori_includes.h')
-rw-r--r-- | tools/lighthousefind_tori/tori_includes.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/lighthousefind_tori/tori_includes.h b/tools/lighthousefind_tori/tori_includes.h new file mode 100644 index 0000000..4cfbcdc --- /dev/null +++ b/tools/lighthousefind_tori/tori_includes.h @@ -0,0 +1,60 @@ +#ifndef __TORI_INCLUDES_H +#define __TORI_INCLUDES_H + +#include <stddef.h> +#include <math.h> +#include <stdint.h> + + +typedef struct +{ + double x; + double y; + double z; +} Point; + +typedef struct +{ + Point point; // location of the sensor on the tracked object; + Point normal; // unit vector indicating the normal for the sensor + double theta; // "horizontal" angular measurement from lighthouse radians + double phi; // "vertical" angular measurement from lighthouse in radians. +} TrackedSensor; + +typedef struct +{ + size_t numSensors; + TrackedSensor sensor[0]; +} TrackedObject; + + +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327 +#endif + +#define SQUARED(x) ((x)*(x)) + +typedef union +{ + struct + { + unsigned char Blue; + unsigned char Green; + unsigned char Red; + unsigned char Alpha; + }; + uint32_t long_value; +} RGBValue; + +static RGBValue RED = { .Red = 255, .Green = 0, .Blue = 0, .Alpha = 125 }; +static RGBValue GREEN = { .Red = 0, .Green = 255, .Blue = 0, .Alpha = 125 }; +static RGBValue BLUE = { .Red = 0, .Green = 0, .Blue = 255, .Alpha = 125 }; + +static const double WORLD_BOUNDS = 100; +#define MAX_TRACKED_POINTS 40 + +static const float DefaultPointsPerOuterDiameter = 60; + +//#define TORI_DEBUG + +#endif |