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
b916c149
Commit
b916c149
authored
Apr 15, 2019
by
Julian Zobel
Browse files
uJ conversion factor now as static in battery interface
parent
0d3494e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/api/energy/Battery.java
View file @
b916c149
...
...
@@ -31,6 +31,8 @@ package de.tud.kom.p2psim.api.energy;
*/
public
interface
Battery
extends
Cloneable
{
public
static
double
uJconverison
=
1000000
;
/**
* Returns the maximum energy level in uJ.
*
...
...
src/de/tud/kom/p2psim/impl/topology/movement/aerial/SimpleMulticopterMovement.java
View file @
b916c149
...
...
@@ -390,14 +390,14 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
return
-
1
;
}
else
{
System
.
out
.
println
(
"==========================="
);
//
System.out.println("===========================");
double
estimateAngle
=
estimatePitchAngleForVelocity
(
velocity
);
double
estimatedDrag
=
forwardDrag
(
velocity
,
estimateAngle
);
double
requiredThrust
=
Math
.
sqrt
(
hoverThrustRequired
()
*
hoverThrustRequired
()
+
estimatedDrag
*
estimatedDrag
);
double
wattage
=
motor
.
estimatePowerConsumptionWatt
(
requiredThrust
);
System
.
out
.
println
(
"Motor requires "
+
wattage
+
" J/s at velocity "
+
velocity
+
" (Thrust: "
+
requiredThrust
+
" N, angle = "
+
Math
.
toDegrees
(
estimateAngle
)
+
", drag = "
+
estimatedDrag
+
" N )"
);
//
System.out.println("Motor requires " + wattage + " J/s at velocity " + velocity + " (Thrust: " + requiredThrust + " N, angle = " + Math.toDegrees(estimateAngle) + ", drag = "+ estimatedDrag+" N )");
return
wattage
;
...
...
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