New hardware info available
04/09/07 17:54
Check out the project page and
hardware subsection
|
Been busy for a while
04/09/07 15:43
Release 1
11/03/07 16:20
As promised, but one day late, here's
the first release.
The file consists of 3 zip archives. A serialdaemon ( to relay serial data into flightdirector via udp and back to telemetry serial if you wish ), a flightdirector configured to read a robostix board (easily customizable for other input sources) and a Mac OS X Universal Binary Groundstation application. If you want to use a gamepad to set autopilot values, use the top index finger buttons. Try it out.
Quaternions are temporarily disabled as i haven't had the time to fully expand the kalman filter to work with them. No point in using complex rotation representations if the filtering code requires euler values... This is easily changed. As soon as i have the time i'll do it and expand the filter with a few more states.
Contributions are most welcome. Please do send 'em in.
Download the release here.
The file consists of 3 zip archives. A serialdaemon ( to relay serial data into flightdirector via udp and back to telemetry serial if you wish ), a flightdirector configured to read a robostix board (easily customizable for other input sources) and a Mac OS X Universal Binary Groundstation application. If you want to use a gamepad to set autopilot values, use the top index finger buttons. Try it out.
Quaternions are temporarily disabled as i haven't had the time to fully expand the kalman filter to work with them. No point in using complex rotation representations if the filtering code requires euler values... This is easily changed. As soon as i have the time i'll do it and expand the filter with a few more states.
Contributions are most welcome. Please do send 'em in.
Download the release here.
Latest build source
06/03/07 21:15
NEWS
quaternion angle estimator
dumped temperature compensation on gyros for now (too cpu intensive, low correction factor)
figured what was causing slow updates. although the code used the gyro input, it was being ignored inside the filter because the associated variables were float and trig operations produced values that cannot be represented with enough accuracy on that var size. So the result was that the angle estimate from the accelerometers was caniblizing the other estimates. Moved these specific vars to double precision, still evaluating results.
Currently considering moving all filtering to a separate library that takes gyro and accel inputs and produces output. I'm guessing this would be pretty useful for a lot of people...
This is a response to the latest requests for source code. I'm releasing it this weekend. I've had some problems with the pserver so i had to move to subversion and reconfigure the whole deal.
The repositories will be named flightdirector, groundstation and serialdaemon
flightdirector: data acquisition (x-plane in simulated mode), filtering, navigation, telemetry, control and actuation (x-plane in simulated mode)
groundstation: graphic mode mission editor, gamepad control relay (for real-time non assisted mode), gamepad status relay (for single channel autopilot assisted mode - buttons set altitude, speed, heading), telemetry opengl context with video source as background texture.
serialdaemon: both groundstation and flightdirector were written as network only. no serial considerations at all. This means a third element is needed (on flightdirector side, arm cpu) to relay udp to the radio modem and from the radio modem to udp. That's what serialdaemon is all about. Based on code from flockbots i think.
So, please hold your pants on till saturday and please please do send some feedback once you try it out.
BEWARE: the groundstation is Mac OS X (ppc & i386 binary, 10.4 min) only. Let me know if you know a cross-platform development environment and apis to create apps that deal with realtime video, opengl, networking, HID input and are NOT based on GLUT. I've got battery considerations to look out for
Anyone got any luck with Qt and sequence
grabbers on Windows and Linux?
quaternion angle estimator
dumped temperature compensation on gyros for now (too cpu intensive, low correction factor)
figured what was causing slow updates. although the code used the gyro input, it was being ignored inside the filter because the associated variables were float and trig operations produced values that cannot be represented with enough accuracy on that var size. So the result was that the angle estimate from the accelerometers was caniblizing the other estimates. Moved these specific vars to double precision, still evaluating results.
Currently considering moving all filtering to a separate library that takes gyro and accel inputs and produces output. I'm guessing this would be pretty useful for a lot of people...
This is a response to the latest requests for source code. I'm releasing it this weekend. I've had some problems with the pserver so i had to move to subversion and reconfigure the whole deal.
The repositories will be named flightdirector, groundstation and serialdaemon
flightdirector: data acquisition (x-plane in simulated mode), filtering, navigation, telemetry, control and actuation (x-plane in simulated mode)
groundstation: graphic mode mission editor, gamepad control relay (for real-time non assisted mode), gamepad status relay (for single channel autopilot assisted mode - buttons set altitude, speed, heading), telemetry opengl context with video source as background texture.
serialdaemon: both groundstation and flightdirector were written as network only. no serial considerations at all. This means a third element is needed (on flightdirector side, arm cpu) to relay udp to the radio modem and from the radio modem to udp. That's what serialdaemon is all about. Based on code from flockbots i think.
So, please hold your pants on till saturday and please please do send some feedback once you try it out.
BEWARE: the groundstation is Mac OS X (ppc & i386 binary, 10.4 min) only. Let me know if you know a cross-platform development environment and apis to create apps that deal with realtime video, opengl, networking, HID input and are NOT based on GLUT. I've got battery considerations to look out for
Full setup demonstration
12/02/07 14:08
This is a video. It demonstrates using
the "single channel autopilot" modes for autonomous flight with no
waypoints. You just set desired heading, altitude and airspeed
using gamepad +/- keys and send the control packet to the
"flightdirector" module using the gamepad defined "xmit" key. It
also shows the moving map display with autopilot heading clues (red
is autopilot, yellow is route or telemetry) and the OpenGL HUD
overlay. The video feed is just the MacBook cam. You can select a
different video source (video in from airborne cam receiver) in the
video preferences.
Check it out: [ click here to view/download ]
Check it out: [ click here to view/download ]
Simulator setup
18/01/07 22:42
After some major tweaks, code
segregation and extensive testing, i've got a full implementation
of the simulator setup defined inside the main flight controller
code. Take a peek at what it looks like!

