lab 6
Dependencies: ADXL362 mbed MPL3115A2
Diff: report.txt
- Revision:
- 29:f328fa35e8eb
- Parent:
- 12:c6b056ad171e
- Child:
- 30:9e127911409d
--- a/report.txt Thu Mar 08 21:06:51 2018 +0000 +++ b/report.txt Thu Mar 08 21:18:29 2018 +0000 @@ -13,4 +13,86 @@ This algorithm assumes 2 main things about the evironment: that any knock is significant enough to change the measured value from the initial value by at least 3, and that the baseline does not change (that is, that the board's orientation is fixed -during program execution). \ No newline at end of file +during program execution). + +# Documentation on Altimeter Measurement + +Our altimeter code (measureAlt()) reports the atmospheric pressure in Pascals and +temperature in Celcius, retrieved from the appropriate registers at a rate of 10Hz. +The function saves the first 1000 measurements into an array of doubles (doubles being +the returned values of both our pressure and temperature measurements), arranged in +order of measurement. (data[0] is the first pressure measurement, data[1] the first +temperature measurement, data[2] is the second pressure measurement, and so on.) + +If the buffer is filled or a keypress is registered from the PC, measureAlt() stops +measuring and shows a basic input prompt, "p%". If the interrupt was from a keypress, +the key pressed is echoed as well. If the user types 'p' and then 'enter', the +measurements taken are printed to the terminal in the following format: + + %PRESSURE% %TEMPERATURE%\n\r + +(Example actual output is shown below.) + +Once the measured values have been printed, the function exits successfully. + + #A note on our implementation + Currently, our code relies on being connected to a pc with a keyboard as it is + measuring values. This is a limitation of our code that we are attempting to + (and fully plan to) address. + +Example output: + +98763.000000 22.187500 +98763.000000 22.187500 +98763.000000 22.187500 +98763.000000 22.187500 +98763.000000 22.187500 +98763.000000 22.187500 +98763.000000 22.187500 +98763.000000 22.187500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98749.000000 22.062500 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98797.000000 22.250000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98785.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98794.000000 22.125000 +98842.000000 22.250000 +98842.000000 22.250000 +98842.000000 22.250000 +98842.000000 22.250000 +98842.000000 22.250000 +98842.000000 22.250000 +98842.000000 22.250000