This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

changing the ncs nrf driver for agps sample

I want to build on the agps sample for 9160-dk

This involves changing the destination and format of outputs to cloud

I saw that multiple GPS hits are consolidated and formatted in ncs/nrf/drivers/gps/gps_sim/gps_sim.c

I changed this file but it does not get re-complied when I use "west build -b nrf9160dk_nrf9160ns -p"

Is there a way to make this happen pls?

Parents
  • Hello Paul,

    Unless you haven’t changed that, the agps sample uses the nrf9160_gps drivers and not gps_sim by default.

    prj.conf

    CONFIG_NRF9160_GPS=y

    ../nrf/drivers/gps/CMakeLists.txt

     

    add_subdirectory_ifdef(CONFIG_NRF9160_GPS nrf9160_gps)

    If you want to keep your modifications separated from the original drivers, you can also add your own modified drivers to the application.

    Regards,

    Markus

  • Thanks for that Markus.  It sheds light on the way the build works.

    However, nrf9160_gps.c does not seem to format the output.  I identified gps_sim.c by looking for something like 

    GPS_NMEA_SENTENCE "$GPGGA,%02d%02d%02d.200,%8.3f,%c,%09.3f,%c,1,12,1.0,0.0,M,0.0,M,,*%02X"

    Where is this formatting done in the default version pls?

    I see that some masks are referenced in main.c.  This suggests that the formatting may be performed in firmware by feeding it with masks such as NRF_GNSS_NMEA_GGA_MASK.  However, I don't see where any of these are defined. 

Reply
  • Thanks for that Markus.  It sheds light on the way the build works.

    However, nrf9160_gps.c does not seem to format the output.  I identified gps_sim.c by looking for something like 

    GPS_NMEA_SENTENCE "$GPGGA,%02d%02d%02d.200,%8.3f,%c,%09.3f,%c,1,12,1.0,0.0,M,0.0,M,,*%02X"

    Where is this formatting done in the default version pls?

    I see that some masks are referenced in main.c.  This suggests that the formatting may be performed in firmware by feeding it with masks such as NRF_GNSS_NMEA_GGA_MASK.  However, I don't see where any of these are defined. 

Children
No Data
Related