Many thanks peter, You convinced me to look at my code again and I found a memory leak and fixed it although by my maths i think there still some stuff floating around.
I've rectified my code to include some ram usage output:
#include <SoftwareSerial.h>
#include <TinyGPS.h>
#include <SdFat.h>
#include <GPSFilter.h>
int freeRam();
void setup()
{
Serial.begin(115200);
Serial.println("Initial RAM");
Serial.println(freeRam());
TinyGPS gps;
Serial.println(F("RAM After tinygps"));
Serial.println(freeRam());
SdFat sd;
Serial.println(F("RAM after sdfat"));
Serial.println(freeRam());
SdFile sdout;
Serial.println(F("RAM after SDFILE"));
Serial.println(freeRam());
GPSFilter f(1);
Serial.println(F("RAM After GPS Filter"));
Serial.println(freeRam());
}
void loop(){
}
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
I ran this on my mega just to give a full output:
Initial RAM
6350
RAM After tinygps
6350
RAM after sdfat
6350
RAM after SDFILE
6350
RAM After GPS Filter
5590
Now for some maths, 8KB of SRAM on a mega so after file inclusion i have 6350 left, so 1650 used for library inclusion and 350 remaining SRAM if i use an UNO.
Now Your going to tell me my filter is huge and understand this however i'd really rather not part with it. It works nicely.