From 7bf4d9237956c3ed4c4301af879b0a820bb9361e Mon Sep 17 00:00:00 2001 From: emanuel Date: Mon, 11 Mar 2024 13:03:50 +0000 Subject: [PATCH] geodesy tender -> gnss --- src/cam.c | 6 +++--- src/saem.c | 1 - src/tpm.c | 1 - src/vcm.c | 7 ++++--- src/vcm.h | 2 -- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/cam.c b/src/cam.c index 47f75fa..b5179e4 100644 --- a/src/cam.c +++ b/src/cam.c @@ -97,7 +97,7 @@ static void path_history_update(pos_point_t* pn) { if (ls->concise_points_len == 3) { double actual_error; - double actual_chord_length = itss_haversine( + double actual_chord_length = it2s_geodesy_haversine( ls->concise_points[2].lat / 1.0e7, ls->concise_points[2].lon / 1.0e7, ls->concise_points[0].lat / 1.0e7, @@ -140,7 +140,7 @@ static void path_history_update(pos_point_t* pn) { if (ls->path_history_len >= 2) { double distance = 0.0; for (int i = 0; i < ls->path_history_len - 1; ++i) { - distance += itss_haversine( + distance += it2s_geodesy_haversine( ls->path_history[i]->lat / 1.0e7, ls->path_history[i]->lon / 1.0e7, ls->path_history[i+1]->lat / 1.0e7, @@ -1180,7 +1180,7 @@ static int check_pz() { pthread_mutex_lock(&lightship->lock); for (int i = 0; i < lightship->protected_zones.pz_len; ++i) { - double d = itss_haversine(lat, lon, (double) lightship->protected_zones.pz[i]->protectedZoneLatitude/10000000.0, (double) lightship->protected_zones.pz[i]->protectedZoneLongitude/10000000.0); + double d = it2s_geodesy_haversine(lat, lon, (double) lightship->protected_zones.pz[i]->protectedZoneLatitude/10000000.0, (double) lightship->protected_zones.pz[i]->protectedZoneLongitude/10000000.0); int pz_radius = 50; if (lightship->protected_zones.pz[i]->protectedZoneRadius) { diff --git a/src/saem.c b/src/saem.c index 860a20e..2e941a3 100644 --- a/src/saem.c +++ b/src/saem.c @@ -4,7 +4,6 @@ #include "tpm.h" #include -#include #include #include #include diff --git a/src/tpm.c b/src/tpm.c index 0712158..b49642f 100644 --- a/src/tpm.c +++ b/src/tpm.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/src/vcm.c b/src/vcm.c index a878e06..b5c6b50 100644 --- a/src/vcm.c +++ b/src/vcm.c @@ -44,6 +44,7 @@ static int do_paths_intersect( }; if (it2s_geodesy_segments_intersect(&A, &B)) { + log_warn("HEY"); *index = a; return 1; } @@ -472,11 +473,11 @@ static int vcm_check_handle_request(EI1_VCM_t* vcm, mc_neighbour_s* neighbour) { memcpy(dpA, epv.space.data.ptraj, dpA_len * sizeof(GNSSDeltaPosition)); itss_space_unlock(); - double dreq = itss_haversine( + double dreq = it2s_geodesy_haversine( trj[h].latitude / 1.0e7, trj[h].longitude / 1.0e7, vcm->vcm.currentPosition.latitude / 1.0e7, vcm->vcm.currentPosition.longitude / 1.0e7 ); - double dego = itss_haversine( + double dego = it2s_geodesy_haversine( trj[h].latitude / 1.0e7, trj[h].longitude / 1.0e7, lat / 1.0e7, lon / 1.0e7 ); @@ -1162,7 +1163,7 @@ static bool vcm_timer_check(coordination_t* coordination, uint64_t now) { double c_sum = 0; for (int i = 0; i < epv.space.data.ptraj_len - 2; ++i) { - double d1 = itss_haversine( + double d1 = it2s_geodesy_haversine( epv.space.data.ptraj[i].deltaLatitude._0 / 1.0e7, epv.space.data.ptraj[i].deltaLongitude._0 / 1.0e7, 0.0, diff --git a/src/vcm.h b/src/vcm.h index 342c076..5b34f48 100644 --- a/src/vcm.h +++ b/src/vcm.h @@ -3,7 +3,6 @@ #include #include -#include #include #define MC_MAX_NEIGHBOURS 256 @@ -87,7 +86,6 @@ typedef struct coordination { uint64_t id; uint8_t links[MC_AFF_STATIONS_N_MAX + 1][MC_HASH_LINK_LEN]; uint8_t n_links; - itss_region_t region; } chain; } coordination_t;