Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
f5763f3f
Commit
f5763f3f
authored
Nov 03, 2021
by
Julian Zobel
🦄
Browse files
Set Direction in simple movement model
parent
12e538a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/aerial/SimpleMulticopterMovement.java
View file @
f5763f3f
...
...
@@ -99,6 +99,7 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
PositionVector
direction
=
new
PositionVector
(
targetPosition
);
direction
.
subtract
(
currentPosition
);
direction
.
normalize
();
topologyComponent
.
updateCurrentDirection
(
direction
);
direction
.
multiplyScalar
(
velocity
*
timefactor
);
PositionVector
newPosition
=
new
PositionVector
(
currentPosition
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment