Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index

=The solution to modify the data to time format with special edit option 
was really nice, but not sure how much work would be required to 
modify it. Tried to do it directly in other ways, but couldn't do it, and 
from feedback it seems it is no longer possible since libreoffice doesn't 
support the formula..
Created test file with 1000 GPS addresses with randon values with 
libreoffice to a text file. Original setup has each on separte line.
sed process does the 1000 items in 0.048 seconds.Then converted same data to 500 lines with 2 sets 
of GPS addresses per 
line. Then wrote singlec++ program to process 500 lines of data.
Time: 0.005s.

So, guess there are different methods to solve the problem.
If anyone interested, can send the simple c++ program. Only little issue, 
was the the degree code that was in orginal posted data was a two byte 
version. Had to add a line of code to handle either single or double byte 
coding of that. In the sed solution, I had pasted the symbol, so didn't see 
issue, but in the c++ put the hex value. If anyone wants code, just send 
me an email..

Not really of any interest to me, since I don't have anything that deals 
with GPS or Digital address data. But don't like not being able to solve 
interesting problems. Thanks for the time, and hope this thread wasn't to 
much trouble to some..

Be Safe and Have a Great Day...

Sed Process that produces output of 1000 data points to 500 sets.
time ./

input first 8 lines (makes 4 pairs)
First 4 sets from gpsbc.csv GPS 1, Data 1, GPS 2, Data 

sed -e 's/^/=(/;s/\/+/;s/\x27/\/60+/;s/\x22/\/3600/;s/O\|S/\)*(-1)/;s/N\|E/)/'gps.txtgps.csv
sed -e 's/^/(/;s/\/+/;s/\x27/\/60+/;s/\x22/\/3600/;s/O\|S/\)*(-1)/;s/N\|E/)/'gps.txtgps.raw
paste -d, gps.txt gps.csvgpsboth.csv</div>bc -lgps.rawgps2.txt
paste -d, gps.txt gps2.txt |awk '{line=line,t;$0} NR%2==0{print line;line=}'| sed -e 
if [ -n$1] ; then libreoffice --infilter=CSV:44,34,76,1 gps.csv gpsboth.csv gpsbc.csv ; fi

// Then decided to try to do it with a simple C++ program.
// Amost 10 times faster with 500 pairs of address to original format of data.
if [ -n$1] ; then libreoffice --infilter=CSV:44,34,76,1 gpsc3.csv; fi

Time less libreoffice line.
time ./gpsc3

Input file lines with pairs of address (first 4 lines)</span>
8377'73N 419'9E1562'44S 3442'82O</div>6683'98N 579'22E6130'46S 2028'78O</div>Output file
8377'73N 419'9E; ,84.30361176,41.15250015
1562'44S 3442'82O, -16.04555511, -34.72277832
6683'98N 579'22E,&#
To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
Privacy Policy:


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.