Airplane mode RTH

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

Anyway, I didnt say I did my maiden flight. It was awesome. The stable ANGLE and HORIZON modes work great !! !! It its my first plane and the "ANGLE MODE-PANIC-BUTTON" is nice for fly, land and not lost much money in repairings. :lol: Thx for your efforts guys!!

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

New tests with diferent firms and the same results with 140402 or 150431 versions. The problem of the "intermittent gps fix" seems to be in the i2cnav code or board, not in the fixed wing code. I have 9+ sats, but continuously bad fixes.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

Ok problem isolation.
Check the settings in I2C_GPS config.
Baudrate etc.

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

There are two versions of I2CPatched. I have choosen the I2C_GPS_2_2. Here is my config.h:

Code: Select all

//////////////////////////////////////////////////////////////////////////////
// i2C comm definitions
//
#define I2C_ADDRESS        0x20                      //7 bit address 0x40 write, 0x41 read

/* GPS Lead filter - predicts gps position based on the x/y speed. helps overcome the gps lag. */
#define GPS_LEAD_FILTER

// Special Mode for use with FixedWing
//
#define FIXEDWING  // Patches for Navigation on Fixedwing.
#define I2CPATCH  //Corrects OSD data and Navigation on Fixedwing.

/* Serial speed of the GPS */
#define GPS_SERIAL_SPEED 115200
//#define GPS_SERIAL_SPEED 38400

/* GPS protocol
 * NMEA  - Standard NMEA protocol GGA, GSA and RMC  sentences are needed
 * UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
 * MTK   - MTK binary protocol with auto setup, load (AXN1.51_2722_3329_384.1151100.5.bin) firmware to the GPS module (MTK3329 chips only)
 * With MTK and UBLOX you don't have to use GPS_FILTERING in multiwii code !!!
 *
 */

//#define NMEA
#define UBLOX
//#define MTK



// Default PID variables
//////////////////////////////////////////////////////////////////////////////
// POSHOLD control gains
//
#define POSHOLD_P      .11
#define POSHOLD_I      0.0
#define POSHOLD_IMAX      20              // degrees

#define POSHOLD_RATE_P      1.4         //
#define POSHOLD_RATE_I      0.2         // Wind control
#define POSHOLD_RATE_D      0.010         // try 2 or 3 for POSHOLD_RATE 1
#define POSHOLD_RATE_IMAX   20         // degrees
//////////////////////////////////////////////////////////////////////////////
// Navigation PID gains
//
#define NAV_P         1.4              //
#define NAV_I         0.20              // Wind control
#define NAV_D         0.006              //
#define NAV_IMAX      20              // degrees

////////////////////////////////////////////////////////////////////////////////////
// Navigational parameters and limiters initial values
//
#define CROSSTRACK_GAIN            1            // Weighting the cross track error
#define NAV_SPEED_MIN              100          // cm/sec minimum navigational speed when NAV_SLOW_NAV id false
#define NAV_SPEED_MAX              300          // cm/sec maximum navigational speed
#define NAV_BANK_MAX               2500         // 20deg max banking when navigating (just for security and testing)

////////////////////////////////////////////////////////////////////////////////////
// GPS data filtering - moving average filter vector length
//
#define GPS_FILTER_VECTOR_LENGTH 5


I have an ebay ublox CN6 GPS. I had some problems to configure it some weeks ago, so I connected with u-center software to it until I was able to see the sats in it. Later I flashed I2Cboard and also got the comunication between them and the multiwii board. But something is wrong so I lost the fix each second. I can see in the GUI sometimes (becasue I is very quick) that the number of sats becomes zero. I dont know if I have changed any vital configuration in u-center, but it seems to work ok when I attach the GPS to the software.

The airplane behaves well, and it does RTH (no tested far, so I dont have FPV yet), but the trotthle is intermitent because the GPS fix issue.

Should I flash the 2_1 version of i2c_nav?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

The config looks correct.
Can you Test the I2C gps on a V2.3 version? ex the FW Nav from April -14
https://multiwii.googlecode.com/svn/bra ... 140402.zip

Just to rule out the new MWii version and the I2C.

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

Hi Patrik. Tested with 140402. The same problem. I will flash I2CNAV board with "2_1 patched" and test the GPS unit in a quadcopter setup to isolate it.

