Paul Mather's Posts (44)

Sort by

Make your own KickStarter style hexa!

12112011_v4H6_600_3.jpg

So there have been a few threads about the failed Kickstarter campaign by Kellie Sigler of LumenLab.com. Failed not because it they didn't collect enough money in the time alotted, but I'm assuming due to potential legal issues with selling a UAV to overseas buyers or a lack of originality in this project as they might have been designing and building nothing new or of their own design. There has been some discussion about if this project was actually a scam.

http://diydrones.com/profiles/blogs/apm-powered-hexacopter-project-on-kickstarter?id=705844

http://www.diydrones.com/profiles/blogs/kickstarter-drone-is-a-hoax?commentId=705844%3AComment%3A773491&xg_source=msg_com_blogpost

http://spectrum.ieee.org/automaton/robotics/diy/update-eye3-drone-officially-too-good-to-be-true

http://www.kickstarter.com/projects/eye3/eye3/comments

http://news.cnet.com/8301-17938_105-57369152-1/kickstarter-grounds-eye3-flying-camera/

Right now, I come down on the side of the project didn't include a single photo of their own work so I doubt they've even built one. They made claims about using "these computers" for 2 years when discussing the APM2 when I'm on the ArduPilot dev team and I don't even have one yet! And they had an estimated delivery date of March, 2012 without ever checking with Jordi and 3DR about delivery dates and quantities. Is this wrong? I think so. Is it a scam? I wouldn't call it that. But they sure don't keep their estimated delivery dates (see 8-10 months later) .

 

So what's the point of this blog? I just want to educate you on where you can go to get the exact parts listed in the KickStarter campaign and build your own.

Will it be easy? No.

Is it bullet proof? No.

Will you crash it? Yes!

Do I have the PID settings for this airframe? No.

Can I send you all the parts if you order from me? No. I'm not selling anything.

What exactly was I getting for the extra money on KickStarter? I would say packaging....and maybe a distribution board (they called it a "HOOK UP BOARD").

Have I built one? Nope.

Do I know what I'm talking about? Too soon to tell.

 

APM2: $199

Xaircraft Hexa Frame carbon fiber + Motors, ESCs and camera mount: $669

5000mah 3S lipo (they listed 6000mah but no voltage):  $26.72

Mission Planner Download:  $FREE 

Futaba T8FG Radio (but lots of other radios would work just fine):  ~$480

Turnigy 4x6S Lithium Polymer Battery Pack Charger:  $99 

X-Bee Telemetry Kit: $150

 

Total cost buying directly from the source: $1,624 + shipping.

They were going to include a "pro spares" kit (whatever that is) and a TX case for $2,499.

What's missing from the list above is PID tuning values and lots and lots and lots of trial and error.

 

EDIT: This photo may be the only evidence that Kellie and company may have actually built one!

Found here: http://kelliesigler.com/images/IMG_1147-1024x764.jpg

IMG_1147-1024x764.jpg

Read more…

main_130b.gif?width=750

A special thanks to Max Levine for his fantastic work on the new instruments. The instruments and 3D model can be set to a "smooth" setting for those of you with processor to spare. This setting can be changed in the File, Settings, Instruments tab. For the best performance, do not select smooth for the instruments and don't select the 3D model instrument. Plus the turn coordinator is working much better now....

 

Download available here: http://code.google.com/p/happykillmore-gcs/downloads/list

 

This version also contains the ability to save the data files as a .HEX on binary protocols which will show the same data as what's showin in the serial data tab (plus time and date).

 

Plus there's a Vario tab at the bottom left for those of you searching for thermals.

 

Guided mode is ready. Connect to APM, click the Control tab and click Guided Mode. Then double-clicking on the map will set the waypoint.

 

New "text" versions of the instruments and status tab are now available as well as 3 pitch/roll/yaw instruments for those of you setting up your quads.

 

 

Read more…

 My last blog post on this subject was incomplete. Now I have photos I actually built and tested it. 

step1.jpg?width=200

step2.jpg?width=200

step3.jpg?width=200

step4.jpg?width=200

step5.jpg?width=200

step6.jpg?width=200

6positionknob6.gif?width=551

 

6positionknob5.gif?width=551

