5iMX宗旨:分享遥控模型兴趣爱好

5iMX.com 我爱模型 玩家论坛 ——专业遥控模型和无人机玩家论坛(玩模型就上我爱模型,创始于2003年)
查看: 1132|回复: 9
打印 上一主题 下一主题

MWC GPS问题

[复制链接]
跳转到指定楼层
楼主
发表于 2014-6-16 23:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
鼓捣了几天,终于搜索到信号了
GPS模块直连电脑定位正常,连接I2C转接板后,转接板上的指示灯以每秒3次的频率闪烁,证明搜星正常
然后在GUI里面就是这个样子了
GPS_fix那里变绿了,但是各项数值显示都是-1,I2C Error和cycle time 那里的数值也是一会大一会小
不知道哪里还有啥问题,麻烦各位给看看


欢迎继续阅读楼主其他信息

沙发
发表于 2014-6-17 00:24 | 只看该作者
导航板的红灯正常频闪只代表了GPS和导航板的串口通讯正常,不代表导航板和主控通讯正常。请检查一下导航板固件和主控固件的I2C GPS通讯协议是否匹配。
3
发表于 2014-6-17 08:44 | 只看该作者
请问这是个什么界面啊,求指点。
4
 楼主| 发表于 2014-6-17 09:34 | 只看该作者
主控板config gps部分的代码
  1. /**************************************************************************************/
  2.   /***********************                  GPS                **************************/
  3.   /**************************************************************************************/

  4.     /* GPS using a SERIAL port
  5.        if enabled, define here the Arduino Serial port number a n d the UART speed
  6.        note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
  7.        in NMEA mode the GPS must be configured to output GGA a n d RMC NMEA sentences (which is generally the default conf for most GPS devices)
  8.        at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */
  9.       
  10.     //#define GPS_SERIAL 2         // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
  11.     //#define GPS_PROMINI_SERIAL   // Will Autosense if GPS is connected when ardu boots.

  12.     // avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
  13.     #define GPS_BAUD   115200

  14.    /* GPS protocol
  15.        NMEA  - Sta n dard NMEA protocol GGA, GSA a n d RMC  sentences are needed
  16.        UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
  17.        MTK_BINARY16 a n d MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
  18.        With UBLOX a n d MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */

  19.    
  20.     //#define NMEA
  21.     #define UBLOX
  22.     //#define MTK_BINARY16
  23.     //#define MTK_BINARY19
  24.     //#define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate a n d GGA & RMC sentence or binary settings

  25.    
  26.     /* I2C GPS device made with an independant arduino + GPS device
  27.        including some navigation functions
  28.        contribution from EOSBa n di   http://code.google.com/p/i2c-gps-nav/
  29.        You have to use at least I2CGpsNav code r33 */
  30.     #define I2C_GPS
  31.     // If your I2C GPS board has Sonar support enabled
  32.     //#define I2C_GPS_SONAR

  33.     /* GPS data readed from Misio-OSD - GPS module connected to OSD, a n d MultiWii read GPS data from OSD - tested a n d working OK ! */
  34.     //#define GPS_FROM_OSD

  35.     /* 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
  36.       - No GPS FIX -> LED blink at speed of incoming GPS frames
  37.       - Fix a n d sat no. bellow 5 -> LED off
  38.       - Fix a n d sat no. >= 5 -> LED blinks, one blink for 5 sat, two blinks for 6 sat, three for 7 ... */
  39.     #define GPS_LED_INDICATOR

  40.     //#define USE_MSP_WP                        //Enables the MSP_WP comma n d, which is used by WinGUI to display a n d log Home a n d Poshold positions

  41.     //#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)

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

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


5
 楼主| 发表于 2014-6-17 09:37 | 只看该作者
导航板的config代码
直接发代码报攻击,只有发图了


两边的I2C gps都打开了 波特率115200


6
 楼主| 发表于 2014-6-17 09:39 | 只看该作者
主控GPS控制部分
  1. /**************************************************************************************/
  2.   /***********************                  GPS                **************************/
  3.   /**************************************************************************************/

  4.     /* GPS using a SERIAL port
  5.        if enabled, define here the Arduino Serial port number a n d the UART speed
  6.        note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
  7.        in NMEA mode the GPS must be configured to output GGA a n d RMC NMEA sentences (which is generally the default conf for most GPS devices)
  8.        at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */
  9.       
  10.     //#define GPS_SERIAL 2         // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
  11.     //#define GPS_PROMINI_SERIAL   // Will Autosense if GPS is connected when ardu boots.

  12.     // avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
  13.     #define GPS_BAUD   115200

  14.    /* GPS protocol
  15.        NMEA  - Sta n dard NMEA protocol GGA, GSA a n d RMC  sentences are needed
  16.        UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
  17.        MTK_BINARY16 a n d MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
  18.        With UBLOX a n d MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */

  19.    
  20.     //#define NMEA
  21.     #define UBLOX
  22.     //#define MTK_BINARY16
  23.     //#define MTK_BINARY19
  24.     //#define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate a n d GGA & RMC sentence or binary settings

  25.    
  26.     /* I2C GPS device made with an independant arduino + GPS device
  27.        including some navigation functions
  28.        contribution from EOSBa n di   http://code.google.com/p/i2c-gps-nav/
  29.        You have to use at least I2CGpsNav code r33 */
  30.     #define I2C_GPS
  31.     // If your I2C GPS board has Sonar support enabled
  32.     //#define I2C_GPS_SONAR

  33.     /* GPS data readed from Misio-OSD - GPS module connected to OSD, a n d MultiWii read GPS data from OSD - tested a n d working OK ! */
  34.     //#define GPS_FROM_OSD

  35.     /* 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
  36.       - No GPS FIX -> LED blink at speed of incoming GPS frames
  37.       - Fix a n d sat no. bellow 5 -> LED off
  38.       - Fix a n d sat no. >= 5 -> LED blinks, one blink for 5 sat, two blinks for 6 sat, three for 7 ... */
  39.     #define GPS_LED_INDICATOR

  40.     //#define USE_MSP_WP                        //Enables the MSP_WP comma n d, which is used by WinGUI to display a n d log Home a n d Poshold positions

  41.     //#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)

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

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

7
 楼主| 发表于 2014-6-17 14:47 | 只看该作者
MWC的高人來個回覆啊
8
发表于 2014-6-18 09:01 | 只看该作者
还让解答什么?导航版指示灯每秒闪三下就说明搜到卫星了,该定点就可以设置调试定点了,你管他那个数据忽大忽小呢
9
发表于 2014-7-26 11:26 | 只看该作者
请问楼主,买来的导航版(转接板)是不是要单独刷代码才能用,如果是,代码在哪里可以找到啊
10
 楼主| 发表于 2014-7-26 13:15 | 只看该作者
搜索 I2C GPS NAV,谷歌代码上有
https://code.google.com/p/i2c-gps-nav/
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

关闭

【站内推荐】上一条 /1 下一条

快速回复 返回顶部 返回列表