Search found 433 matches

by Plüschi
Tue Nov 03, 2015 6:59 pm
Forum: Software development
Topic: IMU.cpp - Attitude of the Estimated Vector
Replies: 2
Views: 2261

Re: IMU.cpp - Attitude of the Estimated Vector

FlavioLD wrote:

Code: Select all

Flaviold is online now  Send a private message to Flaviold  Find More Posts by Flaviold



I dont understand that part of the code. /t
by Plüschi
Mon Aug 24, 2015 2:01 pm
Forum: Software development
Topic: MW2.4 IMU.cpp bugs?
Replies: 28
Views: 10123

Re: MW2.4 IMU.cpp bugs?

What was the reason for writing the code like that? Omitting that factor 2 in the filter and moving it up some lines sure makes it unreadable. And it makes Baro_Alt have the wrong value. Someone fucked up the code to save 30us. Consider it to be Hanlon's Razor. Using alt.EstAlt = (alt.EstAlt * 3 + ...
by Plüschi
Sat Aug 22, 2015 6:19 am
Forum: Software development
Topic: MW2.4 IMU.cpp bugs?
Replies: 28
Views: 10123

Re: MW2.4 IMU.cpp bugs?

In 2.2 it was

Code: Select all

EstAlt = (EstAlt * 6 + BaroAlt * 2) >> 3;

which unecessarily ugly but correct.

in 2.3 i have

Code: Select all

alt.EstAlt = (alt.EstAlt * 6 + BaroAlt ) >> 3; 

which is simply wrong.

I did never bother to get 2.4 ...
by Plüschi
Wed Jun 24, 2015 6:00 pm
Forum: Software development
Topic: Change the throttle pin?
Replies: 2
Views: 1722

Re: Change the throttle pin?

Be aware some FS-i10 receivers CAN DO ppmsum and IBUS. The 6 cannel V2 and the 10 channel can do. If you have ppmsum then USE IT. Its 1 cable for 8 channels. I think this board uses PIN2 for throttle? Unluckily thats the ppmsum input (i guess), since its INT0. But you may use Pin3 INT1 instead. You ...
by Plüschi
Tue Jun 23, 2015 11:23 am
Forum: Software development
Topic: Atmega328 with fet output for motor brushed
Replies: 39
Views: 23748

Re: Atmega328 with fet output for motor brushed

i´m a little confused. is it possible to run 6 brushed motors on 328? if yes, would someone share his mwii sketch? i have build a nano spider hex with a pro mini Yes it should be possible. Since i have no hexa i cant test it. It should be easy if you use 1khz pwm. You dont have to change much, just...
by Plüschi
Tue Jun 23, 2015 1:47 am
Forum: Ideas
Topic: IMU stuff
Replies: 2
Views: 2894

Re: IMU stuff

File is attached. Be aware this is for brushed quad and has looptime set to 20ms for testing (adjustable in config.h). I think the gyro drift on yaw is quite good. Full rotation works good. The absence of any filters (except the gyro-acc fusion filter) works too. Running original code at 20ms doesen...
by Plüschi
Mon Jun 22, 2015 5:03 pm
Forum: Ideas
Topic: IMU stuff
Replies: 2
Views: 2894

IMU stuff

i would replace all low pass filters by a pt1 elements I cant understand your preference for pt1. m will be interesting to do some testing with such a setup. I have a version with no filtering / averaging except the internal 6050 lpf set to 42hz. Flies on a brushed /geared mini quad. No problem at ...
by Plüschi
Sun Jun 21, 2015 7:41 am
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

Hi Robert, >need the data at 20ms then sample it at 10 times the rate you need, thus: 2ms. I think the internal sensor LPF (6050 and 3200 devices) does exactly what you describe, read out at a fast rate and average the stuff. If this numerical LPF is inside the 6050 or outside in the 328 doesent mat...
by Plüschi
Thu Jun 18, 2015 11:54 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

brm wrote:is this understandable?


Did i piss you off somehow? Sorry you feel this way, wasnt my intention.

I think we should move that discussion to another thread, and not hijack patricks plane thread.
by Plüschi
Wed Jun 17, 2015 7:54 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

