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
af160d3c
Commit
af160d3c
authored
Jan 21, 2020
by
Julian Zobel
Browse files
Added minimum horizontal and vertical speed setters for the simple movement.
parent
4c53019c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/aerial/SimpleMulticopterMovement.java
View file @
af160d3c
...
...
@@ -29,10 +29,7 @@ import de.tud.kom.p2psim.impl.energy.components.ActuatorComponent;
import
de.tud.kom.p2psim.impl.energy.components.StatefulActuatorComponent
;
import
de.tud.kom.p2psim.impl.topology.component.UAVTopologyComponent
;
import
de.tud.kom.p2psim.impl.topology.util.PositionVector
;
import
de.tudarmstadt.maki.simonstrator.api.Host
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
import
de.tudarmstadt.maki.simonstrator.api.component.HostComponent
;
import
de.tudarmstadt.maki.simonstrator.api.component.HostComponentFactory
;
import
de.tudarmstadt.maki.simonstrator.api.uavsupport.callbacks.ReachedLocationCallback
;
/**
...
...
@@ -52,16 +49,22 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
private
double
maximumHorizontalVelocity
;
private
double
maximumVerticalVelocity
;
// TODO currently not used
private
double
minimumHorizontalVelocity
;
private
double
minimumVerticalVelocity
;
private
LinkedList
<
PositionVector
>
route
=
new
LinkedList
<>();
private
Map
<
PositionVector
,
ReachedLocationCallback
>
locationCallbacks
=
new
LinkedHashMap
<>();
private
StatefulActuatorComponent
motor
;
public
SimpleMulticopterMovement
(
UAVTopologyComponent
topologyComponent
,
double
maximumHorizontalVelocity
,
double
maximumVerticalVelocity
)
{
double
maximumVerticalVelocity
,
double
minimumHorizontalVelocity
,
double
minimumVerticalVelocity
)
{
this
.
topologyComponent
=
topologyComponent
;
this
.
maximumHorizontalVelocity
=
maximumHorizontalVelocity
;
this
.
maximumVerticalVelocity
=
maximumVerticalVelocity
;
this
.
minimumHorizontalVelocity
=
minimumHorizontalVelocity
;
this
.
minimumVerticalVelocity
=
minimumVerticalVelocity
;
}
@Override
...
...
@@ -238,8 +241,21 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
this
.
maximumVerticalVelocity
=
maximumVerticalVelocity
;
}
private
double
minimumHorizontalVelocity
=
15
;
public
void
setMinimumHorizontalVelocity
(
double
minimumHorizontalVelocity
)
{
this
.
minimumHorizontalVelocity
=
minimumHorizontalVelocity
;
}
private
double
minimumVerticalVelocity
=
5
;
public
void
setMinimumVerticalVelocity
(
double
minimumVerticalVelocity
)
{
this
.
minimumVerticalVelocity
=
minimumVerticalVelocity
;
}
public
UAVMovementModel
createComponent
(
UAVTopologyComponent
topologyComponent
)
{
return
new
SimpleMulticopterMovement
(
topologyComponent
,
maximumHorizontalVelocity
,
maximumVerticalVelocity
);
return
new
SimpleMulticopterMovement
(
topologyComponent
,
maximumHorizontalVelocity
,
maximumVerticalVelocity
,
minimumHorizontalVelocity
,
minimumVerticalVelocity
);
}
}
}
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