kuperov / fit Goto Github PK
View Code? Open in Web Editor NEWANT+ FIT file parser for R, built for a Garmin Edge 500.
License: MIT License
ANT+ FIT file parser for R, built for a Garmin Edge 500.
License: MIT License
Using a relative path I always get Error in decode_fit_file(filename) : File not found
, when I change to an absolute path I get Error in decode_fit_file(filename) : FIT file integrity failed.
Can you provide me with a known good fit file that you are content works so that I can debug it on my macOs install, and hopefully submit a patch?
Hi, I am unable to compile the package
install.packages("~/Downloads/fit_0.1.tar.gz", repos = NULL, type = "source")
Installing package into ‘~/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'fit' ...
** using staged installation
** libs
*** arch - i386
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit.cpp -o fit.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_accumulated_field.cpp -o fit_accumulated_field.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_accumulator.cpp -o fit_accumulator.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_buffer_encode.cpp -o fit_buffer_encode.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_buffered_record_mesg_broadcaster.cpp -o fit_buffered_record_mesg_broadcaster.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_crc.cpp -o fit_crc.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_decode.cpp -o fit_decode.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_encode.cpp -o fit_encode.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_factory.cpp -o fit_factory.o
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I"~/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c fit_field.cpp -o fit_field.o
fit_field.cpp: In member function 'FIT_BOOL fit::Field::Read(const void*, FIT_UINT8)':
fit_field.cpp:1249:121: error: 'memcmp' was not declared in this scope
if (memcmp(byteData, baseTypeInvalids[profile->fields[profileIndex].type & FIT_BASE_TYPE_NUM_MASK], typeSize) != 0)
^
make: *** [C:/PROGRA~1/R/R-36~1.1/etc/i386/Makeconf:215: fit_field.o] Error 1
ERROR: compilation failed for package 'fit'
* removing '~/Documents/R/win-library/3.6/fit'
Warning in install.packages :
installation of package ‘~/Downloads/fit_0.1.tar.gz’ had non-zero exit status
Hi Kuperov:
First, thanks much for the package. I think it's great.
Following the process documented on this page, I successfully imported my FIT file.
Analysis of the total duration of my ride using FIT package is 93.2 minutes. However, actual ride time totaled around 50 minutes, and MapMyRide calculates it as 51:10 minutes.
My FIT file is located here: https://github.com/bac3917/Cauldron/blob/master/171025054530.fit
Any idea why the time and other analysis might not work accurately?
Thanks and let me know if I can help further...
Ben
Hi. Thanks for having developed this package, it looks promising...
However the installation fails for me :
> devtools::install_github('kuperov/fit')
Downloading GitHub repo kuperov/fit@master
from URL https://api.github.com/repos/kuperov/fit/zipball/master
Installing fit
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
'/tmp/Rtmpwwva2z/devtoolsb4be136580/kuperov-fit-210fb91' \
--library='/home/user/R/x86_64-pc-linux-gnu-library/3.4' --install-tests
* installing *source* package ‘fit’ ...
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c fit.cpp -o fit.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c fit_accumulated_field.cpp -o fit_accumulated_field.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c fit_accumulator.cpp -o fit_accumulator.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c fit_buffer_encode.cpp -o fit_buffer_encode.o
fit_buffer_encode.cpp: In member function ‘std::__cxx11::string fit::BufferEncode::Close()’:
fit_buffer_encode.cpp:78:57: error: ‘memcpy’ was not declared in this scope
memcpy((FIT_UINT8 *)&file_header.data_type, ".FIT", 4);
^
/usr/lib/R/etc/Makeconf:168 : la recette pour la cible « fit_buffer_encode.o » a échouée
make: *** [fit_buffer_encode.o] Erreur 1
ERROR: compilation failed for package ‘fit’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.4/fit’
Installation failed: Command failed (1)
Any idea ?
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.