Git Product home page Git Product logo

Comments (4)

ttlappalainen avatar ttlappalainen commented on August 12, 2024

Would

if ( !NMEA0183Msg.AddLatitudeField(Latitude,"08.3f") ) return false; 
if ( !NMEA0183Msg.AddLongitudeField(Longitude,"09.3f") ) return false;

or changing default format for bool AddLongitudeField(double Longitude, const char *Format="09.3f");
work?

from nmea0183.

dagnall53 avatar dagnall53 commented on August 12, 2024

Ha!! ;-)
I had just effectively done exactly that and compiled and it seems to work!
But I modified the definitions in NMEA0183Msg.h

// Add Latitude field. Also E/W will be added. Latitude is in degrees. Negative value is W. E.g.
    // AddLatitudeField(-5.2345); -> ,5.235,W
    bool AddLatitudeField(double Latitude, const char *Format="%08.3f");
    //original bool AddLatitudeField(double Latitude, const char *Format="%.3f");

   // Add Longitude field. Also N/S will be added. Longitude is in degrees. Negative value is S. E.g.
    // AddLongitudeField(-5.2345); -> ,514.070,S
    bool AddLongitudeField(double Longitude, const char *Format="%09.3f");
    //Original:  bool AddLongitudeField(double Longitude, const char *Format="%.3f");

Result:
$GPRMC,184345.00,A,5047.453,N,00100.094,W,0.4,0.0,100724,,*22
I was just logging on to Git hub to advise you!! but you got there first!

Have a great evening..
Dagnall

from nmea0183.

dagnall53 avatar dagnall53 commented on August 12, 2024

To close: the leading zero issue was (I believe) the root cause of this fault, where a Standard Horizon VHF was getting RMC from a (converted) N2000 Gnss (shown correctly in upper picture.
Its arguable if the Standard Horizon should have interpreted the ddmm. as dddm. - which is what it seems it did to give 120degrees! but having the leading zero always present to make dddmm. should prevent all arguments!

image

from nmea0183.

ttlappalainen avatar ttlappalainen commented on August 12, 2024

I pushed the fix. Fixed also crossing comment.

from nmea0183.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.