lower looptime is fine to fight gyro drift Setting a low LPF in the gyro should perfectly compensate this. 20hz lpf + Improving the gyro readout accuracy by factor 4 + no "small angle approx" should give a 20ms system a good edge over actual mwii. Only guessing, only partially tested. a p...
by Plüschi
Wed Jun 17, 2015 2:56 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

I think mwii on a 328 is only cabable of two 50hz servo signals and the rest is software pwm generated. Is that right? How bad is jitter on soft-pwm servo? It is possible use 8 bit timers to generate 50hz servo signals by having the 8-bit timer2 to generate the 1 to 2ms pulse, and the 16-bit timer g...
by Plüschi
Sat Jun 06, 2015 4:28 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

+1 on 0..45 deg. From 0.8 ms down to 0.5ms (about, lots of jitter due to interrupts)
+1 on reuse of matrix

---> mind blown.
by Plüschi
Sat Jun 06, 2015 12:17 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

Nice.I have not used the full rotation code yet. Its too warm to do anything useful. What i found is the originall mwii rotation code is problematic. Running a 20ms cycle as i do the "small angle" code with the approximations used doesent like fast movements. I have seen "strange read...
by Plüschi
Wed Jun 03, 2015 5:12 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

I think P=3, D=3 is best since its the fastest to put the plane on a straight course to home. For mwii: Gpssim sends out NMEA over serial and expects 1 byte singned back. This byte would be GPS_angle[YAW]/20 i guess. You need to simulate the gps delay (i use 1 second) and maybe yaw momentum in the g...
by Plüschi
Tue Jun 02, 2015 7:22 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

Marc's is that with the flight simulator right? No, im too dumb to run that. I have tried. Mine is simple stupid processing code. First it was a gps nmea simulator, then i added a 1 byte return value from the FC to control heading. Its NOT sophisticated, but it lets me check some basics functions of...
by Plüschi
Tue Jun 02, 2015 11:40 am
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

Here is a testflight with the code. m Looks good. The althold is excellent ! I will copy the averaging for the d-term and the mixing of aile-elev-rud. Thats so much better than the rudder-only P-only thing i was using. To better understand stuff i have graphed the path with D and without D term. Th...
by Plüschi
Fri May 29, 2015 8:13 am
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

When my plane does RTH it turns in smoothly, but then oscillates a bit to the right and to the left. GPS is an MTK in nmea mode, 5hz refresh.

What do i do, lower P value, higner D value ? Are there other tricks ?
by Plüschi
Tue May 26, 2015 1:20 am
Forum: Ideas
Topic: Enter Waypoints using Processing
Replies: 1
Views: 2227

Enter Waypoints using Processing

The old multiwii_conf is written in processing. Easy to install, easy to handle, free. Easy to modify. How about writing something to be able to enter waypoints / display gps location in realtime etc? There is a neat package to display maps in processing. Its called "http://unfoldingmaps.org&qu...
by Plüschi
Thu Apr 16, 2015 3:16 pm
Forum: Software development
Topic: FRSKY telemetry integration into Multiwii 2.4 has started
Replies: 71
Views: 33212

Re: FRSKY telemetry integration into Multiwii 2.4 has starte

originally had 4Hz (0.25 sec) update rate for send_Temperature(); and send_Time(); while other data are updated once a second. It is trivial to change overall update rate I did not mean update rate but delay. Do you think delay is less when i use higher update rate? Possible, will have to check. By...
by Plüschi
Wed Apr 08, 2015 7:01 pm
Forum: Software development
Topic: Lost negative sign in gps latitude and longitude in NMEA
Replies: 12
Views: 4904

Re: Lost negative sign in gps latitude and longitude in NMEA

Alexinparis wrote:rewritten to put tmp data in a sctruct like the ublox one.


Right, buffer not only long and lat, but alt, numsat etc as well.
Since Baco did discover this i think he should do the fix and get proper credits.
by Plüschi
Wed Apr 08, 2015 12:58 pm
Forum: Software development
Topic: Lost negative sign in gps latitude and longitude in NMEA
Replies: 12
Views: 4904

Re: Lost negative sign in gps latitude and longitude in NMEA

baco wrote:MultiWii software ignores the checksum of the frames sent by NMEA GPS modules


This is true for the data sent to multiwii_conf. Its not true for the GPS calculations.

