auto takeoff and landing using barometer

is there anybody have the code for auto take off and landing using barometer? i have no idea how to start to write the code. Thaks.

I very much doubt whether you could make that work. It would take a barometer accurate to what? 1 foot? If that exists, it would be very expensive. Furthermore, atmospheric pressure would change while your aircraft was in the air, so, even if you had such a barometer, you would have to update it from other source while it was in flight. I think you might want to use at a barometer to know when you are somewhere in the vicinity of the ground, but use a downward pointing distance sensor of some type to control altitude during an auto landing.

Good luck. If you achieve this, it will be quite a credit.

if you have a baramoter at the end of the runway and sync'd before takeoff, you might have a chance.

that way, as the pressure changed, the ground could up-date the in-flight.

[joke]
At a recent real-time Java conference, the participants were given an awkward question to answer:

"If you had just boarded an airliner and discovered that your team of programmers had been responsible for the flight control software, how many of you would disembark immediately?"

Among the forest of raised hands only one man sat motionless. When asked what he would do, he replied that he would be quite content to stay aboard. With his team's software, he said, the plane was unlikely to even taxi as far as the runway, let alone take off.
[/joke]

It would be easy to experiment with the barometer held in your hand to see if it could give readings with sufficient accuracy in sufficient time to control a descent.

...R

Been done, works fine.
Look up: 1) Ardu-pilot, and 2) P.I.D.

Here is what the Ardupilot creators have to say about landing a model, using a barometer:

The key to a good landing is the autopilot knowing how far off the ground it is. With the default setup the only sensor available to detect altitude is the barometer. Unfortunately barometers suffer from three main types of error:

barometric drift due to changes in atmospheric pressure
barometric drift due to changes in the temperature of the autopilot electronics
barometric error due to local pressure changes from airflow around the barometer

The ideal setup for good automatic landing is to have a Lidar. A Lidar can measure the distance to the ground very accurately, and doesn’t suffer from drift. If you have a Lidar installed you can enable its use for landing with RNGFND_LANDING=1.

http://plane.ardupilot.com/wiki/automatic-landing/

Still works, O.K. maybe not the best,