Fix DCM own trajectory copy

This commit is contained in:
emanuel 2022-02-09 13:45:32 +00:00
parent 07cdd27bcd
commit 831b9d6d80
1 changed files with 1 additions and 2 deletions

View File

@ -13,7 +13,6 @@
static int are_paths_intersecting(it2s_tender_st_s* tA, int tA_len, it2s_tender_st_s* tB, int tB_len) { static int are_paths_intersecting(it2s_tender_st_s* tA, int tA_len, it2s_tender_st_s* tB, int tB_len) {
// TODO check first time intersection, then the spacial trajectory // TODO check first time intersection, then the spacial trajectory
double A1[2], A2[2], B1[2], B2[2]; double A1[2], A2[2], B1[2], B2[2];
uint64_t tsA, tsB; uint64_t tsA, tsB;
for (int a = 0; a < tA_len-1; ++a) { for (int a = 0; a < tA_len-1; ++a) {
@ -61,7 +60,7 @@ int dcm_check(void* fc, DCM_t* dcm) {
it2s_tender_lock_trajectory(&facilities->epv); it2s_tender_lock_trajectory(&facilities->epv);
trajectoryA_len = facilities->epv.trajectory.len; trajectoryA_len = facilities->epv.trajectory.len;
memcpy(&trajectoryA + sizeof(it2s_tender_st_s), facilities->epv.trajectory.path, trajectoryA_len * sizeof(it2s_tender_st_s)); memcpy(trajectoryA + 1, facilities->epv.trajectory.path, trajectoryA_len * sizeof(it2s_tender_st_s));
it2s_tender_unlock_trajectory(&facilities->epv); it2s_tender_unlock_trajectory(&facilities->epv);
trajectoryA[0].latitude = lat; trajectoryA[0].latitude = lat;