X-Plane (old version 7. gotta get me an update) running on iMac 20" and groundstation (Cocoa) + flightcontroller (unix process) running on MacBook. The MacBook is flying the Cessna by itself using the same navigation code that flies real aircraft. Pretty cool! Telemetry is simulated in a UDP stream (and will remain so). Final version will relay udp-serial-udp in separate module. Notice the OpenGL HUD next to the mission planner window. Can u see a green dot next to the mission waypoint connectors? That's a live aircraft tracking marker.

X-Plane (old version 7. gotta get me an update) running on iMac 20" and groundstation (Cocoa) + flightcontroller (unix process) running on MacBook. The MacBook is flying the Cessna by itself using the same navigation code that flies real aircraft. Pretty cool! Telemetry is simulated in a UDP stream (and will remain so). Final version will relay udp-serial-udp in separate module. Notice the OpenGL HUD next to the mission planner window. Can u see a green dot next to the mission waypoint connectors? That's a live aircraft tracking marker.
Flight Controller development
version
21/12/06 16:14
Good news. Integrated filtering
algorythms into flight controller. The controller now has a
separate AHRS module which does filtering on data from a SENSOR
module. The sensor module can either be fed by a real sensor array
(imu+compass+dual pressure+gps+ultrasound alt) serial feed (bridged
into UDP by a separate module) or get simulated sensor data from
X-Plane UDP packets.
This allows me to test AHRS performance (especially on position estimation) and also eases development of the groundstation software.
The groundstation can now track the URUBU in real-time (real or simulated by X-Plane) and also feed user controls into either the real URUBU or to X-Plane joystick/throttle deflections.
All source code will be CVS'd shortly after i close some bugs.
Feedbadk is appreciated especially from people who can get linear velocites in body-frame coordinates out of X-Plane (accelerations would be great, but velocities will do because they can be differentiated).
Here's a screenshot of the groundstation tracking a simulated URUBU in X-Plane.
This allows me to test AHRS performance (especially on position estimation) and also eases development of the groundstation software.
The groundstation can now track the URUBU in real-time (real or simulated by X-Plane) and also feed user controls into either the real URUBU or to X-Plane joystick/throttle deflections.
All source code will be CVS'd shortly after i close some bugs.
Feedbadk is appreciated especially from people who can get linear velocites in body-frame coordinates out of X-Plane (accelerations would be great, but velocities will do because they can be differentiated).
Here's a screenshot of the groundstation tracking a simulated URUBU in X-Plane.
Download the filter
20/11/06 00:11
I somehow forgot to update the
homepage with the download link after posting it on sparkfun, so
here it goes. Got questions? fcv@dev6.com or IM me same address
MSN.
Download link
Download link
Eureka moment - Stable driftless
filter ready
06/09/06 22:39
To all humanity out there or just us
uav geeks:
Thy filter is ready! It works, it's accurate, it doesn't drift and it's free. I'll post it here as soon as i tweak it and optimize some internal stuff but you can count on it. Just add it to your project and compile away. Join 3 gyros, 3 accels and you're ready for some AHRS fun!
I'm attaching a small movie of the thing working. Never mind the lousy image, it's a cell phone cam.
Download here.
Thy filter is ready! It works, it's accurate, it doesn't drift and it's free. I'll post it here as soon as i tweak it and optimize some internal stuff but you can count on it. Just add it to your project and compile away. Join 3 gyros, 3 accels and you're ready for some AHRS fun!
I'm attaching a small movie of the thing working. Never mind the lousy image, it's a cell phone cam.
Download here.
Groundstation developer release
28/08/06 14:51
Thought i could post the current
version of the groundstation. Mail me some feedback.
Application download
Developer release: artificial horizon needs udp broadcast with attitude data. For now, it's provided by the ahrs ansi-c program that i'm developing. If you want to test with a simulator such as X-Plane, just send the packets to any interface on the local machine.
Packet structure is (in development)
Header byte 'A'
Roll float
Pitch float
Yaw float
Footer byte 'Z'
Floats are supposed to be streamed in network/big endian byte order.
Application download
Developer release: artificial horizon needs udp broadcast with attitude data. For now, it's provided by the ahrs ansi-c program that i'm developing. If you want to test with a simulator such as X-Plane, just send the packets to any interface on the local machine.
Packet structure is (in development)
Header byte 'A'
Roll float
Pitch float
Yaw float
Footer byte 'Z'
Floats are supposed to be streamed in network/big endian byte order.
Progressing fast
23/08/06 16:17
Before i get a chance to update the
hardware pages, i'll outline the new stuff.
The IMU now has custom firmware (thanks Sparkfun for the 16f88 bootloader) and spits 34 byte packets at 60Hz. Rate is configurable using simple commands.
The ATmega128 now uses one 57600 UART to get data from the IMU, one 115200 to communicate with the flight computer and a third software UART written using one external interrupt and timer2 running at 4800 to get GPS packets (NMEA or TSIP).
So here's the list of stuff connected to the ATmega128:
UART-Gumstix (flight computer)
UART-IMU (6dof sparkfun)
SWUART-GPS
I2C-Compass
ADC-Ultrasonic ranger
ADC-Absolute pressure
ADC-Dynamic pressure
PWM-3 servos and one ESC
Plus i've decided to go with Maxstream Xbees (pro version) for communications on the first prototype. I figure i'll find a future use for the modules at which time i can move comms to the final 900Mhz version for longer range.
As for the software prototype, i now have a groundstation with route planning and artificial horizon superimposed on a video feed. The overlay includes a full virtual cockpit like in any simulator with heading, airspeed, groundspeed, vertical speed, throttle, engine rpm, voltage, eta to next waypoint, distance to next waypoint, etc.
So far all IMU filtering is done on the groundstation. Basically it reads the serial stream from the atmega and processes data with a complete kalman filter. I can achieve driftless accurate attitude estimations for about two hours. Still needs improvements.
The low level estimator code is fully ANSI-C compliant so it cross-compiles to the gumstix where it will reside on the prototype. The gumstix will then stream status packets using the xbee back to the groundstation where all visualization and tracking code is already running as well as pass control packets to the atmega which then translates them into PWM for servos and ESC.
The IMU now has custom firmware (thanks Sparkfun for the 16f88 bootloader) and spits 34 byte packets at 60Hz. Rate is configurable using simple commands.
The ATmega128 now uses one 57600 UART to get data from the IMU, one 115200 to communicate with the flight computer and a third software UART written using one external interrupt and timer2 running at 4800 to get GPS packets (NMEA or TSIP).
So here's the list of stuff connected to the ATmega128:
UART-Gumstix (flight computer)
UART-IMU (6dof sparkfun)
SWUART-GPS
I2C-Compass
ADC-Ultrasonic ranger
ADC-Absolute pressure
ADC-Dynamic pressure
PWM-3 servos and one ESC
Plus i've decided to go with Maxstream Xbees (pro version) for communications on the first prototype. I figure i'll find a future use for the modules at which time i can move comms to the final 900Mhz version for longer range.
As for the software prototype, i now have a groundstation with route planning and artificial horizon superimposed on a video feed. The overlay includes a full virtual cockpit like in any simulator with heading, airspeed, groundspeed, vertical speed, throttle, engine rpm, voltage, eta to next waypoint, distance to next waypoint, etc.
So far all IMU filtering is done on the groundstation. Basically it reads the serial stream from the atmega and processes data with a complete kalman filter. I can achieve driftless accurate attitude estimations for about two hours. Still needs improvements.
The low level estimator code is fully ANSI-C compliant so it cross-compiles to the gumstix where it will reside on the prototype. The gumstix will then stream status packets using the xbee back to the groundstation where all visualization and tracking code is already running as well as pass control packets to the atmega which then translates them into PWM for servos and ESC.
Glass cockpit
30/04/06 14:31
Howdy. Sourceforge hasn't approved the
project yet, so i just figured i could improve the code i already
have instead of just waiting. So i patched in a quick hack for
future support for quaternion to euler transforms.
For those who understand the problem with traditional matrix processing of rates into angles by integration, the quaternion process is a lot nicer. It is computationally more efficient and has no tangent singularity problems at π/2 + Kπ.
Then i decided to improve the glass cockpit HUD. I still haven't got my pressure sensors PCB mount nor the digital compass but i implemented the values in the cockpit anyway. I also improved performance and reliability of the drawn angles.The code is now mature enough to merge into the mission planning/telemetry downlink app with live map. I'm working on a simple overlay of artificial horizon and readings into the live video from onboard camera to save some space. Plus is helps seeing the REAL horizon on the video.
Here's a video of the setup (complete with IMU startup, etc). I hope Ambrosia Software will forgive the use of an unregistered product (Snapz Pro X) for screen movies, but hey, at least they get free visibility!
For those who understand the problem with traditional matrix processing of rates into angles by integration, the quaternion process is a lot nicer. It is computationally more efficient and has no tangent singularity problems at π/2 + Kπ.
Then i decided to improve the glass cockpit HUD. I still haven't got my pressure sensors PCB mount nor the digital compass but i implemented the values in the cockpit anyway. I also improved performance and reliability of the drawn angles.The code is now mature enough to merge into the mission planning/telemetry downlink app with live map. I'm working on a simple overlay of artificial horizon and readings into the live video from onboard camera to save some space. Plus is helps seeing the REAL horizon on the video.
Here's a video of the setup (complete with IMU startup, etc). I hope Ambrosia Software will forgive the use of an unregistered product (Snapz Pro X) for screen movies, but hey, at least they get free visibility!
IMU Trial Runs
23/04/06 22:53
While i wait for the sourceforge
project approval, i decided to quick-code an artificial horizon to
test the IMU ouput. It's written in Cocoa (Objective-C). The idea
is to make one computer interface the unit using the UART to serial
adapter (RS232 my MAX233 wire soldered heheh) and broadcast a
telemetry UDP stream. This helps me prototype the telemetry
messaging structures before i have a fully funcional AHRS. The
other computer receives the UDP stream on a secondary thread and
posts attitude update requests to the main thread, which in turn
runs a HUD update timer at 10Hz (which is enough for smooth
refreshing and has nothing to do with the internal IMU update
rate).
I'm posting a video of the setup (low quality grab from Nokia phone). Check it out here.
I'm posting a video of the setup (low quality grab from Nokia phone). Check it out here.
Great new stuff
22/04/06 02:57
I've managed to integrate both
pressure sensors (Urubu project. MPX4115A & MPX5050) into a
single compact tiny board (1inch x 1inch) and placed an order for
manufacture in China. It should take a while for me to get the PCBs
but i'll post the schematics as soon as i figure out how i'm gonna
solder the SMDs (pancake hot plate comin' up) for the opamp and
supply decoupling.
Another great thing is the sourceforge project i just submitted (waiting for approval). It's a prototype of an AHRS (no gps yet) for the IMU unit i'm using (sparkfun imu v1 - 23.5 Hz with 3 gyros and 3 accelerometers). As of now, i have ADC pooling, 3 point temperature calibration and supply voltage drift compensation. I'm also experimenting with matrix attitude estimation (reading "The Global Positioning System & Inertial Navigation") but it's too raw. I'm figuring out how to alias my output and perform dynamic Kalman error gain estimation. This will take quite some time, i'm sure. That's why i opened the code on sourceforge. I'm sure lots of sparkfun imu users will participate with ideas.
Another great thing is the sourceforge project i just submitted (waiting for approval). It's a prototype of an AHRS (no gps yet) for the IMU unit i'm using (sparkfun imu v1 - 23.5 Hz with 3 gyros and 3 accelerometers). As of now, i have ADC pooling, 3 point temperature calibration and supply voltage drift compensation. I'm also experimenting with matrix attitude estimation (reading "The Global Positioning System & Inertial Navigation") but it's too raw. I'm figuring out how to alias my output and perform dynamic Kalman error gain estimation. This will take quite some time, i'm sure. That's why i opened the code on sourceforge. I'm sure lots of sparkfun imu users will participate with ideas.
All development and posting on halt
for exam season
03/02/06 14:41