project/ugps.git
6 years agoremove deprication warning master
John Crispin [Mon, 12 Feb 2018 14:40:37 +0000 (15:40 +0100)]
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 <john@phrozen.org>
6 years agougps: Only convert lat and lon to negative after parsing
Giovani Espindola [Fri, 20 Oct 2017 12:19:02 +0000 (10:19 -0200)]
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 <gespindola@advantech-bb.com>
>From 092b311a3c8911ce9da3f913787b77397e88b4a8 Mon Sep 17 00:00:00 2001
From: Giovani Espindola <gespindola@advantech-bb.com>
Date: Thu, 19 Oct 2017 15:54:05 -0200
Subject: [PATCH] Only convert lat and lon to negative after parsing

7 years agolink libm to fix build error
Felix Fietkau [Sat, 11 Feb 2017 16:51:50 +0000 (17:51 +0100)]
link libm to fix build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years agoSwitched from strptime to sscanf, added command line switch to set system clock and...
Thomas Hooge [Tue, 18 Oct 2016 07:06:38 +0000 (09:06 +0200)]
Switched from strptime to sscanf, added command line switch to set system clock and fixed typo

Signed-off-by: Thomas Hogge <thomas@hoogi.de>
8 years agougps: Simplify and fix position computation from GPRMC sentence
Petr Štetiar [Wed, 31 Aug 2016 07:15:44 +0000 (09:15 +0200)]
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 <ynezz@true.cz>
Tested-by: Cezary Jackiewicz <cezary@eko.one.pl>
8 years agofix ms->deg conversion
John Crispin [Thu, 18 Aug 2016 11:18:23 +0000 (13:18 +0200)]
fix ms->deg conversion

Signed-off-by: John Crispin <john@phrozen.org>
8 years agofix reading of speed
John Crispin [Thu, 18 Aug 2016 08:46:16 +0000 (10:46 +0200)]
fix reading of speed

Signed-off-by: John Crispin <john@phrozen.org>
8 years agoAllow bigger lat/lng numbers in RMC message
Petr Štetiar [Wed, 27 Jul 2016 12:45:54 +0000 (14:45 +0200)]
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 <ynezz@true.cz>
8 years agoShow more useful error message if we can't open GPS device
Petr Štetiar [Wed, 27 Jul 2016 12:45:53 +0000 (14:45 +0200)]
Show more useful error message if we can't open GPS device

Signed-off-by: Petr Štetiar <ynezz@true.cz>
8 years agoFix typo in error message
Petr Štetiar [Wed, 27 Jul 2016 12:45:52 +0000 (14:45 +0200)]
Fix typo in error message

Signed-off-by: Petr Štetiar <ynezz@true.cz>
8 years agoUse strsep for NMEA message tokenization
Petr Štetiar [Wed, 27 Jul 2016 12:45:51 +0000 (14:45 +0200)]
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 <ynezz@true.cz>
8 years agoBail out if we can't find GPS device
Petr Štetiar [Wed, 27 Jul 2016 12:45:50 +0000 (14:45 +0200)]
Bail out if we can't find GPS device

Signed-off-by: Petr Štetiar <ynezz@true.cz>
8 years agoSwitch to ulog for logging and add few commandline params
Petr Štetiar [Wed, 27 Jul 2016 12:45:49 +0000 (14:45 +0200)]
Switch to ulog for logging and add few commandline params

Signed-off-by: Petr Štetiar <ynezz@true.cz>
8 years agocmake: Add proper library and include files search logic for dependecies
Petr Štetiar [Wed, 27 Jul 2016 12:45:48 +0000 (14:45 +0200)]
cmake: Add proper library and include files search logic for dependecies

Signed-off-by: Petr Štetiar <ynezz@true.cz>
9 years agolat/lng format when printing is incorrect
John Crispin [Tue, 11 Aug 2015 14:53:34 +0000 (16:53 +0200)]
lat/lng format when printing is incorrect

Signed-off-by: Maurice-Jörg Nießen <post@mjniessen.com>
9 years agotypo fix
John Crispin [Tue, 11 Aug 2015 14:51:32 +0000 (16:51 +0200)]
typo fix

Signed-off-by: Maurice-Jörg Nießen <post@mjniessen.com>
10 years agoImport
John Crispin [Tue, 29 Jul 2014 04:39:38 +0000 (05:39 +0100)]
Import