From 27992a865e75dcfb722ba9d6f0d0967ea3a771ef Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Mon, 11 Mar 2019 17:24:02 +0100 Subject: [PATCH] Generalize sampling info --- decision_control/slotplanner.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/decision_control/slotplanner.cc b/decision_control/slotplanner.cc index 4b80a17..fb1b868 100644 --- a/decision_control/slotplanner.cc +++ b/decision_control/slotplanner.cc @@ -489,9 +489,13 @@ struct SamplingInfo ParallelSlot::getSamplingInfo() } si.r = CC->diag_radi(); si.sh = this->slotHeading(); - si.h = this->slotHeading() - acos(EDIST( // TODO generalize - this->slot().bnodes()[0], - this->slot().bnodes()[1] - ) / BCAR_LENGTH); + if (this->slotType() == PARALLEL) { + si.h = this->slotHeading() - acos(EDIST( + this->slot().bnodes()[0], + this->slot().bnodes()[1] + ) / BCAR_LENGTH); + } else { + si.h = M_PI /2; + } return si; } -- 2.39.2