Go Down

Topic: Arduino Rocket Ejection at Certain Altitude (Read 7475 times) previous topic - next topic

kg4wsv

In general, you don't really zero the sensor - the sensor reads what it reads.  What you do is sample the sensor and decide "OK, that's my zero", and save that value as the zero offset.

Thinking in terms of altitude, what you do is read the sensor, determine the absolute altitude (MSL, "mean sea level"), and assume that this value is ground level.  Afterward, you subtract this MSL value from every altitude you measure to give you AGL (above ground level) altitude, which is what we use in rocketry.

When doing the launch detect code, remember it's not just a change in observed altitude, but a change in observed altitude over a given (short) time interval.  If the weather is changing and you're on the pad for a while, you can actually see the pressure altitude change a bit while it's sitting there.

-j

dannable

Post what you've got and it can be taken from there. That way we'll know what library, if any, you are using.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

LividKiwi

Im using the library that is on adafruit's website.

Thanks for the support guys

Far-seeker


Im using the library that is on adafruit's website.

Thanks for the support guys


You realize that the cost of our help is pictures, maybe even video, of this thing in action...  ;)

LividKiwi

Sure I will post pictures!
This is the code im using. Im getting an error at the highlighted place, And I cant solve it no matter what i do.
#include <Wire.h>
#include <BMP085.h>

Adafruit_BMP085 bmp;

unsigned long datum;
unsigned long currPressure;

void setup()
{
  Wire.begin();
  bmp.begin();
  datum = bmp.readPressure();
}

void loop()
{
  currPressure = bmp.readPressure();
  if ((datum - currPressure) > 28)
  {
    // Deploy 'chute...
  }
}

PeterH


Im getting an error at the highlighted place, And I cant solve it no matter what i do.


You at least have the advantage of knowing what the error is.
I only provide help via the forum - please do not contact me for private consultancy.

PaulS

Are you using 1.0.1? If so, missing include files are no longer deemed fatal errors. The header file you are trying to include probably can not be found. Try compiling the code on a different version of the IDE.

Far-seeker


Sure I will post pictures!
This is the code im using. Im getting an error at the highlighted place, And I cant solve it no matter what i do.
#include <Wire.h>
#include <BMP085.h>

Adafruit_BMP085 bmp;


As PaulS noted this is probably due to the correct header file not being loaded.

Replace:
Code: [Select]
#include <BMP085.h>

With:
Code: [Select]
#include <Adafruit_BMP085.h>


Go Up