Interface library for STMicro LSM303DLH 3-axis magnetometer w/ 3-axis acceleromter. Computes magnetic heading.

Fork of LSM303DLH by Michael Shimniok

Committer:
paulcox
Date:
Wed Oct 15 15:01:31 2014 +0000
Revision:
3:9c3f240d14bf
Parent:
0:de767f4959ef
Program tested with all Nucleo boards updated to 2j23m6 firmware and confirmed as working (led blinks and magnetometer info received via I2C)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimniok 0:de767f4959ef 1 #ifndef vector_h
shimniok 0:de767f4959ef 2 #define vector_h
shimniok 0:de767f4959ef 3 typedef struct vector
shimniok 0:de767f4959ef 4 {
shimniok 0:de767f4959ef 5 float x, y, z;
shimniok 0:de767f4959ef 6 } vector;
shimniok 0:de767f4959ef 7
shimniok 0:de767f4959ef 8 extern void vector_cross(const vector *a, const vector *b, vector *out);
shimniok 0:de767f4959ef 9 extern float vector_dot(const vector *a,const vector *b);
shimniok 0:de767f4959ef 10 extern void vector_normalize(vector *a);
shimniok 0:de767f4959ef 11 #endif