Activation d'un GPS MTK 3329

Modérateur : Dehas

Avatar du membre
jeff32
Bicopter
Messages : 31
Enregistré le : mer. 28 janv. 2015 22:15
Réputation : 0

Activation d'un GPS MTK 3329

Message non lu par jeff32 »

Bonjour à tous
J'essaie de programmer une carte Multiwii Pro avec GPS MTK 3329.
J'utilise le logiciel Multiwii 2.4 et le GPS est bien identifié dans MultiwiiConf et WinGUi 2.3 mais il ne fonctionne manifestement pas!
Y a -t-il a programmer quelque chose de particulier?

Merci de votre aide!


Avatar du membre
Dehas
Administrateur du site
Messages : 16171
Enregistré le : ven. 3 juin 2011 12:50
Réputation : 5
Localisation : Saint Dié des Vosges
Genre :
Contact :

Re: Activation d'un GPS MTK 3329

Message non lu par Dehas »

Attention WinGui ne fonctionne pas bien avec MW2..
Dans le fichier config.h, il faut définir ton gps, il faut que tu recherche ça

Code : Tout sélectionner

    
//#define MTK_BINARY16
//#define MTK_BINARY19
Et que tu enlève les // sur un des 2
Si un autre est définie, il faut lui remettre les // devant
Fais un test avec un des 2, si ça fonctionne pas tu essaye l'autre.
Tu réinjecte le bazar et tu teste.


Avatar du membre
jeff32
Bicopter
Messages : 31
Enregistré le : mer. 28 janv. 2015 22:15
Réputation : 0

Re: Activation d'un GPS MTK 3329

Message non lu par jeff32 »

Bonjour,

J'ai décommenté alternativement les 2 propositions, mais rien ne fonctionné!
j'ai également essayé de décommenté en même temps:

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

Sans plus de succès!

Je me demande si le GPS fonctionne effectivement, bien que sa led rouge fonctionne!
Merci de tes conseils


Avatar du membre
Dehas
Administrateur du site
Messages : 16171
Enregistré le : ven. 3 juin 2011 12:50
Réputation : 5
Localisation : Saint Dié des Vosges
Genre :
Contact :

Re: Activation d'un GPS MTK 3329

Message non lu par Dehas »

Tu as essayé comme ça

Code : Tout sélectionner

    /* ENable this for using GPS simulator (NMEA only)*/
    //#define GPS_SIMULATOR

    /* 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 2         // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
                                   // must be 0 for PRO_MINI (ex GPS_PRO_MINI)
                                   // note: Now a GPS can share MSP on the same port. The only constrain is to not use it simultaneously, and use the same port speed.

    // avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
    #define GPS_BAUD   57600       // GPS_BAUD will override SERIALx_COM_SPEED for the selected port

   /* 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
Il faut que ton GPS soit bien en 57600 de Baudrate.


Avatar du membre
jeff32
Bicopter
Messages : 31
Enregistré le : mer. 28 janv. 2015 22:15
Réputation : 0

Re: Activation d'un GPS MTK 3329

Message non lu par jeff32 »

Le GPS est bien a 57600 .
J'ai bien la configuration que tu as donné mais ça ne fonctionne toujours pas.
N'a t-il pas d'autres paramétrages à faire?


Avatar du membre
Dehas
Administrateur du site
Messages : 16171
Enregistré le : ven. 3 juin 2011 12:50
Réputation : 5
Localisation : Saint Dié des Vosges
Genre :
Contact :

Re: Activation d'un GPS MTK 3329

Message non lu par Dehas »

Tu teste comment ??


Avatar du membre
jeff32
Bicopter
Messages : 31
Enregistré le : mer. 28 janv. 2015 22:15
Réputation : 0

Re: Activation d'un GPS MTK 3329

Message non lu par jeff32 »

Je fais les modifications dans "config h" et charge le sketch modifié puis sors dehors pour vérifier le fonctionnement dans "Multiwii Conf" et "WinGui"!


Avatar du membre
jeff32
Bicopter
Messages : 31
Enregistré le : mer. 28 janv. 2015 22:15
Réputation : 0

Re: Activation d'un GPS MTK 3329

Message non lu par jeff32 »

Ca y est!
J'ai trouvé la bonne combinaison:

Il faut:
1-retirer les// sur
#define NMEA
et sur
#define INIT_MTK_GPS // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings
et
#define GPS_FILTERING //(**)
Et charger ce sketch
2- remettre les // sur
#define INIT_MTK_GPS // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings
et
#define INIT_MTK_GPS // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings
et
//#define INIT_MTK_GPS // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings
Et charger a nouveau ce sketch.
Et ça fonctionne§
Merci de ton aide qui m'a poussée à chercher toutes les solutions


Avatar du membre
Dehas
Administrateur du site
Messages : 16171
Enregistré le : ven. 3 juin 2011 12:50
Réputation : 5
Localisation : Saint Dié des Vosges
Genre :
Contact :

Re: Activation d'un GPS MTK 3329

Message non lu par Dehas »

:super:


Avatar du membre
NIC0LAS
Bicopter
Messages : 37
Enregistré le : ven. 30 janv. 2015 11:17
Réputation : 0
Localisation : NEVERS

Re: Activation d'un GPS MTK 3329

Message non lu par NIC0LAS »

Et c'est tout?
pourrez tu STP mettre tout le code au niveau GPS pour que je compare.
Merci


Avatar du membre
NIC0LAS
Bicopter
Messages : 37
Enregistré le : ven. 30 janv. 2015 11:17
Réputation : 0
Localisation : NEVERS

Re: Activation d'un GPS MTK 3329

Message non lu par NIC0LAS »

J'ai tout essayé impossible de refaire fonctionner le GPS...
Comment faire
il a fonctionné au début, un jours j'ai modifié des lignes et depuis impossible de le refaire fonctionner!!


Avatar du membre
Dehas
Administrateur du site
Messages : 16171
Enregistré le : ven. 3 juin 2011 12:50
Réputation : 5
Localisation : Saint Dié des Vosges
Genre :
Contact :

Re: Activation d'un GPS MTK 3329

Message non lu par Dehas »

Tu te rappelle plus des lignes que tu as modifié ??


Avatar du membre
NIC0LAS
Bicopter
Messages : 37
Enregistré le : ven. 30 janv. 2015 11:17
Réputation : 0
Localisation : NEVERS

Re: Activation d'un GPS MTK 3329

Message non lu par NIC0LAS »

seulement les hauteurs et distances pour les waitpoint...


Avatar du membre
NIC0LAS
Bicopter
Messages : 37
Enregistré le : ven. 30 janv. 2015 11:17
Réputation : 0
Localisation : NEVERS

Re: Activation d'un GPS MTK 3329

Message non lu par NIC0LAS »

et en fonctionnement normal comment est la led? rouge?
sur GUY et bien il me marque q'il y a GPS mais il trouve pas les satellites...


Avatar du membre
NIC0LAS
Bicopter
Messages : 37
Enregistré le : ven. 30 janv. 2015 11:17
Réputation : 0
Localisation : NEVERS

Re: Activation d'un GPS MTK 3329

Message non lu par NIC0LAS »

Code : Tout sélectionner

    /* ENable this for using GPS simulator (NMEA only)*/
    //#define GPS_SIMULATOR

    /* 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 2         // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
                                   // must be 0 for PRO_MINI (ex GPS_PRO_MINI)
                                   // note: Now a GPS can share MSP on the same port. The only constrain is to not use it simultaneously, and use the same port speed.

    // avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
    #define GPS_BAUD   57600     // GPS_BAUD will override SERIALx_COM_SPEED for the selected port

   /* 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


    /* 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 */
    /* all functionnalities allowed by SERIAL_GPS are now available for I2C_GPS: all relevant navigation computations are gathered in the main FC */

    //#define I2C_GPS

    // If your I2C GPS board has Sonar support enabled
    //#define I2C_GPS_SONAR

    /* 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

   //Enables the MSP_WP command set , which is used by WinGUI for displaying an setting up navigation
   #define USE_MSP_WP

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

/* GPS navigation can control the heading */

