diff --git a/include/gnss_utils/gnss_utils.h b/include/gnss_utils/gnss_utils.h index 4d9f83f2bd6ab7a7a70fa1b63e8c3d577be4011b..0c32ca8f6361c8dfba86dced6134eff2fb49e6a9 100644 --- a/include/gnss_utils/gnss_utils.h +++ b/include/gnss_utils/gnss_utils.h @@ -5,4 +5,38 @@ extern "C" { #include "rtklib.h" } -#endif \ No newline at end of file +// std includes +#include <set> +#include <map> +#include <vector> +#include <iostream> +#include <memory> +#include <cassert> +// eigen +#include <eigen3/Eigen/Dense> + +namespace GnssUtils +{ + +// forward declarations +class Observations; +class Navigation; +class Snapshot; + +// Typedefs +typedef std::map<int,Eigen::Vector3d> SatellitesPositions; + +// pointer typedefs +typedef std::shared_ptr<Observations> ObservationsPtr; +typedef std::shared_ptr<const Observations> ObservationsConstPtr; + +typedef std::shared_ptr<Navigation> NavigationPtr; +typedef std::shared_ptr<const Navigation> NavigationConstPtr; + +typedef std::shared_ptr<Snapshot> SnapshotPtr; +typedef std::shared_ptr<const Snapshot> SnapshotConstPtr; + + +} + +#endif diff --git a/include/gnss_utils/navigation.h b/include/gnss_utils/navigation.h index 95b3ad0bc97ebd26873098b857bb3447003a1f3c..861742e8b8bd7ef35319c072a84cece982d7e27a 100644 --- a/include/gnss_utils/navigation.h +++ b/include/gnss_utils/navigation.h @@ -1,17 +1,10 @@ #ifndef INCLUDE_GNSS_UTILS_NAVIGATION_H_ #define INCLUDE_GNSS_UTILS_NAVIGATION_H_ -#include <vector> -#include <iostream> -#include <memory> - #include "gnss_utils/gnss_utils.h" namespace GnssUtils { -class Navigation; -typedef std::shared_ptr<Navigation> NavigationPtr; -typedef std::shared_ptr<const Navigation> NavigationConstPtr; class Navigation { diff --git a/include/gnss_utils/observations.h b/include/gnss_utils/observations.h index caba378906a01b7c20a30721a809a308dc5002ba..0a94fbc1cbade6707d0e871d71a4a4ce6126f13a 100644 --- a/include/gnss_utils/observations.h +++ b/include/gnss_utils/observations.h @@ -1,24 +1,10 @@ #ifndef INCLUDE_GNSS_UTILS_OBSERVATIONS_H_ #define INCLUDE_GNSS_UTILS_OBSERVATIONS_H_ -#include <vector> -#include <map> -#include <set> -#include <iostream> -#include <memory> -#include <cassert> - -#include <eigen3/Eigen/Dense> - #include "gnss_utils/gnss_utils.h" namespace GnssUtils { -class Observations; -typedef std::shared_ptr<Observations> ObservationsPtr; -typedef std::shared_ptr<const Observations> ObservationsConstPtr; - -typedef std::map<int,Eigen::Vector3d> SatellitesPositions; class Observations { diff --git a/include/gnss_utils/snapshot.h b/include/gnss_utils/snapshot.h index 8ba30db64797bfb19bd5a54263e91e670d997db6..6d8f1dc36afd69cfb5a8af2f1c2312427bc3c634 100644 --- a/include/gnss_utils/snapshot.h +++ b/include/gnss_utils/snapshot.h @@ -14,20 +14,9 @@ namespace GnssUtils { -// forward declarations -class Observations; -class Navigation; -typedef std::map<int,Eigen::Vector3d> SatellitesPositions; -typedef std::shared_ptr<Observations> ObservationsPtr; -typedef std::shared_ptr<Navigation> NavigationPtr; - -class Snapshot; -typedef std::shared_ptr<Snapshot> SnapshotPtr; -typedef std::shared_ptr<const Snapshot> SnapshotConstPtr; - - class Snapshot { + public: // Constructor & Destructor Snapshot(); diff --git a/include/gnss_utils/tdcp.h b/include/gnss_utils/tdcp.h index 10e280d03e9dca9de92954ac6d10b611376457b1..45504e0dcd1c78d2ed34d0f56224eeb5427cb859 100644 --- a/include/gnss_utils/tdcp.h +++ b/include/gnss_utils/tdcp.h @@ -1,19 +1,9 @@ -/* - * tdcp.h - * - * Created on: Dec 4, 2019 - * Author: jvallve - */ - #ifndef INCLUDE_GNSS_UTILS_TDCP_H_ #define INCLUDE_GNSS_UTILS_TDCP_H_ #define GNSS_UTILS_TDCP_DEBUG 1 -#include <set> -#include "gnss_utils/utils/rcv_position.h" -#include "utils/satellite.h" -#include "gnss_utils/snapshot.h" +#include "gnss_utils/gnss_utils.h" namespace GnssUtils { diff --git a/src/tdcp.cpp b/src/tdcp.cpp index cfe42cca3d4e9c73bdf3543300094b093e33525d..e105a695def616b479c87357d16db09d56da8e91 100644 --- a/src/tdcp.cpp +++ b/src/tdcp.cpp @@ -1,11 +1,7 @@ -/* - * tdcp.cpp - * - * Created on: Dec 4, 2019 - * Author: jvallve - */ - #include "gnss_utils/tdcp.h" +#include "gnss_utils/utils/rcv_position.h" +#include "gnss_utils/utils/satellite.h" +#include "gnss_utils/snapshot.h" namespace GnssUtils { @@ -297,7 +293,7 @@ bool Tdcp(SnapshotPtr snapshot_r, printf("Ref distance = %7.3f m\n", d_0.norm()); printf("Computed distance = %7.3f m\n", d.head<3>().norm()); printf("Tdcp: residual = %13.10f\n", residual); - printf("Tdcp: row = %i\n", r.rows()); + printf("Tdcp: row = %lu\n", r.rows()); std::cout << "Tdcp: drho = " << r.transpose() << std::endl; std::cout << "Tdcp: drho_m = " << drho_m.transpose() << std::endl; std::cout << "Tdcp: H = \n" << A << std::endl;