After reading a recent blog I have decided I REALLY need to get out there and fly this year. I spend far too much time in front of my computer... So thanks to Max Levine's wonderful blog, http://diydrones.com/profiles/blogs/ardupilotcopter-mega-6 I've decided to go ahead and modify my Turnigy 9X to add a 6-position switch. This is going to be more or less a mini-build log as all I've done so far is order the parts....and they're all available from a single supplier, so save money on shipping!!!

 

cck_b.jpg?width=80srrn_l.jpg643_MFR.jpg

Again, props to Max Levine for his original blog on this topic.

 

Parts ordered (the resistor values came from an experiment with a Turnigy 9X and potentiometer):

 

(1) X ALPS 6-position switch = $7.06/ea or (1) X ALPS 6-position switch = $9.40/ea

(1) X 6mm knob = $0.59/ea

 

7 resistor solution:

(1) X 1.3K ohm resistor - $0.11/ea

(5) X 1.5K ohm resistors = $0.11/ea = $0.55

(1) X 1.0K ohm resistor = $0.15/ea

 

5 resistor solution:

(1) X 2.8K ohm resistor = $0.15/ea

(3) X 1.5K ohm resistors = $0.11/ea = $0.33

(1) X 2.5K ohm resistor = $0.15/ea

 

Step1.jpg?width=400

Step2.jpg?width=400Step3.jpg?width=400Step4.jpg?width=400Step5.jpg?width=400Step6.jpg?width=400

 

EDIT Sorry to keep changing the resistor values on you, but I'm trying to get as close as possible to the middle of the band for everyone. AR Projects read a min and max of 1085 and 1921, where I read a min and max of 1047 and 1878.

 

Current Cost (not including shipping all ordered from Mouser.com) = $8.46

Shipping is "estimated" at $6.40 so I'm in for $14.86 so far.

 

For those that don't want the hassle, you can buy a 6 position switch pre-made from one of our fellow DIYdroners - AR Projects - http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=120731012907&fromMakeTrack=true&ssPageName=VIP:watchlink:top:en

 

UPDATE 6/11/2011

I didn't wait for Mouser to get the switch in stock, so I ended up spending $9.40 including shipping to get the switch from eBay. If you can wait, the original price of $8.46 plus shipping still stands. If not, you're looking at $3.40 for the knob plus $6.00 shipping and $1.40 for the resistors and knob plus Mouser charged me $5.20 in shipping. Total cost with shipping was $16. If I could have waited I would have saved about $2.00 on the total cost.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=140481713934&ssPageName=STRK:MEWNX:IT

 

These are the target and actual PWM values achieved using 7 resistors. (6) 1.5K and (1) 768 ohms

 

Pos 0: <= 1230 = 1165 Target - 1175 Actual
Pos 1: 1230 - 1360 = 1295 Target - 1300 Actual
Pos 2: 1361 - 1490 = 1426 Target - 1431 Actual
Pos 3: 1491 - 1620 = 1556 Target - 1555 Actual
Pos 4: 1621 - 1750 = 1686 Target - 1684 Actual
Pos 5: >= 1750 = 1815 Target - 1811 Actual

 

That's about as perfect as it can get.

 

ADDITIONAL NOTES:

A few things worth mentioning during the "build."

 

1) Before you try to solder the wires going to the switch, take a pair of large cutters and trim off the bump on the switch. If you look at the top of the switch, you'll see a keyed piece of metal that would be used to keep the knob from rotating, if the plastic housing was designed for it. If you try to clip it after the fact, you may run the risk of breaking off a resistor like I did.

 

2) Take an x-acto knife and ream out the hole a little bit. The threads on the switch won't go through otherwise.

 

3) The radio case will be a bit tight to get back together in the corner where you installed your switch. I forced mine ever so slightly....but I could have done a better job cutting the metal tab off my swtich.

 

Read more…

  

6positionknob6.gif?width=551

 6positionknob5.gif?width=551

After reading a recent blog I have decided I REALLY need to get out there and fly this year. I spend far too much time in front of my computer... So thanks to Max Levine's wonderful blog, http://diydrones.com/profiles/blogs/ardupilotcopter-mega-6 I've decided to go ahead and modify my Turnigy 9X to add a 6-position switch. This is going to be more or less a mini-build log as all I've done so far is order the parts....and they're all available from a single supplier, so save money on shipping!!!

 

 cck_b.jpg?width=80srrn_l.jpg643_MFR.jpg