// copter faces toward the navigation point, maghold must be enabled for it
#define NAV_CONTROLS_HEADING       1    //(**)
// true - copter comes in with tail first
#define NAV_TAIL_FIRST             0    //(**)
// true - when copter arrives to home position it rotates it's head to takeoff direction
#define NAV_SET_TAKEOFF_HEADING    1    //(**)

/* Get your magnetic declination 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)
Also note, that maqgnetic declination changes with time, so recheck your value every 3-6 months */
#define MAG_DECLINATION  4.02f   //(**)

// Adds a forward predictive filterig to compensate gps lag. Code based on Jason Short's lead filter implementation
#define GPS_LEAD_FILTER               //(**)

// add a 5 element moving average filter to GPS coordinates, helps eliminate gps noise but adds latency comment out to disable
// use it with NMEA gps only 
#define GPS_FILTERING                 //(**)

// if we are within this distance to a waypoint then we consider it reached (distance is in cm)
#define GPS_WP_RADIUS              100      //(**)

// Safe WP distance, do not start mission if the first wp distance is larger than this number (in meters)
// Also aborts mission if the next waypoint distance is more than this number
#define SAFE_WP_DISTANCE           500      //(**)

//Maximu allowable navigation altitude (in meters) automatic altitude control will not go above this height
#define MAX_NAV_ALTITUDE           50   //(**)

// minimum speed when approach waypoint
#define NAV_SPEED_MIN              100    // cm/sec //(**)
// maximum speed to reach between waypoints
#define NAV_SPEED_MAX              250    // cm/sec //(**)
// Slow down to zero when reaching waypoint (same as NAV_SPEED_MIN = 0)
#define NAV_SLOW_NAV               100      //(**)
// Weight factor of the crosstrack error in navigation calculations (do not touch)
#define CROSSTRACK_GAIN            .4     //(**)
// Maximum allowable banking than navigation outputs
#define NAV_BANK_MAX 3000                 //(**)

//Defines the RTH altitude. 0 means keep current alt during RTH (in meters)
#define RTH_ALTITUDE               8        //(**)
//Wait to reach RTH alt before start moving to home (0-no, 1-yes)
#define WAIT_FOR_RTH_ALT           1         //(**)

//Navigation engine will takeover BARO mode control
#define NAV_TAKEOVER_BARO          1         //(**)

//Throttle stick input will be ignored  (only in BARO)
#define IGNORE_THROTTLE            1         //(**)

//If FENCE DISTANCE is larger than 0 then copter will switch to RTH when it farther from home
//than the defined number in meters
#define FENCE_DISTANCE      400

//This governs the descent speed during landing. 100 is equals approc 50cm/sec
#define LAND_SPEED          50


    //#define ONLY_ALLOW_ARM_WITH_GPS_3DFIX      // Only allow FC arming if GPS has a 3D fix.


Avatar du membre
NIC0LAS
Bicopter
Messages : 37
Enregistré le : ven. 30 janv. 2015 11:17
Réputation : 0
Localisation : NEVERS

Re: Activation d'un GPS MTK 3329

Message non lu par NIC0LAS »

Et bien a rien y comprendre ça fonctionne après avoir beaucoup bidouillé sur le code....


Répondre

Retourner vers « Cartes a base de Multiwii »