Changeset 177 in flair-src
- Timestamp:
- Apr 27, 2017, 5:49:17 PM (8 years ago)
- Location:
- trunk/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairFilter/src/TrajectoryGenerator1D.cpp
r157 r177 41 41 cvmatrix *TrajectoryGenerator1D::Matrix(void) const { return pimpl_->output; } 42 42 43 void TrajectoryGenerator1D::StartTraj(float start _pos, float end_pos) {44 pimpl_->StartTraj(start _pos, end_pos);43 void TrajectoryGenerator1D::StartTraj(float startPosition, float endPosition,float startVelocity) { 44 pimpl_->StartTraj(startPosition,endPosition,startVelocity); 45 45 } 46 46 -
trunk/lib/FlairFilter/src/TrajectoryGenerator1D.h
r15 r177 72 72 * \brief Start trajectory 73 73 * 74 * \param start_pos start position 75 * \param end_pos end position 74 * \param startPosition start position 75 * \param endPosition end position 76 * \param startVelocity start velocity, should be actual velocity. This value will be saturated 77 * max velocity defined in GCS. 76 78 */ 77 void StartTraj(float start _pos, float end_pos);79 void StartTraj(float startPosition, float endPosition,float startVelocity=0); 78 80 79 81 /*! -
trunk/lib/FlairFilter/src/TrajectoryGenerator1D_impl.cpp
r148 r177 79 79 } 80 80 81 void TrajectoryGenerator1D_impl::StartTraj(float start_pos, float end_pos ) {81 void TrajectoryGenerator1D_impl::StartTraj(float start_pos, float end_pos,float startVelocity) { 82 82 is_started = true; 83 83 is_finished = false; … … 88 88 pos = start_pos; 89 89 acc = acceleration->Value(); 90 v = 0; 90 v = startVelocity; 91 if (fabs(v) > fabs(max_veloctity->Value())) { 92 if (v > 0) 93 v = max_veloctity->Value(); 94 else 95 v = -max_veloctity->Value(); 96 } 91 97 if (end_position < start_pos) { 92 98 acc = -acc; -
trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator1D_impl.h
r15 r177 35 35 ~TrajectoryGenerator1D_impl(); 36 36 void Update(flair::core::Time time); 37 void StartTraj(float start_pos, float end_pos );37 void StartTraj(float start_pos, float end_pos,float startVelocity); 38 38 void StopTraj(void); 39 39 void Reset(void); -
trunk/lib/FlairMeta/src/UavStateMachine.cpp
r176 r177 279 279 if (currentAltitude > groundAltitude + 0.03) { 280 280 altitudeTrajectory->StartTraj(currentAltitude, 281 desiredTakeoffAltitude->Value() );281 desiredTakeoffAltitude->Value(),currentVerticalSpeed); 282 282 altitudeState = AltitudeState_t::Stabilized; 283 283 SignalEvent(Event_t::Stabilized);
Note:
See TracChangeset
for help on using the changeset viewer.