Welcome to Multi-Rotor UK. Please login or sign up.

Friday,August 23, 2019, 01:33:51

Login with username, password and session length

Shoutbox

Gaza07:
22 Aug 2019 22:47:32
Sorted mate  ~~
Andy7:
22 Aug 2019 10:27:36
Sure. But basically, all the subjects are getting cut off.
Gaza07:
21 Aug 2019 18:14:54
Can you pm me a screen shot of what you mean
Andy7:
21 Aug 2019 12:15:41
Gaza - can you make the subject line section in the forum topic list wider? It's cutting off the subject field really short.
Andy7:
19 Aug 2019 09:14:20
Good for you!  ~~
DarkButterfly:
18 Aug 2019 19:13:57
Had another negative encounter, it's been a few years since the last one, just an uneducated ******, going on about drones being illegal yada yada yada.    :-/
Still that didn't spoil my flying time, had an absolute blast  ~~
Gaza07:
07 Aug 2019 19:52:01
ooooh mrs jones  :D
hoverfly:
30 Jul 2019 15:26:34
D.B. you tightwad.. :cool:
atomiclama:
29 Jul 2019 20:14:10
DB that just means you have shed loads of props in the first place ;-)
DarkButterfly:
29 Jul 2019 18:53:33
Just had a thought, even with all the crashing I've done, I haven't bought any replacement props in over a year ~~
Members
  • Total Members: 8066
  • Latest: badger1
Stats
  • Total Posts: 196578
  • Total Topics: 19804
  • Online Today: 44
  • Online Ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 45
Total: 45

Theme Changer





3d - Printworx

Printing 3d Forum

Multiwii 2.2 GPS tuning

Started by teslahed, Wednesday,March 13, 2013, 18:42:31

Previous topic - Next topic

teslahed

So far i';ve managed to get satellites to pick up on my crius All in one pro v1 board with the ublox GPS but i';ve failed to get my quadcopter holding position or returning to home. These are my settings;

/**************************************************************************************/
  /***********************                  GPS                **************************/
  /**************************************************************************************/

    /* GPS using a SERIAL port
       if enabled, define here the Arduino Serial port number and the UART speed
       note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
       in NMEA mode the GPS must be configured to output GGA and RMC NMEA sentences (which is generally the default conf for most GPS devices)
       at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */
    #define GPS_SERIAL 3 // should be 2 for flyduino v2. It';s the serial port number on arduino MEGA
    #define GPS_BAUD   57600
    //#define GPS_BAUD   115200


   /* 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_BINARY16 and MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
       With UBLOX and MTK_BINARY you don';t have to use GPS_FILTERING in multiwii code !!! */

   
    //#define NMEA
    #define UBLOX
    //#define MTK_BINARY16
    //#define MTK_BINARY19
    //#define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings

    //#define GPS_PROMINI_SERIAL    57600 // Will Autosense if GPS is connected when ardu boots
   
    /* I2C GPS device made with an independant arduino + GPS device
       including some navigation functions
       contribution from EOSBandi   http://code.google.com/p/i2c-gps-nav/
       You have to use at least I2CGpsNav code r33 */
    //#define I2C_GPS

    /* I2C GPS device made with an indeedent ATTiny[24]313 + GPS device and
       optional sonar device.    https://github.com/wertarbyte/tiny-gps/ */
    /* get GPS data from Tiny-GPS */
    //#define TINY_GPS
    /* get sonar data from Tiny-GPS */
    //#define TINY_GPS_SONAR

    /* GPS data readed from Misio-OSD - GPS module connected to OSD, and MultiWii read GPS data from OSD - tested and working OK ! */
    //#define GPS_FROM_OSD

    /* indicate a valid GPS fix with at least 5 satellites by flashing the LED  - Modified by MIS - Using stable LED (YELLOW on CRIUS AIO) led work as sat number indicator
      - No GPS FIX -> LED blink at speed of incoming GPS frames
      - Fix and sat no. bellow 5 -> LED off
      - Fix and sat no. >= 5 -> LED blinks, one blink for 5 sat, two blinks for 6 sat, three for 7 ... */
    #define GPS_LED_INDICATOR

    //#define USE_MSP_WP                        //Enables the MSP_WP command, which is used by WinGUI to display and log Home and Poshold positions

    //#define DONT_RESET_HOME_AT_ARM             // HOME position is reset at every arm, uncomment it to prohibit it (you can set home position with GyroCalibration)

    /* GPS navigation can control the heading */
   
    #define NAV_CONTROLS_HEADING       true      // copter faces toward the navigation point, maghold must be enabled for it
    #define NAV_TAIL_FIRST             false     // true - copter comes in with tail first
    #define NAV_SET_TAKEOFF_HEADING    true      // true - when copter arrives to home position it rotates it';s head to takeoff direction
   
   
    /* Get your magnetic decliniation from here : http://magnetic-declination.com/
       Convert the degree+minutes into decimal degree by ==> degree+minutes*(1/60)
       Note the sign on declination it could be negative or positive (WEST or EAST) */
    //#define MAG_DECLINIATION  3.96f              //For Budapest Hungary.
    #define MAG_DECLINIATION  0.0f

    #define GPS_LEAD_FILTER                      // Adds a forward predictive filterig to compensate gps lag. Code based on Jason Short';s lead filter implementation
   
    //#define GPS_FILTERING                        // add a 5 element moving average filter to GPS coordinates, helps eliminate gps noise but adds latency comment out to disable
    #define GPS_WP_RADIUS              200       // if we are within this distance to a waypoint then we consider it reached (distance is in cm)
    #define NAV_SLEW_RATE              30        // Adds a rate control to nav output, will smoothen out nav angle spikes

