Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proper NMEA GPS message parser #120

Closed
flixr opened this issue Jan 25, 2012 · 7 comments
Closed

proper NMEA GPS message parser #120

flixr opened this issue Jan 25, 2012 · 7 comments
Labels

Comments

@flixr
Copy link
Member

flixr commented Jan 25, 2012

The NMEA parser needs some love... and testing...

Parsing GGA and RMC is complete, GSA and other records are incomplete.

@flixr
Copy link
Member Author

flixr commented May 4, 2012

I fixed some things in the NMEA parser so it is at least partially usable now.
75b35da...b064e2e

@adevitt You mentioned you did some more work on NMEA parsing for paparazzi if I remember correctly?

@xgibert
Copy link
Contributor

xgibert commented Jun 1, 2012

Hello,

I bought the LS23060 GPS in Sparkfun. The GPS is using NMEA protocol. I tried to put "nmea" in the airframe file but it does not compile. It only happens with this option. Looks like I'm missing some library or something:
ERROR:
...
LD /home/xavi/pprz_user/var/EasyStarII/ap/ap.elf
/opt/paparazzi/arm-multilib/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/thumb/libc.a(lib_a-sbrkr.o): In function _sbrk_r': /build/buildd/paparazzi-arm-multilib-1.2.2/build/gcc/arm-none-eabi/thumb/newlib/libc/reent/../../../../../../../src/gcc-linaro-4.6-2011.09-1/newlib/libc/reent/sbrkr.c:60: undefined reference to_sbrk'
collect2: ld returned 1 exit status

Anyone had the same problem? I tried with an olther version of Paparazzi and the error is different but also about the libc.a

Thanks

@flixr
Copy link
Member Author

flixr commented Jun 1, 2012

Hm... no idea.
Compiles fine for the stm32...

@xgibert
Copy link
Contributor

xgibert commented Jun 2, 2012

For what I've seen It's a problem with a malloc call and the newlib. I found the implementation of the missing function _sbrk and they say that should be in a file called syscalls.c. The problem is that I don't know where to put it and if including it directly in the gps_nmea.h will work.

There is many people posting problems with that for other softwares and even creating simple programs using malloc. But I don't know which function of the NMEA file is using malloc. Because is not explicit in the code. Probably is one function called by other...

@flixr
Copy link
Member Author

flixr commented Jun 2, 2012

Hm... yeah... any pointers on how to fix the toolchain to properly deal with this would be appreciated. It obviously works for the STM32.

There aren't any other functions called apart from stdlib functions. Maybe the functions strtod (and the like) allocate something internally if you pass an endpointer? Maybe passing NULL instead would prevent that? Would be cool if you could check that.

@xgibert
Copy link
Contributor

xgibert commented Jun 4, 2012

I located the error in the strtod function. After many tests without result I decided to replace the function for one manually implemented. I commented everithing in the function and I was returning a hard-coded value all the time and even that I was getting no values of the GPS. Maybe the GPS module needs to be specially configured, maybe there is another problem, I really don't know.
I quit because I can't spend so much time configuring the GPS. I have other parts of the aircraft with problems too. The funny thig is that now I'm having problems to configure an ublox. So hard all of this...
Anyway thanks for helping me.

@flixr
Copy link
Member Author

flixr commented Apr 23, 2013

Closing this, since basic position works and using NMEA is not recommended anyway...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants