gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Create fakegpsd input from coordinates


From: Salamon Attila
Subject: Re: [gpsd-users] Create fakegpsd input from coordinates
Date: Tue, 7 Mar 2017 14:11:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

Thank's for all the answers, finally I use the gpsbabel tool with GPX input:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1"; 
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"; 
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"; 
creator="Oregon 400t" version="1.1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 
http://www.topografix.com/GPX/1/1/gpx.xsd 
http://www.garmin.com/xmlschemas/GpxExtensions/v3 
http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd 
http://www.garmin.com/xmlschemas/TrackPointExtension/v1 
http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd";>
  <metadata>
    <time>2009-10-17T22:58:43Z</time>
  </metadata>
<trk>
<name>track name</name>
<trkseg>

<trkpt lat="lat1" lon="lon1">
<name>name1</name>
<time>2017-03-07T11:52:38</time>
<fix>2d</fix>
</trkpt>
...
<trkpt lat="latN" lon="lonN">
<name>name2</name>
<time>2017-03-07T11:52:38</time>
<fix>2d</fix>
</trkpt>

</trkseg>
</trk>
</gpx>


gpsbabel -i gpx -f map2.gpx -o nmea -F map2.nmea
gpsfake -c 0.1 map2.nmea

and for. ex. cgps shows the coordinates moving.
output file conatins $GPRMC, $GPGGA and $GPGSA lines.

I have gpsbabel 1.5.0-3 (Debian jessie packaged version) and that
version does not know the fields parameter of the unicsv format.
gpsbabel -i csv -f map1.csv -o nmea -F newfile.nmea
filled the output file with $GPWPL lines, but cgps showed nothing.

--
Best Regards,
Attila Salamon


2017-03-06 20:20 keltezéssel, Robert Norris írta:
> I recommend looking into using gpsbabel for converting files
>     https://www.gpsbabel.org
>
> So on the command line it would be something like this:
>     gpsbabel -i unicsv,fields=lat+lon -f originalfile.txt -o nmea -F 
> newfile.nmea
>
> Then you can use the new file with gpsfake
>
> --
> Be Seeing You - Rob.
> If at first you don't succeed,
> then skydiving isn't for you.
>
> ________________________________________
> From: gpsd-users <address@hidden> on behalf of Peter Jenik <address@hidden>
> Sent: 06 March 2017 13:53:19
> To: 'tom schuring'; 'GPSd-users'; 'Salamon Attila'
> Subject: Re: [gpsd-users] Create fakegpsd input from coordinates
>
> Hi Attila,
>
> I would build a NMEA File and then feed it to gpsfake. Building a NMEA File 
> from your coordinates should be easy:
>
> $GPGLL
> Geographic Position, Latitude / Longitude and time.
> eg1. $GPGLL,3751.65,S,14507.36,E*77
> eg2. $GPGLL,4916.45,N,12311.12,W,225444,A
>
>
>            4916.46,N    Latitude 49 deg. 16.45 min. North
>            12311.12,W   Longitude 123 deg. 11.12 min. West
>            225444       Fix taken at 22:54:44 UTC
>            A            Data valid
>
>
> eg3. $GPGLL,5133.81,N,00042.25,W*75
>                1    2     3    4 5
>
>       1    5133.81   Current latitude
>       2    N         North/South
>       3    00042.25  Current longitude
>       4    W         East/West
>       5    *75       checksum
> $--GLL,lll.ll,a,yyyyy.yy,a,hhmmss.ss,A llll.ll = Latitude of position
> a = N or S
> yyyyy.yy = Longitude of position
> a = E or W
> hhmmss.ss = UTC of position
> A = status: A = valid data
>
> courtesy of http://aprs.gids.nl/nmea/#gll
>
> Convert your Lat/Lon accordingly (Degrees*100+Minutes.<point>decimal fraction 
> of minute) When omitting the time and using “A” instead of calculating a 
> checksum then do not forget to insert the extra comma, it might be needed.
>
> HTH
> Peter
>
> Von: gpsd-users [mailto:address@hidden Im Auftrag von tom schuring
> Gesendet: Montag, 06. März 2017 08:25
> An: GPSd-users; Salamon Attila
> Betreff: Re: [gpsd-users] Create fakegpsd input from coordinates
>
> From http://www.catb.org/gpsd/gpsfake.html
>
> The logfiles may contain packets in any supported format, including in 
> particular NMEA, SiRF, TSIP, or Zodiac. Leading lines beginning with # will 
> be treated as comments and ignored, except in the following ......
>
> So I would Google for "generate nmea file"
>
> And try a few of the simulators that come up in the result.
>
> Or dive into the nmea spec and hand generate them.
>
> Perhaps someone else has a quicker way.
>
>
> On 6 Mar 2017, 5:39 PM +1100, Salamon Attila 
> <address@hidden<mailto:address@hidden>>, wrote:
>
> Hello,
>
> (Sorry for my english.)
>
> I have GPS points of a path in text format:
> latitude1,longitude1
> latitude2,longitude2
> ...
> latitudeN,longitudeN .
>
> Latitude and longitude are floating point numbers.
> How can I create an input file for fakegps from the coordinates?
>
> Thanks in advance,
> --
> Best Regards,
> Attila Salamon
>
>
>





reply via email to

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