Again, props to Max Levine for his original blog on this topic.

 

Parts ordered (the resistor values came from an experiment with a Turnigy 9X and potentiometer):

 

(1) X ALPS 6-position switch = $7.06/ea or (1) X ALPS 6-position switch = $9.40/ea

(1) X 6mm knob = $0.59/ea

 

7 resistor solution:

(1) X 1.3K ohm resistor - $0.11/ea

(5) X 1.5K ohm resistors = $0.11/ea = $0.55

(1) X 1.0K ohm resistor = $0.15/ea

 

5 resistor solution: 

(1) X 2.8K ohm resistor = $0.15/ea

(3) X 1.5K ohm resistors = $0.11/ea = $0.33

(1) X 2.5K ohm resistor = $0.15/ea

 

Step1.jpg?width=400

Step2.jpg?width=400Step3.jpg?width=400Step4.jpg?width=400Step5.jpg?width=400Step6.jpg?width=400 

 

EDIT Sorry to keep changing the resistor values on you, but I'm trying to get as close as possible to the middle of the band for everyone. AR Projects read a min and max of 1085 and 1921, where I read a min and max of 1047 and 1878.

 

Current Cost (not including shipping all ordered from Mouser.com) = $8.46

Shipping is "estimated" at $6.40 so I'm in for $14.86 so far.

 

For those that don't want the hassle, you can buy a 6 position switch pre-made from one of our fellow DIYdroners - AR Projects - http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=120731012907&fromMakeTrack=true&ssPageName=VIP:watchlink:top:en

 

UPDATE 6/11/2011

I didn't wait for Mouser to get the switch in stock, so I ended up spending $9.40 including shipping to get the switch from eBay. If you can wait, the original price of $8.46 plus shipping still stands. If not, you're looking at $3.40 for the knob plus $6.00 shipping and $1.40 for the resistors and knob plus Mouser charged me $5.20 in shipping. Total cost with shipping was $16. If I could have waited I would have saved about $2.00 on the total cost.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=140481713934&ssPageName=STRK:MEWNX:IT

 

These are the target and actual PWM values achieved using 7 resistors. (6) 1.5K and (1) 768 ohms

 

Pos 0: <= 1230 = 1165 Target - 1175 Actual
Pos 1: 1230 - 1360 = 1295 Target - 1300 Actual
Pos 2: 1361 - 1490 = 1426 Target - 1431 Actual
Pos 3: 1491 - 1620 = 1556 Target - 1555 Actual
Pos 4: 1621 - 1750 = 1686 Target - 1684 Actual
Pos 5: >= 1750 = 1815 Target - 1811 Actual

 

That's about as perfect as it can get.

 

ADDITIONAL NOTES:

A few things worth mentioning during the "build."

 

1) Before you try to solder the wires going to the switch, take a pair of large cutters and trim off the bump on the switch. If you look at the top of the switch, you'll see a keyed piece of metal that would be used to keep the knob from rotating, if the plastic housing was designed for it. If you try to clip it after the fact, you may run the risk of breaking off a resistor like I did.

 

2) Take an x-acto knife and ream out the hole a little bit. The threads on the switch won't go through otherwise.

 

3) The radio case will be a bit tight to get back together in the corner where you installed your switch. I forced mine ever so slightly....but I could have done a better job cutting the metal tab off my swtich.

 

Read more…

APM_Joystick.jpg

Just in case you missed it in one of my other posts, joystick control is now working via my GCS. I need to write up a "proper" wiki page on how to use it, but here are the basics.

Download my GCS here: http://code.google.com/p/happykillmore-gcs/downloads/list


Edit your APM_Config.h file and add this:
#define ALLOW_RC_OVERRIDE ENABLED

Once you have your APM talking MAVlink to the GCS, click on the Joystick tab at the bottom left. Then select calibrate.

The calibration screen is used to set sub trims, servo reversing and end point adjustment. The first thing I would recommend (as I have not fully worked out the initial settings for this screen) is to select your joystick at the top and then select which mode you want to use (ie Mode 2) which will pull up the defaults for that mode.

Next Click "Enable" which will allow the software to grab the joystick movement.

Now move the joystick axis and confirm that the correct stick movement moves the correct throttle, elevator, aileron and rudder axis. If you do not wish to control an axis via joystick, select "None" under joystick input.

