HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 19, 2012, 06:43 PM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Decoded more of the protocol.


My workspace is now
metapad, transparent text editor
010 editor, powerful hex editor

What I don't have yet and want is the flight altitude.

I have started coding a log converter.
It will extract the hj into a csv file for plotting/analysis.
You could also put the gps data into a kml file and do real fun stuff like
http://forum.autoquad.org/viewtopic....=1846&start=10


This will also allow me to set alerts on the live data to warn of potential crash conditions.
Mr_westie is offline Find More Posts by Mr_westie
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 20, 2012, 12:22 AM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Found the alt.
It is stored as a Signed Short in cm.
While the GCS displays in M
eg 24m is 240 in the hj file.
That does mean the loggable/displayed height range is -3276 to 3276 meters
Mr_westie is offline Find More Posts by Mr_westie
Reply With Quote
Old Dec 20, 2012, 12:52 AM
DVE
Registered User
Russian Federation, Sankt-Petersburg, SPB
Joined Jul 2011
578 Posts
Good work Btw, it would be nice to decode data in real time and convert it to mavlink frames

It will allow to use other groundstations to see quad in the flight, or connect external OSD (minimOSD is 19$ for example).
DVE is offline Find More Posts by DVE
Reply With Quote
Old Dec 20, 2012, 03:03 PM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Nearly there
Good old Excel



You can easily see points of interest.
The GPS velocity about half way.
Scaled the vibration and shake values so they are not lost at zero.

Just got to clean up the interface a little.
Comment the code and post.
Fields extracted
Record, Sats, Lat, Lon, Alt, Heading, DTB, G_VelX, G_VelY, X_VelX, X_VelY, X_VelD, Vib, Vib_x10, Shake, Shake_x10, M_Rud, M_Ail, M_Ele, M_Thr, R_Rud, R_Ail, R_Ele, R_Thr, AI_UD, AI_RL, BatV, Amps, mAh, F_Mode

It would be nice to find a similar plotting solution as used by AutoQuad.
Select what to display, zoom in , Pan
http://autoquad.org/wiki/wiki/autoqu...the-log-files/

edit: Found one
http://www.live-graph.org/download.html

And it can do it live so you can see your flight as it happens.


Converting to Mavlink should be doable.
We can even send it down the same link as there is spare bandwidth at 115k.
The YS only uses 50% of the bandwidth.
Might need a demultiplexor on the base end to seperate the packets.
Mr_westie is offline Find More Posts by Mr_westie
Last edited by Mr_westie; Dec 20, 2012 at 03:16 PM.
Reply With Quote
Old Dec 20, 2012, 11:40 PM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Converter ready for open testing.
Compiled exe
https://www.box.com/s/5f8um42j9a0tz10jhvc8

VB6 source
https://www.box.com/s/zq8gpdl9z2rgrja99nic

Latest version in first post

Notes:
The Lat/Lon conversion is only single precision, 7 significant figures.
Positional error is +-5m
Need to find out how to do a double precision conversion.

Heading conversion is not 100% correct.
It is a Logarithmic relationship. WTH
Values from a slow rotation



What has been decoded but not included in the conversion.
-Motor RPMs
-Total waypoints
-AP Version

What needs to be decoded, nothing important
-Next waypoint
-Serial number
-Other unknown values


To do:
Decode live data from serial port
Log
Monitor values for crash conditions
Play sound clips on alert
Mr_westie is offline Find More Posts by Mr_westie
Last edited by Mr_westie; Dec 30, 2012 at 12:32 AM.
Reply With Quote
Old Dec 21, 2012, 03:41 AM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Applying a inverse log to the heading straightened it out a bit.


Download link updated.
Mr_westie is offline Find More Posts by Mr_westie
Reply With Quote
Old Dec 22, 2012, 08:22 AM
jab
Unregistered User
Joined Aug 2007
1,091 Posts
Thanks for the great work!
jab is offline Find More Posts by jab
Reply With Quote
Old Dec 22, 2012, 09:58 AM
Registered User
South Africa, GP, Johannesburg
Joined Sep 2010
2,495 Posts
Thanks for that. Good bit of software. I am going to use this from now on for all my analysis.

I have just analysed my last flight using it and what I thought was a good flight, I saw a few times where my xekf Veld was above 20, in fact sometimes above 100. Only at one time did I see it give a bit of a shudder and then correct. Now it need to see where my interference came from.

Its also good to see how much vibration and shake one has. Mine was all okay, so thats good

Much easier to see than running through the flight playback.

By the way, what is the time frame. How many records in a second. Is it possible to work it out. Because the worst period was about 17 records.

Cheers
Rob
robone is offline Find More Posts by robone
Reply With Quote
Old Dec 22, 2012, 01:23 PM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Cool, good to know other find it useful too.

