Page tree
Skip to end of metadata
Go to start of metadata

Needs:

nameacceptsreturns
int getHeight()-current height above ground in cm
void land()-lands the copter safely
void decHeight(int height)

the height in cm which the copter

should descend

decreases the height of the copter by the

given height

void decHeight(int height, int speed)

the height in cm which the copter

should descend

the speed in m/s with which the

copter should descend

decreases the height of the copter by the

given height with the given speed

void incHeight(int height)

the height in cm which the copter

should ascend

increases the height of the copter by the

given height

void incHeight(int height, int speed)

the height in cm which the copter

should ascend

the speed in m/s with which the

copter should ascend

increases the height of the copter by the

given height with the given speed

void setRotorFRSpeed(int speed)

the speed with which the rotor in

the front right should rotate

sets the speed of the rotor in the front

right

void setRotorFLSpeed(int speed)

the speed with which the rotor in

the front left should rotate

sets the speed of the rotor in the front

left
void setRotorBRSpeed(int speed)

the speed with which the rotor in

the back right should rotate

sets the speed of the rotor in the back

right

void setRotorBLSpeed(int speed)

the speed with which the rotor in

the back left should rotate

sets the speed of the rotor in the back

left

 

Provides:

nameacceptsreturns
int getBatteryStatus()-

the status of the battery in % (0-100)

int getActualBatteryVoltage()-the actual voltage of the battery in volt
bool checkForFailure()-

checks if there are any motor or rotor failures

or if any other failures occured

Interface Design for the Battery Sensor

Battery.h
/*Library for checking the battery, i.e.
its voltage*/ 
 
//returns the voltage of the battery in % from 0 to 100
int getBatteryStatus();

//returns the actual current voltage 
//provided by the battery in volt
int getActualBatteryVoltage();

Interface Design for the Safety Systems

FailureSystems.h
/*Library for Safety Systems. For
checking if a motor or rotor has failed.*/ 
 
//Checks for a failure in all running motor systems
//Also checks, if there are any missing rotors or
//similar problems.
bool checkForFailure();
  • No labels