Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.7 KB

RAM.md

File metadata and controls

41 lines (31 loc) · 1.7 KB

RAM requirements

NeoGPS requires 72% to 96% less RAM, saving 140 to 1100 bytes.

Because you can select what data members are stored, the RAM savings depends on the configuration:

ConfigurationNeoGPS
Size
TinyGPS
Size (% smaller)
TinyGPS++
Size (% smaller)
Adafruit_GPS
Size (% smaller)
Minimal10- (95%)- (96%)
DTL25- (86%)- (90%)
Nominal41180 (72%)240 (83%)326 (87%)
Full242- (-)~1400 (83%)

Why does NeoGPS use less RAM?

As data is received from the device, various portions of a fix are modified. In fact, no buffering RAM is required. Each character affects the internal state machine and may also contribute to a data member (e.g., latitude).

If your application only requires an accurate one pulse-per-second, you can configure it to parse no sentence types and retain no data members. This is the Minimal configuration. Although the fix().status can be checked, no valid flags are available. Even though no sentences are parsed and no data members are stored, the application will still receive an empty fix once per second:

while (gps.available( gpsPort )) {
  gps_fix nothingButStatus = gps.read();
  sentenceReceived();
}

The ubloxNMEA derived class doesn't use any extra bytes of RAM.

The ubloxGPS derived class adds 20 bytes to handle the more-complicated protocol, plus 5 static bytes for converting GPS time and Time Of Week to UTC.