bigcheese
Posts: 10
Joined: Sat Aug 17, 2013 12:17 am

Re: Airplane mode RTH

Post by bigcheese »

hi,

today i tried first time my flying wing with multiwii from PatrikE 2.3...
angle mode: works fine
rth: returned but then makes a biiiiiig circle nearly out of sight so steared back manual (gps deadspan 50m)
on second approach rth it was arriving on starting point and suddenly turned 90 degree heading into ground... and hit it :?
I remember a video from someone having this issue... is there a solution?
after that the lipo was flat, could this be the rootcause? too low voltage?

cheers,
bigcheese

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

Hi.
You can increase the maxvalue for roll.
Flying wing need around 35 degrees to titten the cirkling.

If you use a Mega board they is sensitive to voltage drops.
And can reboot in air.
I have browned out Board several Times.
Servos can draw higher current than you think.
Now i have a large capacitator in parallell.
But ensure your Bec can supply enough power .

bigcheese
Posts: 10
Joined: Sat Aug 17, 2013 12:17 am

Re: Airplane mode RTH

Post by bigcheese »

Thanks for the info...
I assume you mean this here: ?
/* Maximum Limits for controls */
#define GPS_MAXCORR 15 // Degrees banking Allowed by GPS.
(in the GPS.h)

today glued again the plane together ... will try next on weekend...
btw... when RTH was active the rudders where wiping up&down... perhaps this have sucked up faster the battery... :)
will add a lipo warner and timer on the TX :)

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

Yes Thats the setting.
I rather think your servos can draw high current during Short time and reboot Fc.
Do a test on the bench.
Start engine and run all servos hystericly .
Or rock the plane to simulate turbulense.
This can overload the Bec.

A reboot will defenatly send your plane on a oneway trip to the surface of the planet.

bigcheese
Posts: 10
Joined: Sat Aug 17, 2013 12:17 am

Airplane mode RTH

Post by bigcheese »

what can be done about the rudder wiping? is this a setting in the PIDs ?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

bigcheese wrote:what can be done about the rudder wiping? is this a setting in the PIDs ?

Make sure to zero the Yaw-I to avoid some known issues on rudder on planes.

This can occur when the plane have problem deciding to go right or left.
And maybe a bit when it's close to home position.

I would erase the Eeprom and start over fresh.

What version are you running?

bigcheese
Posts: 10
Joined: Sat Aug 17, 2013 12:17 am

Re: Airplane mode RTH

Post by bigcheese »

Hi PatrikE,
will check the Yaw-I...
Version I use: FW_NAV_140402 ... i thought this was the last stable official :D

thanks,
bigcheese

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

bigcheese wrote:Hi PatrikE,
will check the Yaw-I...
Version I use: FW_NAV_140402 ... i thought this was the last stable official :D

thanks,
bigcheese


The 2.3 based version (FW_NAV_140402) is recommended if you don't plan for Waypoints.
Even though i have a newer unpublished version of that too.

The newest version based on the 2.4 version with Waypoints fly smoother than the 2.3 version.
And to watch the plane fly itself is a bit scary when you let it out of sight the first times.
But honestly.. It's kind of standing and looking at someone else flying at the field... :roll:

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

PatrikE wrote:The config looks correct.
Can you Test the I2C gps on a V2.3 version? ex the FW Nav from April -14
https://multiwii.googlecode.com/svn/bra ... 140402.zip

Just to rule out the new MWii version and the I2C.


Hi Patrik, I gave the last oportunitty to my Multiwwi setup, changing the UBLOX configuration in GPS and I2CNAV board to only NMEA sentences at 115200bps.

And... now it works fine !!. No more 3Dfix blinking. Throttle is stable in RTH mode. It works like a charm.

Now it works ok with i2cNAv patched 2_1 and 2_2. It works too with FW_NAV 140402 and 150431 versions.

Also OSD working fine.

Now is time to FPV !! Thanks.

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

Just to update new reports in the GPS/FC issue.

I have been flying with NMEA setup (CN06 GPS) and I didnt have the 3D fixing problem, nor throttle "glitches" in RTH mode. In UBLOX mode I have them.

