02/07/15
Dependencies: mbed
Calculate.cpp@6:b1490f657b21, 2015-07-02 (annotated)
- Committer:
- aidanPJG
- Date:
- Thu Jul 02 14:40:20 2015 +0000
- Revision:
- 6:b1490f657b21
- Parent:
- 5:ddbc9c48480d
- Child:
- 7:d6f78ba7c5f7
02/07/15
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aidanPJG | 4:e61cd14ec4f0 | 1 | #include "Calculate.h" |
aidanPJG | 4:e61cd14ec4f0 | 2 | #include <iostream> |
aidanPJG | 4:e61cd14ec4f0 | 3 | |
aidanPJG | 6:b1490f657b21 | 4 | float instSpeed() |
aidanPJG | 6:b1490f657b21 | 5 | { |
aidanPJG | 6:b1490f657b21 | 6 | float trueDistance = trueDistance(); |
aidanPJG | 6:b1490f657b21 | 7 | int time = 5; //sensorLater - sensorEarlier |
aidanPJG | 6:b1490f657b21 | 8 | float speed = trueDistance / time; |
aidanPJG | 6:b1490f657b21 | 9 | return speed; |
aidanPJG | 6:b1490f657b21 | 10 | } |
aidanPJG | 6:b1490f657b21 | 11 | float trueDistance(float radius,float distance_between_sensors) |
aidanPJG | 6:b1490f657b21 | 12 | { |
aidanPJG | 6:b1490f657b21 | 13 | float trueDistance = 1; |
aidanPJG | 6:b1490f657b21 | 14 | |
aidanPJG | 6:b1490f657b21 | 15 | return trueDistance; |
aidanPJG | 6:b1490f657b21 | 16 | } |
aidanPJG | 6:b1490f657b21 | 17 | int sensors() |
aidanPJG | 6:b1490f657b21 | 18 | { |
aidanPJG | 5:ddbc9c48480d | 19 | |
aidanPJG | 5:ddbc9c48480d | 20 | } |
aidanPJG | 5:ddbc9c48480d | 21 | |
aidanPJG | 6:b1490f657b21 | 22 | //float progression(bool Sensor1, bool Sensor2, bool Sensor3, bool sensor4, float radius) |
aidanPJG | 6:b1490f657b21 | 23 | //{ |
aidanPJG | 6:b1490f657b21 | 24 | // float distance = 2.34E+22f; |
aidanPJG | 6:b1490f657b21 | 25 | // |
aidanPJG | 6:b1490f657b21 | 26 | // return distance; |
aidanPJG | 6:b1490f657b21 | 27 | //} |