Page 1 of 1

How to get batCal compiled?

PostPosted: Thu Jul 24, 2014 8:18 pm
by DUKE40

I wanted to profile my battery, but I first need to compile batCal according to the documentation:
"‘batCal’ – the battery profiler utility is located within the /ground directory of the AutoQuad source package. It is currently only available as source code. You will have to compile it yourself. Under Linux, you might have to install a few dev libraries for it to compile successfully."
Unfortunately the information about compiling it is quite scarce.
When I try to compile it, this is what I get:
cc -c -g -O3 -o ../build/batCal.o -I. -I../../../lib/eigen fatal error: Eigen/Core: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make: *** [../build/batCal.o] Fehler 1

So obviously I am missing some libraries, but I do not know any Linux library called eigen or /usr/local/include/eigen3.
What is this library and where do I get it?

Re: How to get batCal compiled?

PostPosted: Tue Jul 29, 2014 6:21 am
by Max

You'll also most likely need to edit the Makefile and un-comment the configuration defaults for Linux (LIBPATH, INCPATH, etc). Looks like you're using the Windows defaults currently.

I also just uploaded a compiled Windows version, in case that's of any help. ... s/Windows/

Note that in the current AQ firmware, the "remaining battery percent" is calculated based on the difference between a fully charged LiPo (4.2v per cell) and the current setting for Low Battery Stage 2 warning (in aq_mavlink.c). Also that the BAT_CRV params might soon be removed altogether (no one seems to use them, that we know of).