|
From: | teyrana |
Subject: | Re: [gpsd-dev] [Patch Submission] $GPVTG w/magnetic course |
Date: | Wed, 13 Jun 2018 10:52:58 -0400 |
This worries me:
+ if (session->newdata.mode < MODE_2D) {
+ session->newdata.mode = MODE_2D;
+ mask |= MODE_SET;
+ }
I see nothing about GPVTG (http://aprs.gids.nl/nmea/#vtg) that tells us
the GPVTG tells us the GPS fix mode is at least 2D. Got a citation?
Maybe make it a comment in the code?
/*
* This is a bit dodgy. Technically we shouldn't set the mode
* bit until we see GSA. But it may be later in the cycle,
* some devices like the FV-18 don't send it by default, and
* elsewhere in the code we want to be able to test for the
* presence of a valid fix with mode > MODE_NO_FIX.
*/
I'm not sue this is the right place for :
+ // request to report an output message
+ mask |= CLEAR_IS;
+ mask |= REPORT_IS;
Running 'scons check' shows why:
-{"class":"TPV","mode":3,"time":"2010-02-05T08:50:37. 000Z","ept":0.005,"lat":53. 919546833,"lon":27.500650000," alt":265.100,"epx":235.985," epy":133.116,"epv":178.020," track":277.7200,"speed":0.130, "climb":0.000,"eps":471.97}
+{"class":"TPV","mode":3,"time":"2010-02-05T08:50:37. 000Z","ept":0.005,"lat":53. 919546833,"lon":27.500650000," alt":265.100,"epx":235.985," epy":133.116,"epv":178.020," track":277.7200,"speed":0.130, "climb":0.000}
Notice "eps" is getting lost. Most likely because of a premature CLEAR_IS
so the entire data for the cycle could ne get accumulated.
Getting CLEAR_IS and REPORT_IS right is hard (maybe impossible). If
possible, you only want them on the last message of a cycle.
Spend some time looking at 'scons check' to ensure your patch has only
positive effects.
$GPRMC,171007.972,A,5200.8514,N,00421.7851,E,000.0,000.0,120610,,,A*65
{"class":"TPV","mode":3,"time":"2010-06-12T17:10:07.972Z","ept":0.005,"lat":52.014190000,"lon":4.363085000,"alt":7.700,"epx":8.483,"epy":10.737,"epv":34.500,"track":0.0000,"speed":0.000,"climb":0.100,"eps":21.47,"epc":69.00}
$GPVTG,000.0,T,,M,000.0,N,000.0,K,A*0D
$GPRMC,171007.972,A,5200.8514,N,00421.7851,E,000.0,000.0,120610,,,A*65
{"class":"TPV","mode":3,"time":"2010-06-12T17:10:07.972Z","ept":0.005,"lat":52.014190000,"lon":4.363085000,"alt":7.700,"epx":8.483,"epy":10.737,"epv":34.500,"track":0.0000,"speed":0.000,"climb":0.000}
$GPVTG,000.0,T,,M,000.0,N,000.0,K,A*0D
{"class":"TPV","mode":2,"epx":8.483,"epy":10.737,"track":0.0000,"speed":0.000}
$GPRMC,171007.972,A,5200.8514,N,00421.7851,E,000.0,000.0,120610,,,A*65
{"class":"TPV","mode":3,"time":"2010-06-12T17:10:07.972Z","ept":0.005,"lat":52.014190000,"lon":4.363085000,"alt":7.700,"epx":8.483,"epy":10.737,"epv":34.500,"track":0.0000,"speed":0.000,"climb":0.100,"eps":21.47,"epc":69.00}
$GPVTG,000.0,T,,M,000.0,N,000.0,K,A*0D
{"class":"TPV","mode":3,"time":"2010-06-12T17:10:07.972Z","ept":0.005,"lat":52.014190000,"lon":4.363085000,"alt":7.700,"epx":8.483,"epy":10.737,"epv":34.500,"track":0.0000,"speed":0.000,"climb":0.100,"eps":21.47,"epc":69.00}
[Prev in Thread] | Current Thread | [Next in Thread] |