summaryrefslogtreecommitdiff
path: root/debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino
diff options
context:
space:
mode:
authorAbel Tim <abel@main.home>2024-07-03 15:37:21 +0200
committerAbel Tim <abel@main.home>2024-07-03 15:37:21 +0200
commit989874b7bf0f480433d57418ee8cee5d383f67bc (patch)
treeecc94c5b9b31a5a2e874c75bd62a60094ce389e3 /debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino
parent370fdabd4f8f95b2b9bf1d973d9d974f9491c13d (diff)
downloadrobotica-989874b7bf0f480433d57418ee8cee5d383f67bc.tar.gz
robotica-989874b7bf0f480433d57418ee8cee5d383f67bc.zip
direction code and better IR seeker code
Diffstat (limited to 'debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino')
-rw-r--r--debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino91
1 files changed, 91 insertions, 0 deletions
diff --git a/debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino b/debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino
new file mode 100644
index 0000000..f1f31e5
--- /dev/null
+++ b/debug/IMU_comp/minimu-9-ahrs-arduino-master/MinIMU9AHRS/Output.ino
@@ -0,0 +1,91 @@
+/*
+
+MinIMU-9-Arduino-AHRS
+Pololu MinIMU-9 + Arduino AHRS (Attitude and Heading Reference System)
+
+Copyright (c) 2011-2016 Pololu Corporation.
+http://www.pololu.com/
+
+MinIMU-9-Arduino-AHRS is based on sf9domahrs by Doug Weibel and Jose Julio:
+http://code.google.com/p/sf9domahrs/
+
+sf9domahrs is based on ArduIMU v1.5 by Jordi Munoz and William Premerlani, Jose
+Julio and Doug Weibel:
+http://code.google.com/p/ardu-imu/
+
+MinIMU-9-Arduino-AHRS is free software: you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+MinIMU-9-Arduino-AHRS is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with MinIMU-9-Arduino-AHRS. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+void printdata(void)
+{
+ Serial.print("!");
+
+ #if PRINT_EULER == 1
+ Serial.print("ANG:");
+ Serial.print(ToDeg(roll));
+ Serial.print(",");
+ Serial.print(ToDeg(pitch));
+ Serial.print(",");
+ Serial.print(ToDeg(yaw));
+ #endif
+ #if PRINT_ANALOGS==1
+ Serial.print(",AN:");
+ Serial.print(AN[0]); //(int)read_adc(0)
+ Serial.print(",");
+ Serial.print(AN[1]);
+ Serial.print(",");
+ Serial.print(AN[2]);
+ Serial.print(",");
+ Serial.print(AN[3]);
+ Serial.print (",");
+ Serial.print(AN[4]);
+ Serial.print (",");
+ Serial.print(AN[5]);
+ Serial.print(",");
+ Serial.print(c_magnetom_x);
+ Serial.print (",");
+ Serial.print(c_magnetom_y);
+ Serial.print (",");
+ Serial.print(c_magnetom_z);
+ #endif
+ #if PRINT_DCM == 1
+ Serial.print (",DCM:");
+ Serial.print(DCM_Matrix[0][0]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[0][1]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[0][2]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[1][0]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[1][1]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[1][2]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[2][0]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[2][1]);
+ Serial.print (",");
+ Serial.print(DCM_Matrix[2][2]);
+ #endif
+ Serial.println();
+
+}
+
+/*long convert_to_dec(float x)
+{
+ return x*10000000;
+}*/
+