If you have previously used the radio calibration via the CLI then your endpoints should already be set. If not, they can be adjusted along with sub-trim (may be difficult to do on the ground) and you'll NEED to confirm your reverse settings! Next make sure you assign the servos correctly (actually, I'm not sure it can be set differently on the APM)

Throttle = Servo 2
Elevator = Servo 1
Aileron = Servo 0
Rudder = Servo 3

Now you should be able to move your joystick and see servo movement on the APM.

Here are a few things to keep in mind when using joystick control. 

1) If the radio output on channel 8 (mode selection) is set to "manual" mode, the joystick will not work. If you've used the GCS to select Manual Mode but your radio mode selection is set to something else, then the joystick will work. It's possible to use the joystick in every mode except hardware manual.

2) Radio control will not work until you unclick the "Enable" button on the joystick tab (or calibration tab). The APM will only listen to one input device at a time. As soon as you select joystick, it will only listen to the joystick until you disable the joystick function.

3) It is possible to run a joystick only calibration using the "Set Endpoints" button on the calibration screen. However, this is not the recommend way to do things as your radio endpoints must be adjusted as well.

4) Running the CLI's radio setup will over-write any end-point or sub-trim values you have set on the calibration screen.

Let me know if you have any problems!
Use at your own risk!

Read more…
GCS_Main.jpg
I have posted the most important HK GCS update for non-United States users...ever. There has been a nagging bug that has caused some serious problems if your regional settings are set to anything other than English (United States). It's not even a comma vs period for decimal place issue. It's an encoding problem. It has literally taken me weeks of effort to finally find a work-around for this bug and I've finally done it.

The symptoms were when you'd connect the GCS to your APM via MAVlink, only a portion of the parameters would download and the automatic mission read would typically fail. If you click Read enough times, you might actually get the parameters to all download and the entire mission to read, but it was a pain. With US users, this was all automatic and very infrequently (or at least in my testing) would I have a read fail.

Now, it should work for everyone!
Also check out the new joystick control for APM!!!
Please Note you'll need to add this to your APM_Config.h: #define ALLOW_RC_OVERRIDE ENABLED

http://code.google.com/p/happykillmore-gcs/downloads/list

APM_Joystick.jpg
Read more…

HK's GCS now compatible with APM MAVlink

mavlinkparameters.gif
mavlinkmission.gif
Paramater updates and waypoint/mission commands are now included in my GCS. "Control" commands are not available yet because I don't know what's ready to go in the APM MAVlink code yet....

The MAVlink trunk is here: https://ardupilot-mega.googlecode.com/svn/Sketchbook/trunk

Download my GCS here: http://code.google.com/p/happykillmore-gcs/downloads/list

It took me a while (and some help from Doug Weibel...Thanks Doug!) to figure out the 2-way communication. The hardest part about this implementation is it's asyncronous. Which means you've got to be ready to handle the messages even though they're sprinkled in with telemetry data. I still need to add the ability to change the output Hz on the MAVlink messages.... and all the control messages (like RTL and Loiter Here....etc). I'd also like to be able to download logs files using MAVlink.... but I'm not sure if that's possible.

Works via X-Bee. Built in parameter limits and descriptions. Drag and drop waypoints built into Google Earth plugin for real time mission planning. Automatic retries and timeouts for bad connections. Progress bar and status messages. Full APM mission command set.
Read more…
linklostalarm.gif
HeartbeatConfig.gif


You can now define how much time passes before a warning or alarm is shown on the GCS by clicking File, Settings and selecting the Alarm and Warning Timeout on the General Tab. There is also an associated speech event for both warning and alarm as well. You can use {alarm} and {warning} as replacements in the speech string.

For example:
DANGER! DANGER! Telemetry link has been lost for more than {alarm} seconds
{alarm} is replaced with the Alarm Timeout value from the General Tab.

More detail here: http://code.google.com/p/happykillmore-gcs/wiki/SpeechSettings

In addition, there are now 6 user definable heartbeats that can be used for anything you'd like. They can be set to fire only once (after connecting) or by seconds or multiple times per second. There are 4 default heartbeats for use with NMEA or MediatTek GPS units and 868 X-Bee's.
Heartbeats are configured by clicking File, Heartbeat Configuration

Download here: http://code.google.com/p/happykillmore-gcs/downloads/list
Read more…

