Servers by jDrones

Additional Analog Sensors - Energy

(Monique Rivard) #1

Hi There,

I have been working on developing some code for the APM2.5 using the last supported firmware (ArduPlane 3.4). I am trying to make a library for an airspeed sensor that can be configured to measure changes in energy (to be later implemented in a new flight mode). I have modeled my new library off of the existing airspeed library but when using both the energy and airspeed sensor libraries together I am getting no output from the board. Even if the library is just a copy of the airspeed library with class names changed and a different analog pin being used, my output values are still zero. I am currently using MAVProxy as a ground station and to see the outputs of these values.

Any suggestions on where to go from here/what I might be doing wrong?

Thanks,
Monique

(Peter Hall) #2

quite hard to give advice on developing such a old release. would definitely recommend you move on to current hardware.

What are you planning to use the new mode to do? The TECS system this uses the toatal energy derived from airspeed and altitude, maybe this would be similar to what you want to do.

(Monique Rivard) #3

The hope was to create a flight mode that uses principles of dynamic soaring, similar to the current soaring method in the most recent release. In some sense I was hoping to introduce an analog energy sensor that uses a specific static pressure pitot tube. I will look into the TECS system to see if it may be applicable to this problem.

And sadly I would like to upgrade to the newer hardware but we only have the old hardware in our inventory right now, and are trying to make it work with what we have.

(Peter Hall) #4

sounds like a cool project!

the soaring code does do a energy prediction, https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_Soaring/Variometer.cpp

Autopilot is now supported by a wide range of inexpensive boards you could certainly get something for less than $50.

@Samuel_Tabor Is the ArduPilot soaring expert

(Samuel Tabor) #5

The current soaring code uses the airspeed and barometer sensors to get the total energy. The next release will use the accelerometers too.

Dynamic soaring is a great project! Be aware that it will be very challenging, especially on the APM 2.5 (no EKF).

I’m not sure how to go about adding an analog sensor in that release. In the current version its quite easy to write a library accessing the Pixhawk ADC connector.