gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [Patch Submission] $GPVTG w/magnetic course


From: teyrana
Subject: Re: [gpsd-dev] [Patch Submission] $GPVTG w/magnetic course
Date: Mon, 4 Jun 2018 11:58:41 -0400

Okay, after a fair bit of discussion, Here's new patch for $GPVTG parsing:

## Sample Output:
```
$GPHDT,185.38,T*02
{"class":"ATT","heading":185.38}
$GPGGA,140133.00,4221.8535752,N,07101.8901618,W,2,06,0.8,12.205,M,-33.056,M,7.0,0138*48
{"class":"TPV","status":2,"mode":3,"lat":42.364226253,"lon":-71.031502697,"alt":12.205}
$GPVTG,171.90,T,186.54,M,0.05,N,0.10,K,D*22
{"class":"TPV","status":2,"mode":2,"track":171.9000,"magtrack":186.5400,"speed":0.026}
. . .
```

## Patches: 
- 1 of 2 - https://pastebin.com/uGG9jH30
- 2 of 2 - https://pastebin.com/m0i19iWV



Daniel Williams
address@hidden
858-220-8134 (Mobile)
github.com/teyrana
LinkedIn

On Thu, May 31, 2018 at 6:59 PM, Gary E. Miller <address@hidden> wrote:
Yo teyrana!

On Thu, 31 May 2018 18:46:33 -0400
teyrana <address@hidden> wrote:

> > I've not look at that code, so take care that users of
> > compass_variation can tell good from bad data in that field. 
>
> Are you referring to "users" internal to gpsd (like the struct -> json
> code)? or client applications? ...

Yes,

> > > grep -Rn -e compass_variation   *.c 
>
> gps.h:1853:    double compass_variation;

Hehehe.  I guess it then needs to be added in libgps_json.c and gpsd_json.c
before anything use can be had of it.

But since we are starting pretty much from scratch, how about just adding
a new variable in gps_data_t for magnetic track, righ next to the
current true north track.

Be sure it gets initialized to NaN.  Then modify libgps_json.c and gpsd_json.c
to use it.


> ... (plus my addition).  Does this match your experience?

Sorry, I have no experience with that variable.

> Do you have any external projects in mind, that we should check with?

None come to mind.



RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]