SlashDevin / NeoGPS

NMEA and ublox GPS parser for Arduino, configurable to use as few as 10 bytes of RAM
GNU General Public License v3.0
702 stars 194 forks source link

Setting airborne mode in setup for NEO 7M #138

Open foakgul opened 4 years ago

foakgul commented 4 years ago

Hello,

I started using this library for my Arduino project and it's by far the most extensive and capable.

However, I'm having a hard time in understanding a certain aspect. What I'd like to do is simple: -Set airborne mode for ublox GPS (neo 6M and 7M) in the setup portion of the code

I've read many tutorials and posts about this and i think there might be multiple ways to do it: 1) sending PUBX message, ie something similar to: gps.send_P( F("$PUBX....)) 2) or use a code similar to:

ublox::cfg_nav5_t navCfg;
navCfg.apply.dyn_model = true;  
navCfg.dyn_model = ublox::UBX_DYN_MODEL_AIR_1G;

    while( !gps.send(navCfg) )
      {
        Serial.print( '.' );
        delay( 500 );
      }

However my problems start here when the compiler does not like gps object and says it doesn't have send method. I tried creating a ubloxGPS object but then it says: ubloxGPS::ubloxGPS() is private within this context

What would be the easiest way to set the airborne mode?

Here's my gps object: NMEAGPS gps;

I'm using NeoSWSerial for connection.

NOTE: I've looked into CFG-NAV5 and i don't want to alter any other field but the dynamic platform model.

Thanks!