ESE350 project, Spring 2016, University of Pennsylvania
Dependencies: Adafruit9-DOf Receiver mbed-rtos mbed
quadcopter.cpp@6:6f3ffd97d808, 2016-04-02 (annotated)
- Committer:
- ivo_david_michelle
- Date:
- Sat Apr 02 13:13:41 2016 +0000
- Revision:
- 6:6f3ffd97d808
- Child:
- 7:f3f94eadc5b5
started implementing quadcopter class;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ivo_david_michelle | 6:6f3ffd97d808 | 1 | #include "quadcopter.h" |
ivo_david_michelle | 6:6f3ffd97d808 | 2 | |
ivo_david_michelle | 6:6f3ffd97d808 | 3 | // Date constructor |
ivo_david_michelle | 6:6f3ffd97d808 | 4 | Quadcopter::Quadcopter() |
ivo_david_michelle | 6:6f3ffd97d808 | 5 | { |
ivo_david_michelle | 6:6f3ffd97d808 | 6 | SetState(0.0,0.0,0.0); |
ivo_david_michelle | 6:6f3ffd97d808 | 7 | } |
ivo_david_michelle | 6:6f3ffd97d808 | 8 | |
ivo_david_michelle | 6:6f3ffd97d808 | 9 | // Date member function |
ivo_david_michelle | 6:6f3ffd97d808 | 10 | void Quadcopter::SetState(double phi, double theta, double psi) |
ivo_david_michelle | 6:6f3ffd97d808 | 11 | { |
ivo_david_michelle | 6:6f3ffd97d808 | 12 | state.phi = phi; |
ivo_david_michelle | 6:6f3ffd97d808 | 13 | state.theta = theta; |
ivo_david_michelle | 6:6f3ffd97d808 | 14 | state.psi = psi; |
ivo_david_michelle | 6:6f3ffd97d808 | 15 | } |