HK GCS Joystick support for AttoPilot

Ok, the idea of this freaks me out a little. I added support of the new $E and $F commands on AttoPilot via joystick input.

joystickcalibrate2.gif

It hasn't been tested in the field yet and only elevator and aileron have any function...right now. I'm hoping to incorporate the $H speed command in as well.

Just as an FYI, you want the numbers to go higher to turn right or go up. Lower for left or down. I also put a hard coded limit of 35 degrees on the pitch and roll....

http://code.google.com/p/happykillmore-gcs/downloads/list

Good luck!

Disclaimer: HappyKillmore takes no responsibility for trying to fly your plane with a joystick. Are you nuts? You've got a R/C controller in your hand. It's right there! I can see it! Fly with that thing...not a joystick!
Read more…

Antenna Tracking in HappyKillmore's GCS

FPV antenna tracking is now working in HappyKillmore's GCS v1.1.32 and newer.
TrackingCalibration.gif
Are you looking for something to do with your original ArduPilot now that you've got the new ArduPilot Mega? Why not put it to good use! Diego Colonnello and I have come up with an antenna tracker for my GCS. It uses the original ArduPilot, a couple servos and a FTDI cable. Building the actual mechanism to move your patch antenna is up to you...but the code is in there to make it work. You can also use your ArduStation! Simply select the ArduStation output type and the data will flow out in the right format regardless of GPS or Auto-pilot brand.


Here's a Wiki page trying to explain how it works: http://code.google.com/p/happykillmore-gcs/wiki/Tracking

To download the ArduTracker 1.0 source and 1.1.32 of my GCS: http://code.google.com/p/happykillmore-gcs/downloads/list

TrackingTab.gifLobes.gif
Read more…

HK's GCS v1.1.1 is in need of translators

v110.gif

Version 1.1.1 is ready to be translated. There are currently 206 words and phrases in the list. Anyone who can help me out with this task, please respond below. Thank you!!!

 

Languages Completed So Far:

en;English
zh-CN;Chinese-PRC
zh-TW;Chinese-Traditional
da;Danish
es;Español
fi;Finnish
fr;Française
it;Italiano
pl;Polski
pt-BR;Português Brasileiro
pt-PT;Português
ro;Romana
ru;Russian
sk;Slovensky
tr;Türkçe
ur;Urdu

 

Language File Translation Instructions:

1) Download the latest GCS software: http://code.google.com/p/happykillmore-gcs/downloads/list
2) Open the Ground Control Station and Click Help, About
3) Make note of the "Current Culture" above the OK button.
4) Press the "F9" key on your keyboard
5) In the program that opens, Click the "Browse Button" and select Strings.resx in the installation folder (if it's missing, download it here: http://www.happykillmore.com/Software/HK_GCS/strings.zip unzip and save it in C:\Program Files\HappyKillmore\GCS)
6) Translate the "Value" column only. Do not change anything in the other columns.
7) When finished, click Save.

8) Send me an email (happy@happykillmore.com) including your "Current Culture:" value from step #3, what you'd like to call your language (ie: Español instead of Spanish....I'm going to add an option to override the OS selection) and attach the strings.resx file. I will compile your resx file and send it back to you for review. Place the file I send back in your C:\Program Files\HappyKillmore\GCS\Language folder.


- or with GCS v1.1.8 or newer -

 

8) Open C:\Program Files\HappyKillmore\GCS\Language and rename the edited strings.resx file to strings.XX-XX.resx where XX-XX is your Current Culture from Step #3 (ie strings.pl-PL.resx).

9) Right click on this file and select Open With -> ResXtoResource.exe

10) If this is a new file, then double click the Languages.txt file and add a reference to your new file including XX-XX;{Language Name} (ie pl-PL;Polski)

11) Start the GCS and select File, Settings and select your new language.

12) Send me an email (happy@happykillmore.com) including what you'd like to call your language (ie: Español instead of Spanish and attach your strings.XX-XX.resources and strings.XX-XX.resx files

 

A few notes about translating