One circlip short of a quadcopter.
 1 lobe short of an antenna.

bunnygirl80

Chris,

I have the following commented out

//#define GPS_SERIAL
//#define GPS_BAUD

You dont need these with the CN-06.

then un comment

#define I2C_GPS

that should be it
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. www.aerialworx.co.uk

teslahed

Wednesday,March 13, 2013, 18:47:56 #2 Last Edit: Wednesday,March 13, 2013, 19:08:30 by teslahed
I think you are using the i2c adapter stef - it';s different with the mega boards as they use the serial connection. That';s why i have it commented in.

Edit - just moved the UBEC further away from the underside of my Flight controller after Stef suggested i give that a try. Unfortunately i can';t test it until tomorrow now.

The last GPS test was exciting though. It flew the wrong way when i tried return to home until it was off in the distance and i lost orientation (was getting dark, no LEDs as still testing the quadcopter). I had to ditch it in a thicket full of brambles.

I had to go home for a long metal pole and a torch as it was starting to get dark, then return and walk out a search grid. I knew roughly where it was but it still took me a panicked 20 mins to find it.

No damage though - quite relieved!
One circlip short of a quadcopter.
 1 lobe short of an antenna.

bunnygirl80

Hi Chris,

I';ve got my fingers crossed for you! I hope this solves your problem!

Thxx
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. www.aerialworx.co.uk

teslahed

Calculating Magnetic Declination;

First check here for magnetic declination: http://magnetic-declination.com/

Then use this website to convert to decimal values: http://www.satsig.net/degrees-minutes-seconds-calculator.htm

Leave seconds at 0 as you don';t have that much detail.

For Lancaster i get

-2.65

So i have set my magnetic declination to;

#define MAG_DECLINIATION  -2.65f
One circlip short of a quadcopter.
 1 lobe short of an antenna.

bunnygirl80

How are you getting on with this Chris? I';ve just upgraded to MultiWii 2.2 and it works well. It seems a little more stable and the default PIDs are more suited to my quad. On MW2.1 I have my P for roll and pitch up to 5.8, but it doesn';t seem to like these settings now! So, I';ve reset to default and will determine the best PIDs when the weather is better!

As far as the magnetic declination is concerned, I have three of them in the code based on my most popular flying spots. It is surprising how much of a difference there is between places a 100 miles apart! A lot! I';m not sure how much of a difference this will make though when you arm (it records your position) then you fly somewhere and RTH! I would like to assume that it will return to the same settings that you took off from, so in theory the magnetic declination shouldn';t make any difference! UNLESS, you were using GPS-coords for something like waypoints! What do you think?
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. www.aerialworx.co.uk

teslahed

I';ve not had much of a chance to test things as the weather has been so bad.

I';ve shortened some wires, relocated the receiver and GPS unit further apart from each other and set the speed back down to 57600 in the multiwii code just in case that will help at all.

I';ll let you know if it';s made a difference next time i get to fly.

I';ve just fitted a bluetooth device to the quadcopter in question as well - hopefully i will be able to tune the PIDs faster using my phone now.

Quote from: bunnygirl80 on Sunday,March 24, 2013, 15:30:06 It seems a little more stable and the default PIDs are more suited to my quad. On MW2.1 I have my P for roll and pitch up to 5.8, but it doesn';t seem to like these settings now! So, I';ve reset to default and will determine the best PIDs when the weather is better!


I notice that the defaults PIDs have altered P from 4.0 down to 3.2 for Pitch and Roll. Therefore it';s possible that if you were using 5.8 before you might want to try 5.0 now.

That';s what i did anyway - i haven';t had to alter anything other than that really.
One circlip short of a quadcopter.
 1 lobe short of an antenna.