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
61aca409
Commit
61aca409
authored
Jan 14, 2020
by
Julian Zobel
Browse files
Facotry for switching uav movement models
parent
a2b12f0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/aerial/AerialMovementModelFactory.java
0 → 100644
View file @
61aca409
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of PeerfactSim.KOM.
*
* PeerfactSim.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package
de.tud.kom.p2psim.impl.topology.movement.aerial
;
import
de.tud.kom.p2psim.api.topology.movement.UAVMovementModel
;
import
de.tud.kom.p2psim.impl.topology.component.UAVTopologyComponent
;
/**
*
*/
public
interface
AerialMovementModelFactory
{
public
UAVMovementModel
createComponent
(
UAVTopologyComponent
topologyComponent
);
}
src/de/tud/kom/p2psim/impl/topology/movement/aerial/MulticopterMovement.java
View file @
61aca409
...
...
@@ -455,4 +455,16 @@ public class MulticopterMovement implements UAVMovementModel {
return
maxPitchAngle
;
}
/**
* Factory for this movement model
*
* @author Julian Zobel
* @version 1.0, 14.01.2020
*/
public
static
class
Factory
implements
AerialMovementModelFactory
{
public
UAVMovementModel
createComponent
(
UAVTopologyComponent
topologyComponent
)
{
return
new
MulticopterMovement
(
topologyComponent
);
}
}
}
src/de/tud/kom/p2psim/impl/topology/movement/aerial/SimpleMulticopterMovement.java
View file @
61aca409
...
...
@@ -29,7 +29,10 @@ 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
;
/**
...
...
@@ -208,4 +211,16 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
public
double
horizontalMinVelocity
()
{
return
0
;
}
/**
* Factory for this movement model
*
* @author Julian Zobel
* @version 1.0, 14.01.2020
*/
public
static
class
Factory
implements
AerialMovementModelFactory
{
public
UAVMovementModel
createComponent
(
UAVTopologyComponent
topologyComponent
)
{
return
new
SimpleMulticopterMovement
(
topologyComponent
);
}
}
}
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