lukeswitz / AtomGPS_wigler

Uses an ATOM M5 GPS Kit for Wigle wardriving
26 stars 6 forks source link

Add filePrefix to config for file naming #27

Open pejacoby opened 4 months ago

pejacoby commented 4 months ago

Added a new config.txt variable 'filePrefix' to simplify keeping the various files collected straight when one has too many AtomGPS units to wrangle.

lukeswitz commented 4 months ago

It would be useful to have it appended to the file name dynamically.

pejacoby commented 4 months ago

That was my idea with the change in line 227, where the filename is created from the various pieces of data. I swapped out the static 'AtomWigler' for the filePrefix variable. Is there a safer approach?

lukeswitz commented 4 months ago

Thanks for your suggestion to modify the file name using the SD card configuration.

The current code can dynamically generate meaningful file names using the existing config data, ensuring consistency and predictability. For added safety, input sanitization is a good idea.

Could you clarify if there's a specific reason for wanting a different file naming convention? It might help us understand your needs better.

pejacoby commented 4 months ago

I understand the point on being careful not to let user input break a very important item like filename.

In my case I've got 6 AtomGPS units, so when I pull files off the SD cards I end up with 5 or 6 "AtomWigler-2024-07-13-0.csv" files.
I like to keep track of which unit is which, so I rename the files to indicate who is who -- "2-5-AtomWigler-2024-07-13-0.csv", "1-6-AtomWigler-2024-07-13-0.csv", etc. The naming matches my hand labeling of Atom unit and GPS unit, as I occasionally swap CPUs and GPS to try to figure out performance differences.

How about the Board serial number? That would be stable per CPU. Not sure if it is the 'chip_id' that JHewitt uses here? https://github.com/JosephHewitt/wardriver_rev3/blob/b55e9b5827ae81c13f67383a97abdca0f03de630/A/A.ino#L2233

lukeswitz commented 4 months ago

Good point. Differentiated units should be simple enough to add to the naming schema. Thanks for the efforts