Eigen
Dependencies: Eigen
Dependents: optWingforHAPS_Eigen
Diff: Autopilot.cpp
- Revision:
- 12:59e547742cd8
- Parent:
- 11:51a0fedd7745
- Child:
- 13:75636841e43b
diff -r 51a0fedd7745 -r 59e547742cd8 Autopilot.cpp --- a/Autopilot.cpp Mon Nov 29 09:45:32 2021 +0000 +++ b/Autopilot.cpp Mon Nov 29 13:12:47 2021 +0000 @@ -23,14 +23,18 @@ this->vel_obj = vel; } -void Autopilot::update_val(const Vector3 rpy, const float altitude, const Vector3 pos, const Vector3 vel) +void Autopilot::update_val(const Vector3 rpy, const float altitude, const Matrix pos, const Matrix vel) { this->roll = rpy.x; this->pitch = rpy.y; this->yaw = rpy.z; this->alt = altitude; - this->pos_ned = pos; - this->vel_ned = vel; + this->pos_ned.x = pos(1, 1); + this->pos_ned.y = pos(2, 1); + this->pos_ned.z = pos(3, 1); + this->vel_ned.x = vel(1, 1); + this->vel_ned.y = vel(2, 1); + this->vel_ned.z = vel(3, 1); } void Autopilot::level()