Welcome to PhantomPilots.com

Sign up for a weekly email of the latest drone news & information

Flight Log Viewer Application, version 1.0.5 - Alpha Release

Discussion in 'Pro/Adv Discussion' started by phuocsandiego, Mar 2, 2016.

  1. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    Hi fellow Pilots,

    As promised, here's the first public release of my Flight Log program (please be gentle with the constructive criticisms!). ;)

    Features:
    - Import your Litchi flight logs
    - View Google Map of flights
    - View flight detail information
    - View battery summary information (# of charges, current battery life, production date, etc.)
    - Battery voltage information for the entire flight (over the entire battery and per cell)
    - Browse flight log data

    I still have to do a lot of things to make this into the program I really want but what I have works. Some features I'm looking into:
    - Summary information of all flights (this one is probably coming sooner rather than later)
    - Sensor information
    - DJI Go app log imports

    Download link (Windows only at this time): https://dl.dropboxusercontent.com/u/19557928/Flight_Log_1.0.5.rar

    To use: Simply unzip/unrar and run Flight_Log.exe - there is no need to install. Click on the + icon to import your first log and get a feel for how it works.

    I'd love any feedback you can give me. Enjoy!
     
    #1 phuocsandiego, Mar 2, 2016
    Last edited: Mar 4, 2016
    Digdat0, David Cooke and hms like this.
  2. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    I'm seeing folks looking at the thread. Has anyone downloaded and used it yet? I'd love to see what you think!
     
  3. Luap

    Joined:
    Jan 4, 2014
    Messages:
    430
    Likes Received:
    70
    I tried. I click the + select a txt log file nothing loads then tried a litchiv2.csv but nothing loads either?
    What am I doing wrong?


    upload_2016-3-4_20-18-8.png
     
  4. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    It definitely does not read the .TXT log files right now. I'm working on getting that part working as we speak. But it should work with the Litchi files. Would you mind sending me that Litchi file so I can try on my end and see what's going on? Thanks!
     
  5. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
  6. Flack

    Joined:
    Oct 27, 2015
    Messages:
    98
    Likes Received:
    11
    Location:
    UK, North West
    Just tried it with P3p log file and it does not do anything bud..

    Flack
     
  7. Flack

    Joined:
    Oct 27, 2015
    Messages:
    98
    Likes Received:
    11
    Location:
    UK, North West
    Just tried your new link and it does the same ..I have tried .dat, csv and txt files.

    Flack
     
  8. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
  9. Flack

    Joined:
    Oct 27, 2015
    Messages:
    98
    Likes Received:
    11
    Location:
    UK, North West
    Ok I have not got any litchi logs yet so thats why its not working my end lol...send me a log file if you have one to try

    Flack
     
  10. Luap

    Joined:
    Jan 4, 2014
    Messages:
    430
    Likes Received:
    70
    So tried again the new version - this time it works.
    But only got 2 log files to load. More and it crashes. I hardly use Litchi though - will be great once you have a txt version!
    upload_2016-3-4_21-11-41.png
     
  11. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    That's interesting... I have over 30 logs loaded into mine without an issue. Feel free to message me with the log that's giving you trouble or try it again and let me know how it goes.

    I'm just beginning to crack the DJI Go app so stay tuned!
     
    #11 phuocsandiego, Mar 4, 2016
    Last edited: Mar 4, 2016
    Brad Pierce likes this.
  12. Flack

    Joined:
    Oct 27, 2015
    Messages:
    98
    Likes Received:
    11
    Location:
    UK, North West
    Good work bud..

    Flack
     
  13. flyNfrank

    Joined:
    Feb 1, 2014
    Messages:
    4,237
    Likes Received:
    915
    Location:
    Indy, USA
    Absolutely no doubt needs to convert dji .txt files to .csv.

    And you do not need to crack the GO app to do that. There is at least 155 categories or more in the .txt file to convert.
     
  14. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    :) I don't mean crack the Go app at all. I mean I have to crack whatever scheme they're using to store their data in their .txt files. As far as I know it's not documented anywhere. I know some folks have got it all figured out but they're not sharing... at least not clearly. I just want to make something useful for forum members to use without charge.

    So far I've figured out latitude, longitude, altitude and some others but there's a lot more obviously to work through. That's what I mean by cracking the Go app's .txt files. I know a lot of folks have done some work on this but not a lot of people have actually written down what you need to do to go through it yourself. I'm working through the log parser that someone wrote in Javascript here to gain some insight but I'm not that proficient in Javascript so that's slow going for me.

    If you have any tips I would surely appreciate it! Here's what I've worked out so far:

    Code:
    #!/usr/bin/env python
    import argparse
    import sys, math
    from struct import unpack
    
    def main():
        parser = argparse.ArgumentParser(prog='dji_log_parser', usage='%(prog)s filename')
        parser.add_argument('log_filename')
        args = parser.parse_args()
        try:
            file_handle = open(args.log_filename, 'rb')
        except:
            sys.stderr.write("Error opening %s\n" % args.log_filename)
            sys.exit(1)
        read_buffer = file_handle.read(12)
        while (1):
            read_buffer = file_handle.read(2)
            t, length = unpack('BB', read_buffer)
            data_block = file_handle.read(length+1)
            data_block_bytes = bytes([data_block[length]])
            e = unpack('B', data_block_bytes)[0]
            if (e != 0xff):
                break
            if t == 0x01:
                 longitudex, latitudex, heightx, vX, vY, vZ, pitch, roll, yaw = unpack('<ddhhhhhhh', data_block[0:30])
                 print(unpack('<ddhhhhhhhhhhhhhhhhh', data_block[0:50]))
                 longitude = longitudex * 180.0 / math.pi
                 latitude = latitudex * 180.0 / math.pi
                 height = heightx * 0.1
                 #vX
                 #print("OSD", latitude, longitude, height, vX)
    if __name__=='__main__':
        main()
     
  15. flyNfrank

    Joined:
    Feb 1, 2014
    Messages:
    4,237
    Likes Received:
    915
    Location:
    Indy, USA
    Others don't share because they have put a great deal of time into something to just share and give it away. Another big reason why they don't share is because when they set out to begin on their projects, they found the same ole "no share responsiveness" from others as well.

    The current situation is one person had the majority of the txt file cracked and converting to the csv format. No others created anything like this because they didn't need to as the person had no fee's associated. However, that person as you may know has since began charging to use his converter, which in my opinion was a mistake and not thought out very well. Nothing wrong with being compensated for your hard work and effort if you feel you need to be. But don't shock your users without notice. There is better options then charging your user's.
     
  16. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    Frank, I understand the motivation for sure and I get it. I on the other hand, am more than willing to share what I've done. Aside from just sharing what I've done so far, I'm getting ready to put my code out there just for anyone that wants to try and do it on their own or improve on what I've done. With some luck, I'll be able to get that last piece of loading the DJI .txt logs into this application and it'll be much more useful to the entire community at large and not just Litchi users.
     
  17. flyNfrank

    Joined:
    Feb 1, 2014
    Messages:
    4,237
    Likes Received:
    915
    Location:
    Indy, USA
    I haven't downloaded anything here yet. What is the file type difference between the litchi and .txt flight log?
     
  18. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    Hi Frank,

    The difference is that the Litchi app stores its flight logs in plain text .CSV files that makes it trivial to read and figure out what's going on. The DJI Go app stores the data in its own proprietary binary format. It's not encoded but as far as I know it's not documented in a way that makes it easy to work with. I've been able to piece bits and pieces together but it'll take some work to get there. More people use the stock DJI app so I want to make sure my app can load those log files to make it as useful as possible to folks.

    Phuoc
     
  19. hms

    hms

    Joined:
    May 3, 2016
    Messages:
    13
    Likes Received:
    0
    Dropbox link is dead, can some1 attach copy here?
     
  20. phuocsandiego

    Joined:
    May 3, 2015
    Messages:
    151
    Likes Received:
    65
    Location:
    San Diego, CA
    Sorry... that was my fault. I accidentally deleted it. Try it again and let me know if it works.

    BTW, this isn't dead. I just have been extremely busy with work. It's what happens when you fly every week. I've not flown my Phantom for weeks. I've also not written a single line of code in almost 60 days! Sad, I know but that's what happens when inconvenient stuff like work gets in the way of life!
     
    AJLebeau, Jtrjr and hms like this.