Code Monkey home page Code Monkey logo

sensorfusion's People

Contributors

aster94 avatar jonasboss avatar markub3327 avatar robsonos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sensorfusion's Issues

GPL License used

I want to make a port of your code to de-arduinofi it and use it with ESP32 IDF. Unfortunately I am doing this to use it in a commercial project. It is fine for me to fork you code, modify it and make it public but I can not release the rest of the commercial firmware. AFAICT GPL3 will require me to do this. Could you change to LGPL or MIT? That way people can include your code without having to publish their code (they still have to publish mods with LGPL). I notice that https://github.com/PaulStoffregen/MahonyAHRS has no license information at all. The MahonyAHRS.cpp file says 'From the x-io website "Open-source resources available on this website are
// provided under the GNU General Public Licence unless an alternative licence
// is provided in source."'

But the https://github.com/xioTechnologies/Fusion shows the MIT license. It is a bit of a mess. GPL is probably the wrong one to use in any case.

Unable to get acceleration in world reference frame

I'm trying to obtain acceleration from my IMU in the world reference frame. The approach I'm trying is to take the quaternion from getQuat(), get its conjugate, then multiply it by the acceleration vector. My code is here: https://pastebin.com/rYEc3R8c

My expectation is that when I rotate my IMU, the rotated acceleration stays constant because it is measuring gravity in the world reference frame. But that is not what happens. Instead, the 'rotated' acceleration changes as the IMU rotates. Logs are here: https://pastebin.com/n6DdXgrj

Why is this happening? Could it be that the rotation quaternion isn't accurate?

Initalisation

Hi, im using this as a part of a rocket datalogger and as such need as few sensors as possible. i have forgone a magnetometer under the understanding that only accelerometers and gryos are needed. Is there a way to use just the accelerometer data to get initial pitch and yaw. I understand that roll cannot be gathered from just accelerometer data and am fine with that. I dont mind how the axis are oriented so long as up is up and i have 2 sideways directions if that makes sense. Thanks

Problems using library with Arduino NANO BLE Sense

Hi Aster94
I'm using library with an Arduino BLE Sense with embedded Gyroscope and an external micro display. It seems it needs seconds to stabilize values, should I use an external IMU or what I'm doing wrong?

`#include <Arduino.h>
#include <Arduino_LSM9DS1.h> // Sensoristica
#include <U8g2lib.h> // Display
#include <SensorFusion.h> // Calcolo

// Inizializzazione DISPLAY
U8G2_LD7032_60X32_F_4W_SW_SPI u8g2(U8G2_MIRROR, /* clock=/ 9, / data=/ 8, / cs=/ 11, / dc=/ 10, / reset=/ 12); // PROTOTIPO SALDATO SU BASETTA
//U8G2_LD7032_60X32_F_4W_SW_SPI u8g2(U8G2_MIRROR, /
clock=/ 11, / data=/ 12, / cs=/ 9, / dc=/ 10, / reset=*/ 8);

const int samplingCicleBeforeRefresh = 30;
SF fusion;

float xAcc, yAcc, zAcc;
float xGyro, yGyro, zGyro;
float xMag, yMag, zMag;
float deltat;

int roll, pitch, yaw;

void setup() {
Serial.begin(115200);
//while (!Serial);
Serial.println("Started");

if (!IMU.begin()) {
Serial.println("Failed to initialize IMU!");
while (1);
}
//filter.begin(sensorRate);

u8g2.begin();
deltat=fusion.deltatUpdate();
// Abbasso il PIN per poter attivare il display (aggancio la massa)
pinMode(A0, OUTPUT);
digitalWrite(A0, LOW);
}

void refreshDisplay(int yaw, int pitch, int roll)
{
char buff[16];

u8g2.clearBuffer();
u8g2.setFont(u8g2_font_artosserif8_8u);
snprintf (buff, sizeof(buff), "R%d ", yaw);
u8g2.drawStr(10,10,buff);
Serial.print(buff);
snprintf (buff, sizeof(buff), "F%d ", pitch);
u8g2.drawStr(10,19,buff);
Serial.print(buff);
snprintf (buff, sizeof(buff), "I%d ", roll);
u8g2.drawStr(10,28,buff);
Serial.println(buff);
u8g2.sendBuffer();
}

void loop() {
// read accelerometer & gyrometer:
IMU.readAcceleration(xAcc, yAcc, zAcc);
IMU.readGyroscope(xGyro, yGyro, zGyro);
IMU.readMagneticField(xMag, yMag, zMag);

deltat = fusion.deltatUpdate(); //this have to be done before calling the fusion update
//choose only one of these two:
//fusion.MahonyUpdate(xGyro, yGyro, zGyro, xAcc, yAcc, zAcc, deltat); //mahony is suggested if there isn't the mag and the mcu is slow
fusion.MadgwickUpdate(xGyro * DEG_TO_RAD, yGyro * DEG_TO_RAD, zGyro * DEG_TO_RAD, xAcc, yAcc, zAcc, xMag, yMag, zMag, deltat); //else use the magwick, it is slower but more accurate

// print the heading, pitch and roll
roll = round(fusion.getRoll());//round(fusion.getRoll()-90);
pitch = round(fusion.getPitch());
yaw = round(fusion.getYaw());//round(180-fusion.getYaw());

//Serial.print("Y ");
//Serial.print(yaw);
//Serial.print(" P ");
//Serial.print(pitch);
//Serial.print(" R ");
//Serial.println(roll);

refreshDisplay (yaw, pitch, roll);
}`

Thank you
Regards

SensorFusion.cpp:67:9: error: 'y' was not declared in this scope return y;

c:\Users\black\Documents\Arduino\libraries\SensorFusion-1.0.5\src\SensorFusion.cpp: In static member function 'static float SF::invSqrt(float)':
c:\Users\black\Documents\Arduino\libraries\SensorFusion-1.0.5\src\SensorFusion.cpp:67:9: error: 'y' was not declared in this scope
  return y;
         ^

exit status 1

Compilation error: exit status 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.