summaryrefslogtreecommitdiff
path: root/src/main.h
blob: 3c9b82d6fe56f170e75f2432026358177a7921c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef  main_INC
#define  main_INC

#include <cmath>
#include <cstdio>
#include <cstring>
#include <Eigen/Dense>
#include <istream>
#include <iostream>
#include <vector>

#include "body.h"
#include "camera.h"
#include "ourerr.hpp"
#include "state.h"
#include "types.h"

//#define ROS_PUBLISH          /* Uncomment to publish ROS node */
//#define ROS_SUBSCRIBE            /* Uncomment to subscribe to ROS */

#if  ROS_PUBLISH
#include <ros/ros.h>
#include <ros/geometry_msgs.h>
#endif     /* -----  ROS_PUBLISH  ----- */

using Eigen::Matrix;
using Eigen::Matrix3d;
using Eigen::Quaterniond;
using Eigen::Vector3d;

double aboveWater(const Quaterniond &q);
int parseLine(char *line, message *msg);
timestamp update_dt(const timestamp t, timestamp *t_old);

void covCallback(const message &msg, State &mu, const Quaterniond &q);
void imgCallback(message &msg, State &mu, Camera &cam, const Quaterniond &q);
void imuCallback(const message &msg, State &mu, const Quaterniond &q, const timestamp dt);
void pvaCallback(const message &msg, Matrix<double,9,1> &X, Quaterniond &q);
void utmCallback(const message &msg, State &mu, const Quaterniond &q);


#endif   /* ----- #ifndef main_INC  ----- */