
Search found 34 matches
- Wed Mar 28, 2012 9:59 am
- Forum: Software development
- Topic: mwc 2.0 ++
- Replies: 25
- Views: 10677
Re: mwc 2.0 ++
If you do not see the value of properly variable naming and good comments then you're clearly not qualified to contribute to this discussion. 

- Fri Mar 23, 2012 1:55 pm
- Forum: Software development
- Topic: Back drift issue
- Replies: 15
- Views: 5993
Re: Back drift issue
And what do you think if MAG datas would be used for compensation of angle calculation? When mag is calibrated corretly, it gives the exact position in three axis. I'm still looking for the proper accMag values, Alexinparis, could you help a bit and suggest some values for that? MAG data are probab...
- Fri Mar 23, 2012 1:47 pm
- Forum: Software development
- Topic: Perhaps a bug inside the mag calibration
- Replies: 12
- Views: 5476
Re: Perhaps a bug inside the mag calibration
The purpose of the current code is to define the MAG sensor you like, on then work only with the "MAG" definition via generic functions shared among all MAG sensors. This way, when you add a new mag device, it's very easy to update the code without changing everything. Clearly, but this i...
- Fri Mar 23, 2012 1:07 pm
- Forum: Software development
- Topic: MultiWii 2.0 is coming
- Replies: 256
- Views: 136751
Re: MultiWii 2.0 is coming
Earth magnetic field is [0.2;0.7] (from equator to the poles) Gauss Positive BIAS during init for x&y is 1.16 Gauss, z is 1.08 (check this difference Alex!) Maximum field is so 1.86 Gauss We can work without problem with 1.3 Ga scale. (and a lot far away from overflow with the 2.5Ga during init...
- Thu Mar 22, 2012 12:12 pm
- Forum: Software development
- Topic: Perhaps a bug inside the mag calibration
- Replies: 12
- Views: 5476
Re: Perhaps a bug inside the mag calibration
MMmmmmm, this is a solution to the problem: #if defined(MAG3110) && !defined(MAG) ...blabla... init read etc. #define MAG #else #error There are 2 or more MAG defined #endif So every programmer doesn't modify a common part (and the maintainer can only cut© the part) , and also you ca...
- Thu Mar 22, 2012 12:04 pm
- Forum: Software development
- Topic: Perhaps a bug inside the mag calibration
- Replies: 12
- Views: 5476
Re: Perhaps a bug inside the mag calibration
There is also another good method:
#if defined(MAG3110) && !defined(MAG)
...blabla...
#else
#if defined(MAG3110) && !defined(MAG)
...blabla...
#else
- Thu Mar 22, 2012 11:54 am
- Forum: Software development
- Topic: Accelerometer fluctuation
- Replies: 3
- Views: 1986
Re: Accelerometer fluctuation
Reading source code rapidly, NUNCHUCK is autodetected, but I think you can enable another acc without problem.
NUNCHUCK is too much sensible in the rotating range of the motors.
NUNCHUCK is too much sensible in the rotating range of the motors.
- Wed Mar 21, 2012 10:10 pm
- Forum: Software development
- Topic: Accelerometer fluctuation
- Replies: 3
- Views: 1986
Re: Accelerometer fluctuation
NK is not a good choice.
- Wed Mar 21, 2012 9:25 pm
- Forum: Software development
- Topic: Perhaps a bug inside the mag calibration
- Replies: 12
- Views: 5476
Re: Perhaps a bug inside the mag calibration
in only one place: #if defined(HMC5883) || defined(HMC5843) || defined(AK8975) || defined(MAG3110) || defined(LASTUBERALLESMAG) .... x100 .... || defined(LASTKNOWNMAGINTHEWHOLEWORLD) #define MAG #endif all over the program: #if defined(MAG) blablabla calibration #endif #if defined(MAG) blablabla com...
- Wed Mar 21, 2012 2:04 pm
- Forum: Software development
- Topic: HMC5883L new calibration method (BUG for Alex)
- Replies: 7
- Views: 20392
Re: HMC5883L new calibration method (BUG for Alex)
no problem with performance, thankfully to the excellent compiler! 
No virtual functions so no additional load during runtime, floating point lib in gcc for AVR are really optimized.
It is ready to be used on STM32
New mag initialization inside to return IN TOPIC.

No virtual functions so no additional load during runtime, floating point lib in gcc for AVR are really optimized.
It is ready to be used on STM32

New mag initialization inside to return IN TOPIC.
- Wed Mar 21, 2012 12:35 pm
- Forum: Software development
- Topic: HMC5883L new calibration method (BUG for Alex)
- Replies: 7
- Views: 20392
Re: HMC5883L new calibration method (BUG for Alex)
Oh yes! I love to program clean and with FLOATING POINT fully with 32-bit.
You can see my personal multicopter project: http://code.google.com/p/simplo/
You can see my personal multicopter project: http://code.google.com/p/simplo/
- Wed Mar 21, 2012 10:56 am
- Forum: Software development
- Topic: HMC5883L new calibration method (BUG for Alex)
- Replies: 7
- Views: 20392
Re: HMC5883L new calibration method (BUG for Alex)
yes noobie, There is a problem, searching for min/max and extracting only the zero is not correct, with soft-iron effect the range (also with the test of the fixed field of the BIAS) are different for x,y,z. If you have metallic surface near the sensor (every quad have this problem), the range chang...
- Wed Mar 21, 2012 9:21 am
- Forum: Software development
- Topic: Perhaps a bug inside the mag calibration
- Replies: 12
- Views: 5476
Re: Perhaps a bug inside the mag calibration
I think that the best will be to introduce a define for MAG_PRESENT non for every hardware supported.
- Tue Mar 20, 2012 8:59 pm
- Forum: Software development
- Topic: MultiWii 2.0 is coming
- Replies: 256
- Views: 136751
Re: MultiWii 2.0 is coming
Earth magnetic field is [0.2;0.7] (from equator to the poles) Gauss Positive BIAS during init for x&y is 1.16 Gauss, z is 1.08 (check this difference Alex!) Maximum field is so 1.86 Gauss We can work without problem with 1.3 Ga scale. (and a lot far away from overflow with the 2.5Ga during init)...
- Tue Mar 20, 2012 4:27 pm
- Forum: Software development
- Topic: HMC5883L new calibration method (BUG for Alex)
- Replies: 7
- Views: 20392
HMC5883L new calibration method (BUG for Alex)
Hello to all. The BIAS positive for the HMC5883L are different for X&Y than Z, the field generated for X&Y are 1.16 Gauss, Z have 1.08 Gauss (that is 7% difference) according to datasheet. This is a method to compensate: magCal[ROLL] = 1160.0 / abs(magADC[ROLL]); magCal[PITCH] = 1160.0 / abs...
- Wed Mar 07, 2012 10:23 pm
- Forum: Software development
- Topic: Support for MPU6050
- Replies: 96
- Views: 233154
Re: Support for MPU6050
if you have q0 q1 q2 q3 (you must normalize it) and want to convert to roll pitch yaw: // normalise quaternion norm = sqrt(q0*q0 + q1*q1 + q2*q2 + q3*q3); q0 = q0 / norm; q1 = q1 / norm; q2 = q2 / norm; q3 = q3 / norm; y=atan2(2*q1*q2+2*q0*q3,2*q0*q0+2*q1*q1-1); p=-asin(2 * q1 * q3 - 2 * q0 * q2); /...
- Fri Mar 02, 2012 3:34 pm
- Forum: Software development
- Topic: dev20120225 orientation warning!!!
- Replies: 26
- Views: 13104
Re: dev20120225 orientation warning!!!
Also Miniwii with this version have wrong orientation: Correct one is: #if defined(MINIWII) #define ITG3200 #define BMA180 #define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = X; accADC[PITCH] = -Y; accADC[YAW] = -Z;} #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW...
- Sun Oct 23, 2011 6:00 pm
- Forum: Software development
- Topic: BUG: GYRO_ORIENTATION is not applied to WMP
- Replies: 6
- Views: 3343
Re: BUG: GYRO_ORIENTATION is not applied to WMP
void Gyro_getADC () { TWBR = ((16000000L / 400000L) - 16) / 2; // change the I2C clock rate to 400kHz i2c_getSixRawADC(ITG3200_ADDRESS,0X1D); GYRO_ORIENTATION( + ( ((rawADC[2]<<8) | rawADC[3])/4) , // range: +/- 8192; +/- 2000 deg/sec - ( ((rawADC[0]<<8) | rawADC[1])/4 ) , - ( ((rawADC[4]<<8) | raw...
- Sat Oct 22, 2011 3:02 pm
- Forum: Software development
- Topic: Code modification to allow different WM+ orientation
- Replies: 2
- Views: 1867
Re: Code modification to allow different WM+ orientation
You can't apply directly GYRO_ORIENTATION because value from WMP are not zero centered.
In the other thread I have found a working patch.
In the other thread I have found a working patch.
- Sat Oct 22, 2011 3:00 pm
- Forum: Software development
- Topic: BUG: GYRO_ORIENTATION is not applied to WMP
- Replies: 6
- Views: 3343
Re: BUG: GYRO_ORIENTATION is not applied to WMP
Is this integrated in the source code?
- Sat Oct 22, 2011 2:52 pm
- Forum: Software development
- Topic: BUG: ITG3200 32767 is not 2000 deg/s!
- Replies: 0
- Views: 1523
BUG: ITG3200 32767 is not 2000 deg/s!
32767 is not 2000 deg/s
ITG3200 have a 14.375 LSB/(deg/s) (read the datasheet) so
32767/14.375 is 2279.44 deg/s
2000 is only a value for the reference scale.
This affect the stable mode.
ITG3200 have a 14.375 LSB/(deg/s) (read the datasheet) so
32767/14.375 is 2279.44 deg/s
2000 is only a value for the reference scale.
This affect the stable mode.
- Sat Oct 22, 2011 2:50 pm
- Forum: Software development
- Topic: MultiWii port to STM8S105
- Replies: 19
- Views: 8418
Re: MultiWii port to STM8S105
Sorry Alex you are wrong:
32767 is not 2000 deg/s
ITG3200 have a 14.375 LSB/(deg/s) (read the datasheet) so
32767/14.375 is 2279.44 deg/s
2000 is only a value for the reference scale.
32767 is not 2000 deg/s
ITG3200 have a 14.375 LSB/(deg/s) (read the datasheet) so
32767/14.375 is 2279.44 deg/s
2000 is only a value for the reference scale.
- Sat Oct 22, 2011 2:42 pm
- Forum: Software development
- Topic: BUG: 29 byte waited 31 readed (1.8p2)
- Replies: 0
- Views: 1125
BUG: 29 byte waited 31 readed (1.8p2)
In the serial section:
case 'W': //GUI write params to eeprom @ arduino
while (Serial.available()<29) {}
But with the 2 new byte from powermeter you read 31 byte.
case 'W': //GUI write params to eeprom @ arduino
while (Serial.available()<29) {}
But with the 2 new byte from powermeter you read 31 byte.
- Fri Sep 30, 2011 7:28 pm
- Forum: Software development
- Topic: BUG: GYRO_ORIENTATION is not applied to WMP
- Replies: 6
- Views: 3343
Re: BUG: GYRO_ORIENTATION is not applied to WMP
int roll,pitch,yaw; // BUG Correction GYRO_ORIENTATION is not applied when you have WMP // You must save it to exclude swap between vars roll=gyroADC[ROLL]; pitch=gyroADC[PITCH]; yaw=gyroADC[YAW]; GYRO_ORIENTATION( roll, pitch, yaw); In the last dev version there aren't these lines of code to apply...
- Tue Sep 20, 2011 8:52 am
- Forum: Software development
- Topic: Android tool to modify PID settings
- Replies: 65
- Views: 49536
Re: Android tool to modify PID settings
Please can you reverse the bar on the gyro? when value are positive bar goes negative.
- Wed Sep 14, 2011 4:19 pm
- Forum: Software development
- Topic: Teensy Support ?
- Replies: 24
- Views: 14847
Re: Teensy Support ?
Taken from Baronpilot: B0, B1 B2 B3 B4 have PCINT also on Teensy 2.0+ void setupRx() { #ifdef TEENSYP pinMode(PIN_B0,INPUT); pinMode(PIN_B1,INPUT); pinMode(PIN_B2,INPUT); pinMode(PIN_B3,INPUT); pinMode(PIN_B4,INPUT); PCICR |= (1<<PCIE0); PCMSK0 = (1<<PCINT0) | (1<<PCINT1) | (1<<PCINT2) | (1<<PCINT3)...
- Mon Sep 12, 2011 1:30 pm
- Forum: Software development
- Topic: BUG: GYRO_ORIENTATION is not applied to WMP
- Replies: 6
- Views: 3343
BUG: GYRO_ORIENTATION is not applied to WMP
You must add this to the end of gyro_common in sensors.pde to apply GYRO_ORIENTATION to WMP: void GYRO_Common() { static int16_t previousGyroADC[3] = {0,0,0}; static int32_t g[3]; uint8_t axis; if (calibratingG>0) { for (axis = 0; axis < 3; axis++) { // Reset g[axis] at start of calibration if (cali...
- Wed Apr 06, 2011 8:34 pm
- Forum: Software development
- Topic: MARG sensor fusion AHRS
- Replies: 27
- Views: 11428
Re: MARG sensor fusion AHRS
Great Syberian, I don't understand only why you can't put it in a normal arduino code is not so big.
- Mon Mar 28, 2011 8:33 pm
- Forum: Software development
- Topic: Bug in getEstimatedAttitude
- Replies: 2
- Views: 2093
Re: Bug in getEstimatedAttitude
This can cause an angle jump.
- Mon Mar 28, 2011 8:30 pm
- Forum: Software development
- Topic: Bug in getEstimatedAttitude
- Replies: 2
- Views: 2093
Bug in getEstimatedAttitude
last line is:
for (axis=0;axis<2;axis++) angle[axis] = A[axis]*570.29577951; //angle in multiple of 0.1 degree
but 180/M_PI is 57.29
so the line must be:
for (axis=0;axis<2;axis++) angle[axis] = A[axis]*572.9577951; //angle in multiple of 0.1 degree
for (axis=0;axis<2;axis++) angle[axis] = A[axis]*570.29577951; //angle in multiple of 0.1 degree
but 180/M_PI is 57.29
so the line must be:
for (axis=0;axis<2;axis++) angle[axis] = A[axis]*572.9577951; //angle in multiple of 0.1 degree
- Mon Mar 28, 2011 8:29 pm
- Forum: Software development
- Topic: Alex: code optimization
- Replies: 3
- Views: 2337
Re: Alex: code optimization
Arduino (sigh) compile with -Os (for size), but you can modify it to compile with -O2
- Sat Mar 26, 2011 7:35 pm
- Forum: Software development
- Topic: 1_prebis7: ITG3200 driver: Overflow issue
- Replies: 4
- Views: 3380
Re: 1_prebis7: ITG3200 driver: Overflow issue
-32768 is
over 2000 degrees/sec!!! nearly 330 rpm, or 90 degree in 0.045s a very very very fast movement!
over 2000 degrees/sec!!! nearly 330 rpm, or 90 degree in 0.045s a very very very fast movement!
- Sat Mar 26, 2011 7:24 pm
- Forum: Software development
- Topic: Alex: code optimization
- Replies: 3
- Views: 2337
Re: Alex: code optimization
GCC do this automatically.
- Sat Mar 26, 2011 12:26 am
- Forum: Software development
- Topic: MultiWii v1.preter7 released
- Replies: 22
- Views: 9574
Re: MultiWii v1.preter7 released
The scale for the gyro has been moved so the new L3G4200D doen't have a correct scale, please add: gyroADC[ROLL] = ((rawADC_L3G4200D[1]<<8) | rawADC_L3G4200D[0])/20 ; gyroADC[PITCH] = ((rawADC_L3G4200D[3]<<8) | rawADC_L3G4200D[2])/20 ; gyroADC[YAW] = -((rawADC_L3G4200D[5]<<8) | rawADC_L3G4200D[4])/2...