**** Save early and save often! Some users have reported problems saving their file once they're already done translating!!! Try translating a couple and then SAVE! It might save LOTS of wasted effort if you get to the end and then cannot save!!!
1) Anywhere there is a carrat (^) that's a carriage return + new line. Please include this in your string.
2) Anywhere you wee &1 or &2 these are replacement variables which means a number or some other text will be inserted in the string. Please make sure to include these as well.
3) The available space for text is very small, please be as brief as possible.
4) Please keep track of how long it takes (I'm curious) and please let me know if there's anything confusing in there. I can add more comments to the English language file to make things earier.

5) Watch out for abbreviations. There are some VERY short (only 1 letter) translations for things like Right and Left = R and L. Also, things like MPH (Miles per hour) need to be very short. So abbreviate where you can.

For those who downloaded 1.1.0...I forgot to include the program that pops up with the "F9" button. 1.1.1 has it...sorry about that.

Thank you for your time and effort!!!!!


PS, I found the trees in Google Earth! California is hogging all of them!
trees.gif

 

 

urdu.gif?width=721

See how the numbers 1,2,3,4,5,etc stick out like a sore thumb?

Read more…

Perhaps I was missing something in VB6. Life seemed so much easier when using the serial port control. Granted, MSCOMM has some serious limitations (see max limit of COM16). But back then, sending a character from ASCII 1 to 255 was a non-issue. If you sent a &HA0 out the serial port, you got &HA0 out the other end. More specifically, if your hardware was streaming binary data in to your serial port, it was simple enough to decode. In .NET that changed.

In my GCS project, my intention is to be able to handle many different types of data input, both ASCII and binary..so I had to make a decision on how to handle the data stream. Should I import it as a byte array (encoding is not an issue if you receive data this way) or as a string so I can use SubString (or Mid, Left and Right) functions on the data. Since there's no easy way to do an InStr function (searches the string for an occurance of another string) on a byte array, I opted for the string.

When dealing with human readable data, there's no problem. Even without specifying anything for the .Encoding property of the SerialPort anything that is ASCII 127 or lower will pass through the port, no problem. As soon as you start streaming binary data that goes all the way up to 255, funky things start happening. So what's the deal? Well, in .NET the data coming out of the serial port is automatically encoded (or really decoded). That's because it's sending Unicode data. This means that some characters are not a single byte but instead are represented by 2 bytes.

But I don't need any of that. I just needed one byte per character. Nothing fancy. 1 to 255 is just fine.... but there's no option to turn this "feature" off. The SerialPort1.Encoding property can be set to all sorts of settings. Generally, I knew I needed 8 bits, so UTF7 was not an option. So I tried System.Text.Encoding.UTF8, System.Text.Encoding.GetEncoding(28591), System.Text.Encoding.GetEncoding(65001) System.Text.Encoding.GetEncoding(1251), System.Text.Encoding.GetEncoding(1252). The best results came from GetEncoding(28591) initially. I thought everything was working great... but then throw in Regional settings and everything gets whacky again.

In XP, click Start, Control Panel, Regional and Language Options and change your Standards Format from English (United States) to Polish and you'll see what I mean. It's the craziest thing. I created a sample project using a com0com feedback port to pump ASCII 1 to 255 out one port in VB6 and I received it in to my GCS on the paired port. 246 of the 255 characters came through just fine. 9 of them were goofy (either a 3F...which is the "unknown" replacement by the serial port or something comepletely odd like &H54 where &H98 should have been).

So the Google search began. How if the world do I fix this or turn it off or something? The first solution was to try and use Chr on some ASCII values and ChrW on others...but that didn't fix all of the bad characters either. The data was coming in with the right hex value, but the change from Byte to ASCII was the problem. In the end, the solution was not to look at every byte. I get rid of the Serial Port's DataReceived event and instead am firing a timer every 75 ms looking for .BytesToRead > 0 and using a built-in encoding function to get the right string from the serial port.

nReadCount = serialPortIn.BytesToRead 'Number of Bytes to read
Dim cData(nReadCount - 1) As Byte

serialPortIn.Encoding = System.Text.Encoding.UTF8

nReadResult = serialPortIn.Read(cData, 0, nReadCount) 'Reading the Data

sNewString = System.Text.Encoding.Default.GetString(cData)
sBuffer = sBuffer & sNewString

Originally, I had been allowing the DataReceived event to fire after 1 character arrived in the ReadBuffer and then evaluating the new character(s) one at a time to build my strings. Without the GetString function, I was unable to get the correct string data from the serial port.

