Skip to content

cocomittens/drone-simulator

Repository files navigation

Drone Simulator

Simulates drones.

Try it here

Instructions

  1. npm i
  2. npm start

Settings

Screen Shot 2024-11-19 at 12 20 07 AM

Dimensions

  • Rows: Number of rows in the grid.
  • Cols: Number of cols in the grid.
  • Tree Probability: Number between 0 and 1 representing the probability of each square being a tree.

Location

  • Row: Starting row of drone.
  • Cols: Starting col of drone.
  • Direction: Starting direction of drone.

Control Codes

Modes

  • Manual: Executes control code string manually specified. Wind optional.
  • Delivery: Generates random delivery destination, executes delivery there and back. Wind disabled.

Grid

Screen Shot 2024-11-17 at 5 04 45 PM

Letters

  • [w, s, e, n]: Direction of drone at current position
  • d: Delivery destination
  • o: Original drone position
  • t: Tree
  • x: Empty space

Battery

Remaining battery percentage in upper right hand corner (each turn costs 0.5 battery units, each forward movement 1 unit)