SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Jun 02, 2012, 02:27 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
Discussion
Reverse Engineering the FeiyuTech Log File (Hornet OSD)

As many know the Hornet OSD can log to an SD card, but it is in a proprietary format that only FeiyuTech GCS software can decode, well not now!

I have managed to reverse engineer most of the information from the Hornet OSD log file, and now I am working on a web based tool to convert to KML as well as view info and statistics from your log file.

To use it just go to http://letsfpv.com/feiyulog and upload your log!

Eventually I also plan to make my own viewer so that you can get the GCS like instrumentation playback, but without the buggy GCS!

NOTICE
The Hornet OSD likes to reset itself in air when an SD Card is inserted, please bug Feiyutech at service@feiyu-tech.com to fix this issue as soon as possible so that hopefully they release a firmware fix for it shortly!

The file format:

#DATA1
#DATA1,?,?,?,?,?,Lat1,Lat2,Lat3,Lat4,Long1,Long2,L ong3,long4,CutHDG1,CutHDG2,?,?,altitude1,altitude2 ,airspeed1,airspeed2,barualt1,barualt2,tgtdist1,tg tdist2,latost1,latost2,?,?
Code:
?        :
?        :
?        :
?        :
?        :
Lat1     : See Coordinates Below 
Lat2     : See Coordinates Below
Lat3     : See Coordinates Below
Lat4     : See Coordinates Below
Long1    : See Coordinates Below
Long2    : See Coordinates Below
Long3    : See Coordinates Below
Long4    : See Coordinates Below
CutHDG1  : x*2.56
CutHDG2  : x*0.01 (added to Cut HDG)
?        :
?        :
Altitude1: x*25.6
Altitude2: x*0.1 (Added to Altitude1)
Airspeed1: x*90 (2 or 3 add 3.6, above 4 90+((x-1)*3.6)
Airspeed2: x*0.36 added to airspeed1
Barualt1 : x*25.6 (If above 6000m subtract 6000 and negative sign the result for below 0 altitude.)
Barualt2 : x*0.1 added to barualt1
TgtDist1 : x*256
TgtDist2 : x*1
LatOST1  : x*25.6 (Up to 127, 128+ = (x-128)*-value)
LatOST2  : x*0.1 (if lastost1 is - then subtract, else add)
?        :
?        :
#DATA2
#DATA2,?,?,Waypoint,TgtHDG1,TgtHDG2,TgtAlt1,TgtAlt 2,TgtGS1,TgtGS2,HomeLat1,HomeLat2,HomeLat3,HomeLat 4,HomeLng1,HomeLng2,HomeLng3,HomeLng4,TgtLat1,TgtL at2,TgtLat3,TgtLat4,TgtLng1,TgtLng2,TgtLng3,TgtLng 4,APVlt1,ApVlt2,BattVlt,Hour,Minute,Second,Month,D ay,?,temp,BattCur1,BattCur2,?,?,refresh,?,Downlink Refresh,?,?
Code:
?              :
?              :
Waypoint       : x*1
TgtHDG1        : x*256
TgtHDG2        : x added to TgtHDG1
TgtAlt1        : x*256
TgtAlt2        : x added to TgtAlt1
TgtGS1         : x*92.16
TgtGS2         : x*0.36 added to TgtGS1
HomeLat1       : See Coordinates Below
HomeLat2       : See Coordinates Below
HomeLat3       : See Coordinates Below
HomeLat4       : See Coordinates Below
HomeLng1       : See Coordinates Below
HomeLng2       : See Coordinates Below
HomeLng3       : See Coordinates Below
HomeLng4       : See Coordinates Below
TgtLat1        : See Coordinates Below
TgtLat2        : See Coordinates Below
TgtLat3        : See Coordinates Below
TgtLat4        : See Coordinates Below
TgtLng1        : See Coordinates Below
TgtLng2        : See Coordinates Below
TgtLng3        : See Coordinates Below
TgtLng4        : See Coordinates Below
APVlt1         : x*25.6
APVlt2         : x*0.1 added to APVlt1
BattVlt        : x*0.1
Hour           : x*1
Minute         : x*1
Second         : x*1
Month          : x*1
Day            : x*1
?              :
Temp           : x*1
BattCur1       : x*25.6
BattCur2       : x*0.1 added to BattCur1
?              :
?              :
Refresh        : x*1
?              :
DownlinkRefresh: x*1
?              :
?              :
#DATA3
#DATA3,?,?,Pitch1,Pitch2,roll1,roll2,AileronGain1, AileronGain2,ElevatorGain1,ElevatorGain2,ThrottleG ain1,ThrottleGain2,RudderGain1,RudderGain2,AltErro r1,AltError2,?,?
Code:
?            :
?            :
Pitch1       : x*25.6
Pitch2       : x*0.1 (added to pitch1)
Roll1        : x*12.3 
Roll2        : x*0.1 (Added to Roll1)
AileronGain1 :
AileronGain2 :
ElevatorGain1:
ElevatorGain2:
ThrottleGain1:
ThrottleGain2:
RudderGain1  :
RudderGain2  :
AltError1    : x*256
AltError2    : x*1
?            :
?            :
Coordinates:
Code:
Coord1: x*4.26666666666667 (up to 128, 128+ (x-128)*-value) 
Coord2: x*0.0166666666666667 (if Coord1 is - then subtract, else add)
Coord3: x*0.000426666666666667 (added to Coord1)
Coord4: x*0.00000166666666666667 (added to Coord1)
NorCalMatCat is offline Find More Posts by NorCalMatCat
Last edited by NorCalMatCat; Jun 07, 2012 at 12:32 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 02, 2012, 04:04 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
Sofar I have identified pretty much all of #DATA1, and #DATA3 lines, I am doing #DATA2 now.

#DATA1 contains the data of the plane, it's altitude, speed, GPS location, etc.
#DATA3 contains sensor info such as roll, pitch, and channel gains
#DATA3 contains info such as waypoint info, home location, etc

I think I will have all of the data itself figured out by today, might even have a simple webpage up by tonight to do basic conversion to KML and give some info .
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 02, 2012, 04:48 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
Ok I have managed to decode pretty much all of it, with exception to # of satellites locked wierdly enough, but I have enough to start programming a tool
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 02, 2012, 05:09 PM
Praying for better weather
Coyote64's Avatar
Joined Dec 2007
4,146 Posts
Sounds good, subscribed
Coyote64 is offline Find More Posts by Coyote64
Reply With Quote
Old Jun 02, 2012, 05:24 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
I've updated the OP with the actual format of the log file.
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 02, 2012, 08:55 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
An update, I have the parser page up and running, though it's not ready for public use yet, I have found out too that sometimes the OSD screws up in the log generation, so I need to put in some handling for that, but it's coming along good .
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 02, 2012, 10:47 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
Ok! A first edition is ready! Please try it out with your FY log files and let me know how accurate it is... I think coordinates are spot on, but I am not sure about altitude. It will generate a basic KML file with just coordinates, though I will improve upon this and add as many features as I can.

I need feedback!!! If you find anything odd please let me know.

Go to http://letsfpv.com/feiyulog and just upload your log!
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 03, 2012, 12:30 AM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
I added the name and description fields to the KML file, so that when you view it in Google Earth the max statistics will show up under the tooltip window.
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 03, 2012, 01:00 AM
Opt
Registered User
New Zealand, Auckland
Joined Oct 2010
396 Posts
Good work, look forward to trying it out
Opt is offline Find More Posts by Opt
Reply With Quote
Old Jun 03, 2012, 04:03 AM
Registered User
Joined Aug 2010
33 Posts
Quote:
Originally Posted by NorCalMatCat View Post
First edition is available for testing, at the moment it produces a very generic KML with coordinates and altitude, more to come!

You can access the KML converter at: http://letsfpv.com/feiyulog


Thank you NorCalMatCat!! Excellent work! You deserve a medal

I tested it, and was able to see one of my flights in GE. Brilliant! There seems to be a small glitch somewhere, but the flight itself was depicted nicely. The thing is that I have a lot of very spaced points in the middle of nowhere. I'll attach a picture, no bid deal though, as I can see my flight nicely! (If you have the file on your server, it is called "05301759 kopi", and my actual flight is on the far right in the pitucre.)

I don't know how I can contibute to this due to my computer skills being way below yours, however if you'd like you may choose an area of interest for my next FPV flight I live in Bodoe Norway, N67.27 E14.40, lets say a takeoff point within 10miles? Just let me know if you find some interesting scenery or something else.
carlalex is offline Find More Posts by carlalex
Reply With Quote
Old Jun 03, 2012, 01:57 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
Quote:
Originally Posted by carlalex View Post


Thank you NorCalMatCat!! Excellent work! You deserve a medal

I tested it, and was able to see one of my flights in GE. Brilliant! There seems to be a small glitch somewhere, but the flight itself was depicted nicely. The thing is that I have a lot of very spaced points in the middle of nowhere. I'll attach a picture, no bid deal though, as I can see my flight nicely! (If you have the file on your server, it is called "05301759 kopi", and my actual flight is on the far right in the pitucre.)

I don't know how I can contibute to this due to my computer skills being way below yours, however if you'd like you may choose an area of interest for my next FPV flight I live in Bodoe Norway, N67.27 E14.40, lets say a takeoff point within 10miles? Just let me know if you find some interesting scenery or something else.
Yeah, the Hornet produces dirty data sets from what I am starting to see, at the moment I am saving the KML files so I can look through them and figure out how to process it more cleanly and get rid of erroneous entries.
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 03, 2012, 04:00 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
I think I just deciphered 8 of the unknown variables in #Data2, I believe they are lang and lot for home point! this is good because a lot of the eronious entries are from before it gets sat lock, so if I know when it sets home point I can truncuate any entries before it (a lot of them default to around 0,0, which is just off of Africa :P)

I still need to figure out which variable gives # of sats too.
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Old Jun 03, 2012, 04:12 PM
Registered User
Joined Aug 2010
33 Posts
Quote:
Originally Posted by NorCalMatCat View Post
I think I just deciphered 8 of the unknown variables in #Data2, I believe they are lang and lot for home point! this is good because a lot of the eronious entries are from before it gets sat lock, so if I know when it sets home point I can truncuate any entries before it (a lot of them default to around 0,0, which is just off of Africa :P)

I still need to figure out which variable gives # of sats too.
Maybe if you power it up outside, and power down right after you see the double flashes on the fy31 (home set), something should have changed in the data fields compared to no gps lock.
carlalex is offline Find More Posts by carlalex
Reply With Quote
Old Jun 03, 2012, 04:50 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
I just made a change that produces what seams to be working perfectly now, basically it looks for impossible changes like 200km+ distance change from one point to another (unless you plane is going about 200km per 100milisecs :P)
NorCalMatCat is offline Find More Posts by NorCalMatCat
Last edited by NorCalMatCat; Jun 03, 2012 at 05:27 PM.
Reply With Quote
Old Jun 03, 2012, 05:29 PM
Better then Sliced Bread!
NorCalMatCat's Avatar
United States, CA, Arcata
Joined Oct 2011
2,650 Posts
Ok from the test logs I have been using I think I have it running pretty perfect, I also discovered that the unit only will measure a max of 6000 meters in barametric altitude, anything above that signifies negative altitude (below 0) so the generator now correctly adjusts for that.
NorCalMatCat is offline Find More Posts by NorCalMatCat
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion RVOSDv5 or FY31AP with Hornet OSD? miksterr FPV Talk 39 Nov 27, 2013 01:23 AM
Discussion Data Log files 72megahz Castle Creations 2 May 03, 2012 12:21 AM
Wanted Wanted: Feiyutech AP117 OSD ptuxbury FPV Equipment (FS/W) 2 Dec 04, 2011 09:41 PM
Video FPV OV-10 Bronco Build Log Files citation560v Electric Plane Talk 4 Oct 22, 2011 12:18 AM