DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Any programmers fancy having a go at the following?

  • Thread starter Deleted member 103366
  • Start date
D

Deleted member 103366

Guest
Whilst going through txt flight logs etc with CsvView an idea has come to mind.
The front page of the processed results contains a small table of useful data which includes, the drone's name, its serial number, the relevant DAT file number, sometimes the controller's serial number, some sort of battery serial number, the number of charge cycles, the battery's production date etc. etc.
I was wondering of someone could write a piece of software that would get CsvView to run on ALL the txt files in a folder and for each txt file output this small table of data to a csv.
In my layman's vocabulary I am picturing each txt file creating a new line in that csv with all data types present in each line even if the entry is empty.
 
Last edited by a moderator:
  • Like
Reactions: RadioFlyerMan
Whilst going through txt flight logs etc with CsvView an idea has come to mind.
The front page of the processed results contains a small table of useful data which includes, the drone's name, its serial number, the relevant DAT file number, sometimes the controller's serial number, some sort of battery serial number, the number of charge cycles, the battery's production date etc. etc.
I was wondering of someone could write a piece of software that would get CsvView to run on ALL the txt files in a folder and for each txt file output this small table of data to a csv.
In my layman's vocabulary I am picturing each txt file creating a new line in that csv with all data types present in each line even if the entry is empty.
A better strategy is run TXTlogToCSVtool directly. That's what CsvView does. CsvView just knows where the data is in the .csv created by TXTlogToCSVtool and makes the table you see in the CsvView user inteface
 
The start of the solution is all in
[TOOL][WIN] Offline TXT FlightRecord to CSV Converter in "Notice 3" in post #1 i.e.

"Tool can be also run from command line like this, example:
TXTlogToCSVtool "C:\temp\inputFile.txt" "C:\temp\outputFile.csv" "

After copying some sample .txt flightlogs and the relevant TXTlogToCSVtool to a folder and then opening a command line window in there and running

FORFILES /m *.txt /C "TXTlogToCSVtoolMM /c @file @fname.csv"

on the command line I have automated processing of every flight log in that folder and the production of their csv's, now to figure out the rest.
 
I found the a window's version of the Unix/Linux command "grep" and ...................

grep -a -m 1 -r "Android" ' your-path-to-folder'/*.csv > ' your-path-to-folder/folder-name.csv

run in a command window works a treat.
"grep -a -m 1 -r" scans the csv files in the folder ' your-path-to-folder' and outputs the first line found to contain "Android" to the csv file "folder name", it then moves on to the next csv file.

Try playing around with the search target (Android in the above) until you get the output you want, e.g. you could have it look for a specific battery serial number etc.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,086
Messages
1,559,692
Members
160,068
Latest member
Bahamaboy242