But I had a weird crash in FPV (1km far), so I checked again all the setup at home. I found that the FC sometimes starts to increase I2C_errors very quickly, and all the gyro/acc sensors go to crazy values. May be this is what happened in my crash. Or may be a brownout.

I made some tests:

As I have a openlrs RX, I switched on the telemetry and all the servos go "crazy". And the motor also starts sometimes. If
I switch off the TX all of these problem appears when the beacon activates. I knew of this issue long time ago, so I flew without telemetry.

Then, I disconnected only the GPS and the 90% of the problem dissapeared. But sometimes MW GUI conecction gets blocked, or I have the I2C_errors....It seems the GPS antenna is the door to the 433 interferences.

Later, I connected the GPS (ublox mode) in my CC3D with cleanflight (for other plane project), and I can see the 3DFIX blinking problem again (through EZIO android apk with bluetooth conected). But affortunately in this setup I dont have any interferences in servos or motor, so I will try with CC3D or naze32.

So the problem of 3DFIX is clearly my GPS module. It seems only appears with UBLOX configuration. I will check all of this again whit other GPS modules and flying controllers. May be the GPS is defective or bad configured.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

Just a few thought's...
If you don't have a ground element on the olrs antenna you can get all kind of weird things happen.( ex. original whip antenna)
A diapole antenna is better in all ways.
You can easily modify the original antenna by attaching a ~165 mm cable to the ground of the antenna connector.
Or make a proper one like this as example.
http://www.mictronics.de/2012/01/433mhz ... e-for-lrs/

Also noice coming in from ESC is a killer...
I had problem wit that on a quad with FRSky 2.4Ghz.
A U-bec solved it.

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

The antenna I have in the plane is a dipole. I had the same issue with two different openlrsng RX. No VTX active at home when making tests.

I will install the UBEC and report. Thx.

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Airplane mode RTH

Post by ardufriki »

Hi Patrik, I have been reading in fpvlabs something about the "UBLOX BUG" and a fix to it. May be that my problems with 3D fix in ublox mode have something to do with that?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

ardufriki wrote:Hi Patrik, I have been reading in fpvlabs something about the "UBLOX BUG" and a fix to it. May be that my problems with 3D fix in ublox mode have something to do with that?

It could be if you have used it on a Baseflight FC before.
Mwii don't change that setting at init like BF do.

Use U-center to check the setting.
NAV 5 should be on Portable Or Airborn <1G

Pedestrian is the "Bug" setting suitable only for slow models.

https://github.com/cleanflight/cleanfli ... tion-model

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: Airplane mode RTH

Post by ankimo »

I'm using the version of 140402 and a GPS of I2C connection.

The throttle value of the time of RTH is established low in GPS.h, but it's full throttle.
What is considered as the cause?

The height which is at the time of RTH operation is high sufficiently.

Thank you

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

If the speed is lower than 5m/s it will increase throttle to force the plane forward.
When speed and altitude is correct it will use cruise throttle setting.

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: Airplane mode RTH

Post by ankimo »

PatrikE wrote:If the speed is lower than 5m/s it will increase throttle to force the plane forward.
When speed and altitude is correct it will use cruise throttle setting.


Hi PatrikE

It was settled.
gps - pachi wasn't being used.

Let me question about one, please.
When using a GPS of MTK3339 by I2C, a GPS doesn't function until a backup battery is charged.
The number of satellites is indicated on configtool specifically, but the latitude/longitude and other information aren't indicated, and RTH/HOLD can't be used.
Is this the intended specification?

Thank you

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Airplane mode RTH

Post by PatrikE »

There's a minimum 5 sat set generally in the code for FIX.
Gps code is blocked if not FIX.

I guess you can modify the limit if you want.
But the thing is Planes use GPS also for altitude and a good 3D fix is a key.

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: Airplane mode RTH

Post by ankimo »

PatrikE wrote:There's a minimum 5 sat set generally in the code for FIX.
Gps code is blocked if not FIX.

I guess you can modify the limit if you want.
But the thing is Planes use GPS also for altitude and a good 3D fix is a key.


The number of the satellite also occurs to this phenomenon by 9.
Reproducibility is also 100%.

I'm waiting for a charge for a backup battery at present, reconnect a power supply several times and am waiting for a normal satellite addition.

Thank you

Post Reply