I dont think the devs here care, they are busy chasing another femtosecond :)
by Plüschi
Tue Apr 07, 2015 4:44 pm
Forum: Software development
Topic: Lost negative sign in gps latitude and longitude in NMEA
Replies: 12
Views: 4904

Re: Lost negative sign in gps latitude and longitude in NMEA

Baco please check if i understand it: The sign of the gps coords CAN be wrong for 4 cycles using NMEA. It WILL be wrong if coords are negative and the gps parser is interrupted between reading coord and reading N-S or W-E. The error will correct as soon as N-S or E-W is parsed. Means we will occasio...
by Plüschi
Mon Apr 06, 2015 3:55 pm
Forum: Software development
Topic: FRSKY telemetry integration into Multiwii 2.4 has started
Replies: 71
Views: 33212

Re: FRSKY telemetry integration into Multiwii 2.4 has starte

re-uses of FLD-02 display "real estate" I do the same thing. I display distance to home and course to home. But i have found the whole frsky telemetry / FLD02 thing is very very slow. It takes over a second from transmitting a value to having it displayed on the FLD02. Steering a car/boat...
by Plüschi
Mon Apr 06, 2015 1:56 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

There is the full vector rotation code in baseflight imu. Not the "small angle" approximation, but the real thing. Using that code we can construct a 3D vector out of GPS bearing and horizontal plane and rotate this into the plane frame (using roll and pitch angles). Then correct the the d...
by Plüschi
Sun Apr 05, 2015 1:29 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

Rant: DONT use the actual 2.4 magless gyro code for planes. It can go crazy with gyro drift. This was developped for pockedquad and short 3 min flights, not for planes. I am surprised to see that code here without a warning message. Try the patch above. It does a non-crazy version of the magless gyr...
by Plüschi
Sun Apr 05, 2015 7:40 am
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

About gyro-gps bearing fusion i did experiment with this: myheadingdelta = EstG.V.Y * deltaGyroAngle[0] - EstG.V.X * deltaGyroAngle[1] + EstG.V.Z * deltaGyroAngle[2]; myheading += myheadingdelta * 0.01391;// 57/4096 Result is in deg. This is experimental with no claims to be correct. Board is a 328 ...
by Plüschi
Tue Mar 31, 2015 10:34 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

just fuse mag w/ gyro, and then fuse GPS bearing w/ mag+gyro The mag - gyro fusion is already done in the current imu. Gyro is a relative value, mag an absolute. But mag and gps are both absolute values, how are you going to fuse them? gyros will be sensitive enough to pickup slow, constant rotatio...
by Plüschi
Tue Mar 31, 2015 11:58 am
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

I think GPS heading is superior because MAG is affected by electrical current flowing nearby. Unless you have a sailplane or an external mag (like dji) mag readings are not very reliable. Gyro angles are in the plane coordinate system. Gps heading is on a horizontal plane. A fusion of gps and gyro n...
by Plüschi
Mon Mar 30, 2015 12:43 am
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 323949

Re: Airplane mode RTH

@PatrickE

As i understand you use / prefer GPS bearing instead of mag for RTH.
Do you use any sensor fusion with gyro to get better bearing measurement during turns than from gps alone?
What is the delay the GPS bearing measurement has? What delay do i have to expect from a 1hz GPS ?
by Plüschi
Wed Mar 25, 2015 10:28 pm
Forum: Software development
Topic: I2C 1602 and 2004 LCD not supported?
Replies: 3
Views: 2035

Re: I2C 1602 and 2004 LCD not supported?

Digole has the same 2004 display for $2.50 more but with a MUCH BETTER interface than the bangood one which is just a IIC to parallel expansion IC.
http://www.digole.com/index.php?productID=555

I had no idea ...
by Plüschi
Tue Mar 24, 2015 1:46 pm
Forum: Software development
Topic: I2C 1602 and 2004 LCD not supported?
Replies: 3
Views: 2035

I2C 1602 and 2004 LCD not supported?

Are those LCD here not supported? They are great for old people. Big chars, Cheap ... :geek:

http://www.banggood.com/IIC-I2C-1602-Bl ... 50726.html
http://www.banggood.com/IIC-or-I2C-2004 ... 08616.html
by Plüschi
Mon Feb 09, 2015 4:07 am
Forum: Software development
Topic: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)
Replies: 24
Views: 11952

