This version has many additions, including the support for three different GPS protocols (SIRF, NMEA and UBX) and can be added as many are possible.
Has the well integration of the pressure sensor and battery level conversion with an offset for the ADC voltage to increase accuracy in the conversions.
Has been debugged using the ArduPilot Shield. So it should be 100% compatible.
The rest of the code stills the same as 2.1.
To change the GPS protocol looks for this definition: “#define GPS_PROTOCOL“. Next to it I have included some commands for Locosys and SIRF GPS. So you can use them as needed (just trying to save you some time).
The Ground Station now has the battery level indicator.
This code is a just a Beta, demo, preview, not official release , I never air test it (use it at your own risk). The goal is that you can start digging into it and report any bugs before releasing the official version. We are only trying to involve more the community on this. ;-)
Be advice is not easy!

Other notes:

When you power up the ArduPilot try to open the Terminal and see the message at the beginning saying something likes this:
"Pressure offset: 205"

You should go and place this value in the declaration of the air_speed_bias variable, like this:
int air_speed_bias=205;

In order to zero the airspeed sensor. All the pressure sensors have different values.

I know "bias" is wrong. ;-)

Files:
ArduPilot_EasyStar_V22.zip

GroundStation_Alpha2.zip

[UPDATE: I forgot to compile the EXE, sorry about that]:
GroundStation_Alpha2_EXE.zip

Views: 816

Comment by Tom in NOVA on May 24, 2009 at 2:52am
Awesome! Thank you for sharing your hard work Jordi! This is what I have been waiting for since I have a Locosys LS20031. Now gotta assemble all the parts...

3D Robotics
Comment by Jordi Muñoz on May 24, 2009 at 9:42am
Enjoy Tom! Tell if you see an "Elf" in the code please!
Comment by Glenn Anderson on May 24, 2009 at 7:00pm
Nice control panel, especially the compass and horizon. I work in Labview as part of my day job with the Kentucky Transportation Cabinet but have not built any custom indicators. Do you have the VI's posted somewhere?

3D Robotics
Comment by Chris Anderson on May 24, 2009 at 7:16pm
The Labview code is at the bottom of the post.
Comment by Torin Segstro on May 24, 2009 at 11:08pm
I have a quick question. I know I could probably dig through the code to find this out, but I though someone might now off hand. Is the altitude in the groundstation from the GPS, or is that derived from the static pressure?

3D Robotics
Comment by Jordi Muñoz on May 24, 2009 at 11:11pm
Torin:
=) From GPS.
Comment by Tom in NOVA on May 25, 2009 at 12:43am
GPS_NMEA.pde

GPS_EM406.pde

ArduPilot_EasyStar_V22.pde






I am still on very shaky grounds in C programming. Did some setting changes in the codes for the LOCOSYS LS20031 GPS, and have some questions. Don’t have a working hardware platform assembled yet, so can’t test the codes yet. Could someone check the code from a programming prespective, if these codes/setting as correct?

Note that all changes I have added are marked with this : ***

First, I made changes in “AurduPilot_EasyStar_V22” at the Locosys by:

1. Setting SBAS = ON
2. Setting to 5HZ
3. Adding the 57600 baud option
(It seems that the LS20031 comes factory default with 57600 baud and not at 4800 baud)

===============

Next, I edited the GPS_NMEA file:

1. After the initial 4800 baud setting I attempt to change to 57600 baud
(If the GPS came factory default at 57600 already, would it be able to communicate at 4800 baud so I can send the command to change to 57600 baud?)
(Also, not sure, if Serial.print(LOCOSYS_BAUD_RATE_57600) would send a character string associated with the variable (good) or a value (bad)?)


2. Sending command to operate in 5HZ mode: Serial.print(NMEA_OUTPUT_5HZ)
(Also, not sure, if Serial.print(NMEA_OUTPUT_5HZ) would send a character string associated with the variable (good) or a value (bad)?)

3. Set SBAS = ON
(Again, not sure, if Serial.print(SBAS_ON) would send a character string associated with the variable (good) or a value (bad)?)

4. In “void fast_init_gps(void)” set baud to 57600 from 9600 baud

======================================

Finally….there are at least two from each of these functions listed below, each with an identical name. One for NEMA and one for EM406 GPS. I am still not very familiar with local and global variables/fucntions, so wondering if I need to delete the EM406 function under the same name since I am using NEMA? Will the program flow (don’t see any If/else) ignore the two indentical function names, meaning that the NEMA will continue on its own path while the EM406 will follow its own as well? Here are the identically named functions for both GPS protocols:

void init_gps(void)
void fast_init_gps(void)
void decode_gps(void)
void configure_gps(void)
Wait_GPS_Fix()

=======================

I uploaded the changed files.
Thanks for any help and your patience…
Comment by Torin Segstro on May 25, 2009 at 9:06am
Thanks Jordi! I'm assuming there is no way to get the static pressure from the sensor on the shield because it is differential?

If not, I will probably work to add a static sensor to stabilize the altitude. Still waiting for my shield and new ardupilot to arrive. Should be this week.

3D Robotics
Comment by Jordi Muñoz on May 25, 2009 at 9:25am
Tom,

First If you don't know what are you doing i suggest leave it until we write a tutorial to use LOCOSYS. The actual settings are for EM406 in NMEA mode.

Second you don't have to "//" all the "#defines". The compiler will ignore the ones not used...
Third i don't know about locosys start default speed. But i thought the maximum speed was only 38400bps. Please read the datasheet or wait for the tutorial.

Anyway the method you are using seems to be correct. Just take care of the other details.

3D Robotics
Comment by Jordi Muñoz on May 25, 2009 at 9:27am
Torin,
Yes is differential. I suggest to use uBlox GPS. I just tested it and works 10000X better than EM406... The altitude is super precise and the turns are smooth!! 4hz!! is more than enough! Not to mention the UBX is a lot better than NMEA.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2014   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service