VRAD Martian Survival User Guide 2021-22

bool move_backward(dst)- Moves the drone backward (pitch backward) bool move_left(dst) - Drone will move left (roll left) bool move_right(dst) - Drone will move right (roll right) bool move_up(dst) - Drone will increase its altitude by dst. Note : Must take_off() first bool move_down(dst) - Drone will decrease its altitude by value of dst. bool set_altitude(alt) - Drone will increase/decrease its altitude to reach the height set Note: Must take_off() first bool turn_left(ang) - Drone will turn left (yaw left) bool turn_right(ang) - Drone will turn right (yaw right) bool take_off(alt) - Turns on the drone’s motors and flies it to the specified altitude bool land() - The drone will land over its current position bool linear_angular(lin, ang) - Sets the linear and angular velocity of the drone. The arguments in range [0, 1] as a percentage of the drone’s maximum speed bool stop() - Stops the drone’s current movement ( does not affect any other operation such as mining) bool drop_mine() - Conman only . Drops a fake mine with 0. Your team’s drones won’t be able to discover it using their sensors. Can only drop 1 mine. bool mine() - Mines as many objects as the drone can carry as long as there is at least that amount available in the mine bool deposit() - Deposits the full amount of objects currently being carried by the drone. Must be at base or you will lose your minerals. bool revive(batteryPercentage) - Donates a percentage of your battery (in range [0, 1]) to another drone if you are currently landed on it. If you recharge their battery past 100%, you waste the extra amount. float get_distance(x, z) - Returns the distance between this drone’s XZ coordinates and the specified XZ coordinates, using the Pythagorean theorem. Ownership not required for this method float get_angle(x, z) Returns the angle that this drone must rotate to the right by in order to face the given XZ position. turn_right(getAngleTo(x, z)) will rotate you towards this point. Ownership not required for this method

23

Made with FlippingBook HTML5