NMEA gps with AP 2.7

I tried to use NMEA gps with AP2.7 (svn revision 1272) and run into a strange problem:if I set GPS_PROTOCOL to 0, and load resulting code into AP, then AP failed to init.In the serial monitor I can see only few first lines of the initialization output:GPS: NMEAInit Ardupilot 2.7 BetaPWP: 0Then AP or hangs, or reboots.It looks pretty strange to me because at that point no gps related codeseems to be executed yet.I tried all other gps protocols, and they seems to work fine (at least,they do not cause such initialization failures).Could anybody try to load the nmea code to confirm this initialization problem?Any hint how to resolve it is also appreciated.Thanks,Andrew

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

Join diydrones

Email me when people reply –

Replies

  • hello

    i know that the thread is kind of old but i just put my hand on a new ardupilot legacy board, the thing is , not blue led bling neither no proper boot , with the lastr version online , when i set NEMA protocol...

    did someone found the solution?

    thanks guys

  • Thanks, Jason, I will try to reduce the nmea string buffer.

    In fact, I have already moved in same direction: with emptied init_gps() and GSC_NONE,
    nmea gps works fine. I have noticed that if size of result code is less than 26Kb, everything
    works fine. If this limit is exceeded (by adding debug stuff, for instance), then AP failed to init.

    BTW, with enabled nmea gps I run into a problem with the throttle in modes FBW_B and above:
    servo_out[CH_THROTTLE] is always zero due to huge negative value returned by the PID() function.
    With GPS_NONE throttle seems to be fine. Could you please drop a hint what I should look for?

    Thanks,
    Andrew.
  • Developer
    At first glance it looks like NMEA is running out of RAM with that large 200 byte buffer. Can you try and make the buffer smaller and or try the GSC_NONE option? turning off GCS output will use much less RAM and prove the point.
    Jason
  • Hans, thanks for the confirmation.

    Jason, thanks for the fix.

    However, from my point of view the missed semicolon is a minor problem. Main issue seems to be
    an AP hang at initialization phase, when NMEA gps is enabled.
    I found that removing any code from nmea's init_gps() makes the problem gone(i.e. AP is able to boot normally).
    It can be used as a workaround, but it would be great to find the reason of the hang.

    Thanks,
    Andrew.
  • Developer
    I posted a fix to the ";" issue on the SVN.
    Line 173 was missing a ";"
  • Hi Andrew,

    I tried to confirm the Initialization problem.(ArduPilot 2.7 beta 3)
    With no NMEA GPS i got a Compile error with GPS 0 and GCS 5 (Error exspected ";" before token - in function decode GPS)

    GPS 4 and GCS 1: Compile Error: redefinition of ´void print_current_waypoints()

    I was able to duplicate the error with GPS 4 and GCS 0
    Transfer ends after: "Init Line + | %%% PWP: 0,0,: " No error Message.

    Hans

    Model Configuration: Easy GliderPro;ÁrduPilot; Paparazzi Thermopiles + XY+Z, Blue Shield, MTek GPS; 7,2Volt LiPo; Motor: BL2200KV; Prop: 11x8, Spektrum RC; no Telemetry

    AE_Config.h

    AE_PID_settings.h

    https://storage.ning.com/topology/rest/1.0/file/get/3692072793?profile=original
This reply was deleted.

Activity