Send NMEA sentences to Pixhawk serial port E

Hi,

I'm trying to send synthetic NMEA sentences to Pixhawk (3DR IRIS+) as a fake GPS for indoor navigation, but it seems that Pixhawk doesn't response to it. My settings are:
-- FTDI cable connect to serial 4/5 on Pixhawk (uartE), with Tx to Rx and Rx to Tx, GND to GND.
-- NMEA sentence: $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
-- baudrate = 38400, stopbit=1, parity='N', from USB port on Raspberry Pi2
-- Mission planner parameter setting: GPS_TYPE2 = 5, SERIAL4_PROTOCOL = 1 (also tried 5)

On Mission planner, gpsstatus (uBlox) is 1 since I'm indoor, but gpsstatus2 (FTDI) is 0, no gps detected/received. Could anyone shed a light on the problem? Thanks a lot!

I've searched across the forum and seen similar problems, but unfortunately no solid solution was provided..

I was reading through the source code, and in AP_GPS.cpp (line 276) changed it to not skip NMEA, and in AP_GPS_NMEA.cpp directly "return true" in function AP_GPS_NMEA::_detect(..), but still no success.. I have tried on Ardupilot 3.4, 3.3, and 3.2.1

Any help would be appreciated!!

P.S.: I also tried to switch the connectors on the two GPS ports on Pixhawk and set GPS_TYPE = 5, GPS_TYPE2 = 2, and it successfully deteced ublox on second GPS port, but no input on first GPS port, indicating both ports are fine, but the setting for NMEA is somehow not working........

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Try to switch the fake GPS on main GPS port, and put GPS_TYPE = 1 (it should be autodetect).

    Then you need to build 3 NMEA messages: GGA, VTG, RMC

    Is the serial: 38400,8,1,N?

    • Thanks! Yeah, I tried with main GPS port, but still no auto / manual detection. The serial is indeed 38400, 8,1, N.

      Anyway, at the end I brutally recoded the detection to not perform detection at all but trust what I am sending are NMEA strings and go ahead decode..it worked just fine, of'course at the cost of only using that particular port.

      • Hi  csmiler & Tuloski,

        No luck for me... just yet!

        I'm trying to do the same thing to provide an RTK GPS input.

        I have tried everything stated above, does the talker ID matter? In that, can the pixhawk handle GN message or only GP? Does the epoch time have to be at 5Hz or faster or is 1Hz sufficient? Do I need to ensure that glonass sats or any other constellation values are not transmitted in the message.

        What do you mean by "brutally recoded the detection to not perform detection at all but trust what I am sending is NMEA"...?? have you gone and edited part of the firmware to make this happen, can you go into detail on what I need to do?

        My port settings are all correct as I can tell because I have been using another free NMEA reader and viewer (VISGPS) with no issues.

        • Those are the main points to how I achieved a "fake" GPS:

          - I'm using APM code! (for pixhawk code it accepts directly vicon data via MAVlink)

          - GPS_TYPE = 1 (autodetect)

          - Connect serial link to GPS input on pixhawk

          - Send via serial 3 NMEA messages: GGA, VTG, RMC

          - The frequency can be 1Hz or even higher...I tried up to 10Hz

          - Fill every field of messages (with appropriate units)

          What ID are you talking about? 
          I never tried GN...just GPS, so try to avoid sending glonass.

This reply was deleted.

Activity