Pages: 1 2 3 [4]   Go Down
Author Topic: Arduino Rocket Ejection at Certain Altitude  (Read 5180 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Leeds, England
Offline Offline
Sr. Member
****
Karma: 8
Posts: 427
Quick, chuck it in the bin before the boss finds out...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Post what you've got and it can be taken from there. That way we'll know what library, if any, you are using.
Logged

Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks for the support guys
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...  smiley-wink
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
  }
}
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11170
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 549
Posts: 46063
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#include <BMP085.h>
With:
Code:
#include <Adafruit_BMP085.h>
Logged

Pages: 1 2 3 [4]   Go Up
Jump to: