remove deprication warning
In file included from /usr/include/time.h:27:0,
from /src/projects/ugps/nmea.c:21:
/usr/include/features.h:148:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
Signed-off-by: John Crispin <[email protected]>
ugps: Only convert lat and lon to negative after parsing
This is a bugfix for package ugps.
Current code parses following GPRMC
$GPRMC,185834.0,A,2335.766399,S,04635.923564,W,0.0,,191017,0.0,E,A*20
as
position: -22.929440 -45.932056
with this fix it's being parsed correctly as
position: -23.596106 -46.598721
Signed-off-by: Giovani Milanez Espindola <[email protected]>
>From
092b311a3c8911ce9da3f913787b77397e88b4a8 Mon Sep 17 00:00:00 2001
From: Giovani Espindola <
[email protected]>
Date: Thu, 19 Oct 2017 15:54:05 -0200
Subject: [PATCH] Only convert lat and lon to negative after parsing
link libm to fix build error
Signed-off-by: Felix Fietkau <[email protected]>
Switched from strptime to sscanf, added command line switch to set system clock and fixed typo
Signed-off-by: Thomas Hogge <[email protected]>
ugps: Simplify and fix position computation from GPRMC sentence
Current code parses following GPRMC
$GPRMC,071305.0,A,5207.76855,N,02104.022546,E,0.0,,270816,0.0,E,A*18
as
position: 52.117947 21.67042
with this fix it's being parsed correctly as
position: 52.129475 21.067041
Fixes https://github.com/lede-project/source/issues/279
Signed-off-by: Petr Štetiar <[email protected]>
Tested-by: Cezary Jackiewicz <[email protected]>
Allow bigger lat/lng numbers in RMC message
It works now with following message:
$GPRMC,122536.0,A,4350.237769,N,01826.423315
Signed-off-by: Petr Štetiar <[email protected]>
Show more useful error message if we can't open GPS device
Signed-off-by: Petr Štetiar <[email protected]>
Fix typo in error message
Signed-off-by: Petr Štetiar <[email protected]>
Use strsep for NMEA message tokenization
strtok doesn't parse correctly following message:
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
Resulting in "datagram has wrong parameter count".
Signed-off-by: Petr Štetiar <[email protected]>
Bail out if we can't find GPS device
Signed-off-by: Petr Štetiar <[email protected]>
Switch to ulog for logging and add few commandline params
Signed-off-by: Petr Štetiar <[email protected]>
cmake: Add proper library and include files search logic for dependecies
Signed-off-by: Petr Štetiar <[email protected]>
lat/lng format when printing is incorrect
Signed-off-by: Maurice-Jörg Nießen <[email protected]>