Re: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)

Recently i did read some of the megapirate (apm) code, and they do intresting stuff. Refering to file libraries/AP_HALMPNG/RCInput_MPNG.cpp First they use timer5 for ICP PPM capture and the still get two 50hz pwm channels out of timer5. Unluckily most older MWii boards dont have ICP5 connected so IC...
by Plüschi
Sat Jan 31, 2015 11:45 pm
Forum: Software
Topic: Baseflight aka multiwii port to stm32
Replies: 1036
Views: 2550609

Re: Baseflight aka multiwii port to stm32

Thank YOU fiendie. I did update the wiki as well.

https://github.com/multiwii/baseflight/ ... upner-SUMD
by Plüschi
Wed Jan 28, 2015 5:10 pm
Forum: Software
Topic: Baseflight aka multiwii port to stm32
Replies: 1036
Views: 2550609

Re: Baseflight aka multiwii port to stm32

TY

I my uVision4 the indentation looks good ... i had no idea.
by Plüschi
Wed Jan 28, 2015 4:00 pm
Forum: Software
Topic: Baseflight aka multiwii port to stm32
Replies: 1036
Views: 2550609

Re: Baseflight aka multiwii port to stm32

I made a driver for IBUS, the flysky flavor of serialrx. http://cdn.hobbyking.com/hobbyking/store/catalog/68409.jpg Unluckily i am not able to use git and make a decent pull request. My brain doesent get git. So i did attach my whole SRC folder in the hopes someone can make a IBUS patch out of it. T...
by Plüschi
Tue Jan 27, 2015 3:53 pm
Forum: Software development
Topic: Flysky IBUS driver
Replies: 1
Views: 8035

Re: Flysky IBUS driver

Updates checksum calculation. NO FAILSAFE since failsafe doesent work with IBUS. #if defined(IBUS) #define IBUS_BUFFSIZE 32 static uint8_t ibusIndex=0; static uint8_t ibus[IBUS_BUFFSIZE]={0}; void readSerialRX(void) { uint8_t i; uint16_t chksum,rxsum; while (SerialAvailable(RX_SERIAL_PORT)) { uint8_...
by Plüschi
Wed Jan 21, 2015 2:16 pm
Forum: Software development
Topic: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)
Replies: 24
Views: 11952

Re: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)

I had already post the code up there, no need to have it twice. MWii works good "as is" without icp. This icp thing is personal preference, not a "must have". The resolution gets better, but the main thing (for me) is the jitter free hardware sampling. The averaging / deadband is...
by Plüschi
Tue Jan 20, 2015 7:24 pm
Forum: Software development
Topic: pre 2.4 version r1729
Replies: 100
Views: 49228

Re: pre 2.4 version r1729

Sorry guys but this is stupid: while(1) { currentTime = micros(); cycleTime = currentTime - previousTime; #if defined(LOOP_TIME) if (cycleTime >= LOOP_TIME) break; #else break; #endif } previousTime = currentTime; I use this instead: if (cycleTime >= LOOP_TIME) computeIMU(); else "do the rest&q...
by Plüschi
Sun Jan 18, 2015 2:41 pm
Forum: Software development
Topic: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)
Replies: 24
Views: 11952

Re: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)

but yet it has to take into account the register value & possible wrap-around Not a problem when counter TOP is 0xFFFF. Do the math: initial value 0xFFF0 + elapsed time 0x030 = final value 0x10020 0x10020 is truncated to 16 bit since ICP is only 16 bit -> result is 0x0020 Means we get a full wr...
by Plüschi
Fri Jan 16, 2015 9:25 am
Forum: Software development
Topic: Flysky IBUS driver
Replies: 1
Views: 8035

Flysky IBUS driver

IBUS is the new flysky serial protocol. Pretty simple. You might have to patch that in by yourself since i do use my own branch of mwii. config /******************************* IBUS RECIVER ************************************/ /* The following line apply only for FLYSKY IBus Receiver */ #define IBU...
by Plüschi
Thu Dec 25, 2014 7:04 pm
Forum: Software development
Topic: Why development has stopped?
Replies: 230
Views: 74423

Re: Why development has stopped?

