2018)cite arxiv:1812.01537Comment: 17 pages, 12 figures, 7 boxed examples, 193 numbered equations. V2 add chapter with a application examples. V3 fix biblio error and remove the reference to a not-yet-published library in C++. V4 add again the reference to the C++ library "manif", which is made available with this version 4. V5 fix formulas (163) and (179). V6, V7 fix typos. V8 fix sign in eq 149.