Skip to content

Error in GPS Example Code for Longitude #23

@bboyho

Description

@bboyho

Customer brought up an error in the SFE Forums [ https://forum.sparkfun.com/viewtopic.php?f=14&t=39246#p176148 ]. GPS example code [ https://github.com/sparkfun/Weather_Shield/blob/master/firmware/Weather_Shield_with_GPS/Weather_Shield_with_GPS.ino ] has an error in the code when printing the variable name with the variable. Instead of saying longitude=, the code says that the latitude is equal to the longitude's value on line 445:

Serial.print(",lat=");
Serial.print(gps.location.lat(), 6);
Serial.print(",lat=");
Serial.print(gps.location.lng(), 6);

It should probably say:

Serial.print(",lat=");
Serial.print(gps.location.lat(), 6);
Serial.print(",lng=");
Serial.print(gps.location.lng(), 6);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions