What does this error mean?

And how do I fix it? Compiling for a '1284P with IDE 1.0.6 on Win7.
Am attempting to run the “GPS Sample Code” near the bottom of this page
http://www.dfrobot.com/wiki/index.php/GPS/GPRS/GSM_Module_V3.0_(SKU:TEL0051)

for this DF Robot GPS/GSM card
http://www.dfrobot.com/index.php?route=product/product&product_id=673&search=tel0051&description=true&category_id=48#.VwdBIfkrLX6

I get these errors:

Controller2GPS_test:308: error: call of overloaded 'println(char*, int)' is ambiguous
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:71: note: candidates are: size_t Print::println(unsigned char, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:72: note:                 size_t Print::println(int, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:73: note:                 size_t Print::println(unsigned int, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:74: note:                 size_t Print::println(long int, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:75: note:                 size_t Print::println(long unsigned int, int) <near match>
Controller2GPS_test:310: error: call of overloaded 'println(char*, int)' is ambiguous
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:71: note: candidates are: size_t Print::println(unsigned char, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:72: note:                 size_t Print::println(int, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:73: note:                 size_t Print::println(unsigned int, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:74: note:                 size_t Print::println(long int, int) <near match>
C:\Arduino\hardware\mighty-1284p\cores\mighty/Print.h:75: note:                 size_t Print::println(long unsigned int, int) <near match>

[
Which seems to have to do with “, 6” added in the Serial.println statements at the bottom of the sketch:
](http://Which seems to have to do with “, 6” added in the Serial.println statements at the bottom of the sketch:)

    Serial.println ("gps_gga_NS ()");
    Serial.println (gps_gga_NS (), 6);
    Serial.println ("gps_gga_EW ()");
    Serial.println (gps_gga_EW (), 6);

    Serial.println ("gps_gga_lat ()");
    Serial.println (gps_gga_lat (), 6);
    Serial.println ("gps_gga_long ()");
    Serial.println (gps_gga_long (), 6);
    Serial.println ("gps_gga_HDOP ()");
    Serial.println (gps_gga_HDOP (), 6);
    Serial.println ("gps_gga_MSL ()");
    Serial.println (gps_gga_MSL (), 6);
    Serial.println ();

[

Thanks.](http://Thanks.)

Controller2GPS_test.ino (9.09 KB)

gps_gsm_sim908.h (8.31 KB)

double gps_gga_HDOP ()

You are trying to print a double but printing double is not supported.

The long list of messages is because the compiler is trying to find a method that will work. For some reason it is rather chatty about its attempt.

This function may give you what you need…

char* gps_gga_HDOP_s ()
    Serial.println ("gps_gga_HDOP_s ()");
    Serial.println (gps_gga_HDOP_s ());

Thanks. Where do I put the first part - up in the global variables section?

Ok, compiles now:

char* gps_gga_NS ();
char* gps_gga_EW ();
//char* gps_gga_lat (); // already declared it seems
//char* gps_gga_long ();  // already declared it seems
char* gps_gga_HDOP_s ();
//char* gps_gga_MSL (); // already declared it seems

and

    Serial.println ("gps_gga_NS ()");
    Serial.println (gps_gga_NS () );
    Serial.println ("gps_gga_EW ()");
    Serial.println (gps_gga_EW () );
    Serial.println ("gps_gga_lat ()");
    Serial.println (gps_gga_lat () );
    Serial.println ("gps_gga_long ()");
    Serial.println (gps_gga_long () );
    Serial.println ("gps_gga_HDOP ()");
    Serial.println (gps_gga_HDOP () );
    Serial.println ("gps_gga_MSL ()");
    Serial.println (gps_gga_MSL () );
    Serial.println ();[code]

On to testing with hardware tomorrow.  Thanks.

As always, you are welcome!

An alternative:

    Serial.println ((float)gps_gga_NS (), 6);

Cast the double to a float - no loss of precision on most Arduinos since float and double are the same size.

Thanks, got that stored as a note to try also. Will play with these after work, see what the data is like coming out.