[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5951] adding a tool :)
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5951] adding a tool :) |
Date: |
Mon, 27 Sep 2010 10:39:21 +0000 |
Revision: 5951
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5951
Author: poine
Date: 2010-09-27 10:39:21 +0000 (Mon, 27 Sep 2010)
Log Message:
-----------
adding a tool :)
Added Paths:
-----------
paparazzi3/trunk/sw/airborne/fms/libeknav/Makefile
paparazzi3/trunk/sw/airborne/fms/libeknav/raw_log_to_ascii.c
Added: paparazzi3/trunk/sw/airborne/fms/libeknav/Makefile
===================================================================
--- paparazzi3/trunk/sw/airborne/fms/libeknav/Makefile
(rev 0)
+++ paparazzi3/trunk/sw/airborne/fms/libeknav/Makefile 2010-09-27 10:39:21 UTC
(rev 5951)
@@ -0,0 +1,3 @@
+
+raw_log_to_ascii: raw_log_to_ascii.c
+ gcc -I../../ -Wall raw_log_to_ascii.c -o raw_log_to_ascii
\ No newline at end of file
Added: paparazzi3/trunk/sw/airborne/fms/libeknav/raw_log_to_ascii.c
===================================================================
--- paparazzi3/trunk/sw/airborne/fms/libeknav/raw_log_to_ascii.c
(rev 0)
+++ paparazzi3/trunk/sw/airborne/fms/libeknav/raw_log_to_ascii.c
2010-09-27 10:39:21 UTC (rev 5951)
@@ -0,0 +1,32 @@
+
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "math/pprz_algebra_float.h"
+
+// fixme,put that in a header
+struct raw_log_entry {
+ double time;
+ struct FloatRates gyro;
+ struct FloatVect3 accel;
+ struct FloatVect3 mag;
+};
+
+int main(int argc, char** argv) {
+
+ const char* filename = "log_test3.bin";
+ int raw_log_fd = open(filename, O_RDONLY);
+ // if (fd==-1) blaaa
+
+ while (1) {
+ struct raw_log_entry e;
+ ssize_t nb_read = read(raw_log_fd, &e, sizeof(e));
+ if (nb_read != sizeof(e)) break;
+ printf("%f GYRO %f %f %f\n", e.time, e.gyro.p, e.gyro.q, e.gyro.r);
+ }
+
+ return 0;
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5951] adding a tool :),
antoine drouin <=