I got the gut feeling this here is bound to die. Captain prefers to let the ship sink. Devs flee the ship faced with the results of their competence. I joined here 2 years ago. I did learn quite a lot. But i never got some respect for suggesting stuff or pointing out bugs. Now there is nothing left ...
by Plüschi
Wed Dec 17, 2014 8:35 am
Forum: Software development
Topic: Graupner/SJ SUMD serial receiver addition
Replies: 20
Views: 8353

Re: Graupner/SJ SUMD serial receiver addition

There is a 60ms delay in the oled routines which makes the serial receivers (speksat,sbus,sumd) instable / not reliable. I have posted a better way to do stuff in lcd.cpp in this forum, but i think it was not added because someone did not understand the problem. http://www.multiwii.com/forum/viewtop...
by Plüschi
Fri Dec 12, 2014 6:27 am
Forum: Software development
Topic: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)
Replies: 24
Views: 11952

Re: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)

There are enough examples of reading stuff with ICP. - You cant have a top value for the counter, or you will get fucked up readings because of wrap-arounds. -> Top must be 0xFFFF, choose different counter mode. - The hardware stores the counter value at external pin change, the interrupt then reads...
by Plüschi
Wed Dec 10, 2014 8:40 pm
Forum: Software development
Topic: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)
Replies: 24
Views: 11952

Re: PPM Sum Input for CRIUS AIO V2 (aka PL1 / ICP5)

Sorry but

Your not using input capture at all, you just bend the ICP interrupt vector to the old ppmsum routine which uses micros() ?
You run fast pwm mode with OCR5A as top set to 40000? Why?

WTF ? This whole mod doesent make any sense ...
by Plüschi
Mon Dec 08, 2014 5:46 pm
Forum: Ideas
Topic: Inversense 12C gyro, ACC & Mag in one chip
Replies: 2
Views: 1810

Re: Inversense 12C gyro, ACC & Mag in one chip

Mwii resolution is limited to ancient devices. The popular 6050 accel resolution is 8 times better than what mwii uses, and the gyro resolution is 4 times better. It doesent make any sense to have a 16 bit sensor but use only 10 bit. The 6050 can also do onchip sensor fusion, but i have never seen s...
by Plüschi
Sun Dec 07, 2014 1:50 am
Forum: Ideas
Topic: Alt Hold with hacked $25 IR laser distance measurer
Replies: 24
Views: 9798

Re: Alt Hold with hacked $25 IR laser distance measurer

It almost seems possible the Acc-Z axis would suffice and using the baro as a reference only I think the mwii implementation already does what you describe. But even a slight offset of ACC does sum up substantially. Vel = intgrated ACC, Pos = integrated Vel. -> Pos = doubly integrated Acc. This run...
by Plüschi
Sat Dec 06, 2014 9:55 pm
Forum: Ideas
Topic: Alt Hold with hacked $25 IR laser distance measurer
Replies: 24
Views: 9798

Re: Alt Hold with hacked $25 IR laser distance measurer

I think adding new althold sensors doesent make much sense if the althold algo doesent improve. I was never able to get decent althold out of mwii. It IS difficult to cope with a high-delay pid loop, but as DJI and APM shows it is possible with todays baro sensors. Also, changing "throttle angl...
by Plüschi
Fri Dec 05, 2014 5:33 pm
Forum: Ideas
Topic: Alt Hold with hacked $25 IR laser distance measurer
Replies: 24
Views: 9798

Re: Alt Hold with hacked $25 IR laser distance measurer

How are the guys with APM2.5 (which is just Atmega2560 @ 16Mhz) doing it & getting good results from what I have read You were asking for transmit, listen for return & calculate distance a thing APM does not and can not do. As patricke said APM asks a dedicated rangefinder processor for the...
by Plüschi
Fri Dec 05, 2014 5:23 am
Forum: Ideas
Topic: Alt Hold with hacked $25 IR laser distance measurer
Replies: 24
Views: 9798

Re: Alt Hold with hacked $25 IR laser distance measurer

$36 is damn cheap. Sure this is laser and not ultrasonic? WTF they dont ship to CH? My laser range finder did cost nearly $120 and can find distances up to 600m (tested) when the target is bright color. However measuring rate is quite low, it takes 3 sec for a measurement, and you need a steady hand...