Read more…
My most recent challenge has been adding the MAVlink protocol to my GCS project. So far, it has been my experience that one of the most difficult parts of pulling protocol messages apart is cracking the Checksum formula. A quick Google search will return hundreds of examples in C or assembler...but try finding one in Visual Basic. They mostly don't exist. uBlox and MediaTek have one method, SiRF has another, NMEA has it's own....

Then there's MAVlink. Their Comm Protocol page http://pixhawk.ethz.ch/wiki/mavlink/#mavlink_packet_documentation shows a link to a SAE AS5669A document found here: http://www.sae.org/servlets/productDetail?PROD_TYP=STD&PROD_CD=AS5669A in which they want $63 to purchase a standards PDF which still won't tell me what I need to know to decode their checksum. Apparently, they're using a crc16 checksum which includes bit shifting. A task not easily handled by .NET. So I've downloaded an converted 4 different checksum functions (1 in C, 2 in C# and 1 in VB6) to VB.NET. None of which will successfully generate the checksums I'm getting from the latest MAVlink APM output.

So I refer back to the MAVlink Comm Protocol document. Perhaps I'm looking at the wrong data. In the case of NMEA, they don't include $ or * in the checksum calculation. In uBlox, they don't include the leading uB in the checksum... but what do you know. They make no mention in the specification as to what they don't include. Is it everything? Do they leave off the "U"... no way to tell so I guess we assume everything is included. But so far, no luck in cracking this nut.... I've got about 8 hours in it so far.

So some might say, skip the Checksum for now. Just read the "U" as the header and the next byte is the payload length...and go from there. Well this is an EPIC FAIL of the MAVlink specification. In a purely homogenous environment where ONLY MAVlink messages exist, worst case (assuming no transmission fails) you'll only loose the first message by false positive on the header. Then it gets pitched on the next pass and you're off and running. "U" is recognized, length of message, checksum matches, all is good. Decode, discard, on to the next. Trouble is if you're not in a 100% MAVlink environment or you have to be ready to handle other protocols, then a "U" has a 1 in 255 change of occurring in a non MAVlink sentence. By having a 2 character header (like SiRF, MediaTek and uBlox), there is a 1 in 65,025 chance of having a false positive. By having a 3 character header (like ArduPilot, NMEA and UDB) there's a 1 in 16,581,375 chance of a false positive.

Does anyone have any clue how to correctly calculate a crc16 checksum in VB.NET? There are lots of "lightening fast" crc16 routines out these that make use of external C DLL's or some assembler code. I'm not interested in lightening fast... I just need it to work.
Read more…
aeroquad.gif
Recent additions to my GCS include the APM binary stream and the UavDevBoard (Matrix Pilot/Serial UDB Extra) data stream plus playback of UDB text file on the Data File tab. Quad model is also a new addition (many more models coming soon). Screen is now resizable and depending upon the instruments size, either the glass cockpit or 3D model can be clicked and selected as the "big" instrument. Minimum screen size is now 800X400 which should work well on older laptops and netbooks.

Next on the To-Do list is APM 2-way with MAVlink support, Installer and more models. Still hoping to add AttoPilot support shortly.

If you're having problems installing, make sure to run the DirectX download EVEN IF you have the latest DirectX installed. These include additional drivers MISSING from the standard DX installer.

Minimum requirement still includes .NET 2.0, Google Earth and the Google Earth API.

Download the latest here: http://code.google.com/p/happykillmore-gcs/downloads/list?saved=1&ts=1291154906
Links to minimum requirements here: http://code.google.com/p/happykillmore-gcs/
Read more…

Tiny screen support in HK GCS (down to 800X480)

It seems that some of the other GCS programs out there don't work so well on small display laptops. I went ahead and made mine go as small as 800X480. At that resolution, there are so few pixels to work with

This screenshot is at the minimum 800X480 - additional "Status" tab appears at this resolution which includes all the waypoint, mode, distance, etc data
small800X480_withexpand.gif

This image is closer to 1280X800. You'll see how the instruments have moved around a bit.
Medium1280X800.gif

I can't say for sure that I'll be able to keep 100% functionality of the GCS at this tiny resolution forever... there just isn't enough room on the tabs.

v1.0.3 included this change
http://code.google.com/p/happykillmore-gcs/downloads/list

EDIT: New addition of "Expand" button to make instruments on the left bigger.
Read more…