/**************************************************************************************/ /*********************** 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 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA //#define GPS_BAUD 57600 #define GPS_BAUD 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_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 我的是这样改的 几个地方要开启的 |
欢迎继续阅读楼主其他信息
/**************************************************************************************/ /*********************** 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 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA //#define GPS_BAUD 57600 #define GPS_BAUD 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_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 这样改 |
学习了。 |
感謝分享! |
本帖最后由 haujj 于 2013-5-20 14:44 编辑 呵呵。按你的设置搞好了gps没信号问题了,谢谢哦 |
本帖最后由 gxhifi 于 2013-4-16 00:24 编辑 你用的GPS好像和我的差不多! 应该可以用这个软件 u-center 你度娘一下就懂! 然后用USB的刷机TTL端子接上你的GPS然后再接到电脑上!就可以配合这个软件搜星了! 进入那软件后.有个自动搜波特段的功能.点了后就能找到你的GPS的工作波特率.然后就可以把这波特率信息也写到MWC的GPS模块的波特代码里就差不多了! 需要注意的是.反正我那块MWC的板是只有第二端口可以接GPS.这个也可以在代码提示里说到! ============== #define GPS_SERIAL 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA //自己度娘看看心里更有数 #define GPS_BAUD 38400 //我那块GPS的工作波率 ====================== /* 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 1.866666666666667f //这个是需要计算的!通过上面的网站和下面第二句的计算方法和你当地的所属东或西来计算 我记得坛子里有位大神有说过.我也是从那学来的. |
本帖最后由 fryefryefrye 于 2013-4-15 18:31 编辑 唉,怎么说那出现的也是英文的报错提示,你怎么能说是乱码呢。 楼主你要说清楚你用的是什么板子。接的什么GPS,怎么接的。 MWC的GPS只要修改了代码,那个就会变绿,那些缺失的选项就会出来。和你接不接GPS没有任何关系。 然后你正确的接上GPS才能看到搜星信息和定位信息。 ================ 改代码的时候,你要选择打开“MultiWii.ino”这个文件,然后config.h文件会自动一起打开。这个时候点击上传才能成功。 你好像是自己直接打开了config.h,这样是不行的。 |
MWC应该出个全功能版…… |
可以了~看来是这块MWC的接口问题!还要指定接哪个的 |
上传前使用自检功能查一下,存后再上传吧~ 问题是我现在能把GPS那变红了!可是还是搜不到星~用u-center查到我那GPS模块应该是工作在38400波特的!可是还是不行! |
舞戈翔云 发表于 2013-2-23 23:40 /**************************************************************************************/ /*********************** 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 2 // 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 #define GPS_PROMINI_SERIAL 115200 /* 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 -3.5955775f #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 修改上传试试 |