YS logs at 5hz, 200ms per record.
But it can drop packets
I think there is a packet counter in there so we can detect dropped packets.
Will see if I can change the record counter to take into account of these dropped packets so you can just divide buy 5 to get the time.
Unfortunately you can not tell which packet out of the 5 it dropped.
Being accurate to the second should be enough for most problems.
Mr_westie is offline Find More Posts by Mr_westie
Reply With Quote
Old Dec 22, 2012, 02:11 PM
Registered User
South Africa, GP, Johannesburg
Joined Sep 2010
2,495 Posts
So 17/5 = 3 secs. That is about the time frame of the shudder. Interesting. I am still trying to establish why or how it could have happened, as I take extreme care with wiring and location of components.

But, nonetheless, very useful and I will be using this to do all my analysis from now on. Thanks.
robone is offline Find More Posts by robone
Reply With Quote
Old Dec 23, 2012, 05:45 AM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
That is correct.

Have been working on live options.
I can monitor the hj file but it seems that the GCS only updates that every 5 seconds.
5s is ok for logging but too slow to react to emergencies.

Other option is to use a compatible IP > serial bridge.
Then split the serial port between the GCS and my monitoring program.
Having a bit of trouble finding a compatible program.

3rd option is to use a datalink that ends in a serial port on the PC.
Bluetooth, 3dr, xBee etc
And split that.
Mr_westie is offline Find More Posts by Mr_westie
Reply With Quote
Old Dec 23, 2012, 11:30 AM
Registered User
South Africa, GP, Johannesburg
Joined Sep 2010
2,495 Posts
I moved a few wires around today and had some very good tests. Not that I keep the tablet next to me while flying, so I could never see when the xekf Veld was above 20, but on analysis I saw that it was high a number of times. And these times were always when I was descending and coming in to land.

Maybe I drop to quickly and that pushes the xekf Veld up above the 20. Mind you, I was throwing it around a bit while it was in GPS mode.

Tomorrow I will only fly in Manual mode when taking off and landing and see what happens. Good software. Have I told you that before Much easier to see whats happening than when using the GCS to playback the flight.

Edit: Just had feedback from Support (Peter) that it is only a concern if it is above 20 when on the ground. If it is above 20 when flying, it is not a problem.
robone is offline Find More Posts by robone
Last edited by robone; Dec 24, 2012 at 01:05 AM.
Reply With Quote
Old Dec 25, 2012, 05:15 PM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Quote:
Originally Posted by robone View Post
Edit: Just had feedback from Support (Peter) that it is only a concern if it is above 20 when on the ground. If it is above 20 when flying, it is not a problem.
Per the manual
I know sometimes we forget to look back.


Got the live serial logger going.
Serial packets are padded out to 109 byes.
Unfortunately we get a corrupt packet about every 20s.
Without knowing the checksum they use there is no way to easily discard them.
So we are stuck with reading the hj file with 5 second delay.

Even with the ECC turned on the 3DR radios.
I wonder if it is being sent out from the FC.
Will do a dump from there and see.


edit: Yup, bad data is coming straight out of the FC.
I wonder if this is intentional?
Would be great if the dealers could ask YS to make protocol public.
Be a big positive feature over DJI's Encrypted data.
Mr_westie is offline Find More Posts by Mr_westie
Last edited by Mr_westie; Dec 25, 2012 at 05:59 PM.
Reply With Quote
Old Dec 26, 2012, 05:30 PM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
More data analysis reveals... poor programming/bug.
There are bad packets even in the hj file.
You may have noticed certain parameters blank out during playback?
That is why.
Not due to transmission corruption as data was downloaded directly from the FC via cable.
It is due to data not being rationalized/checked before packet construction.
Must be a known fault as the GCS has taken it into account by blanking out the display of that value.

Not a problem in normal use.
When trying to monitor the system for abnormal conditions we now have to also account for corrupt data.


Workflow





Video overview (HD)
YS Live plotting (1 min 25 sec)



Known bugs:
-Permission error
Sometimes it fails to write to the output file and exits with this error.
Working on it.
-Fixed


To do:
-Hardcode some warning.
Will use this site to generate voice clips
http://www.neospeech.com/
Mr_westie is offline Find More Posts by Mr_westie
Last edited by Mr_westie; Dec 27, 2012 at 04:51 AM.
Reply With Quote
Old Dec 27, 2012, 04:50 AM
YS-X6 Know why it crashes,blog
New Zealand, Auckland
Joined Nov 2007
583 Posts
Error sorted.
Exe and source

https://www.box.com/s/5k17ou9inx9plu4kcdpi

Latest version in first post

Now working on some warnings.
Mr_westie is offline Find More Posts by Mr_westie
Last edited by Mr_westie; Dec 30, 2012 at 12:31 AM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Zero UAV YS-X6 Owners Thread and Discussion fajar Multirotor Electronics 2410 Oct 27, 2014 04:44 PM
Discussion YS-X6 testing GotHeliRC Multirotor Talk 1200 Aug 08, 2013 10:23 AM
Poll ys-x6 or wkm? ditalles Multirotor Talk 75 Jul 16, 2012 01:05 PM
Discussion Groupbuy for YS-X6 system fajar Australia 14 May 15, 2012 05:35 AM
New Product YS-X6:A coming new king in the multi rotor heli world yiny0730 Multirotor Talk 13 Mar 29, 2012 12:28 AM