Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Introduction

LOS interface is the only piece of software that shall be exposed to ZeroPilot, providing an interface for ZeroPilot to access the drivers that control all available sensors and peripherals.

Design Goals

The following are the design goals of a LOS Interface:

  1. Provide an interface between ZeroPilot and LOS_Drivers.

  2. Provide support for multiple drivers of the same type of peripheral/sensor without modification of code using the interface.

  3. Ability to combine multiple peripheral/sensor drivers to provide a desired result.

The first goal is self explanatory, we need an interface!

The second goal is important because like any good interface, it should be abstracted enough such that anyone using the interface does not have to know what the inner workings of the drivers are. Furthermore, if the inner workings of the drivers change, or the driver itself changes, the interface should stay exactly the same and nothing using the interface should have to change as a result.

A good analogy is a car. As a human driving the car, you shouldn’t have to know exactly how the combustion engine, motors, and electrical system work, all you have to know is how to start the car with the key and drive with the steering wheel and pedals. If you decide to change your engine, you shouldn’t have to also change your steering wheel and gas pedal to accommodate, it should “just work”.

The third goal is in place to allow the interface to combine multiple drivers to provide one uniform output. For example, we may want to know the current state of our drone in space, and lucky for us, we have both a GPS and IMU on our drone. So we decide to create a LOS Position interface that combines both GPS and IMU data from each sensor into a nice struct that can be presented to who every is using the interface instead of having to get both individually.

Implementation

  • Singleton

  • Initialization

  • Input

  • Outupt

  • Modification

Areas for Improvement

  • No labels