Commit b916c149 authored by Julian Zobel's avatar Julian Zobel
Browse files

uJ conversion factor now as static in battery interface

parent 0d3494e7
......@@ -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.
*
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment