Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Garmin Xero C1 Pro chrono
#67
and im now setting up the rigging to get this working. This is the cleanup of the CSV part that im working on since FIT to CSV is already provided. This is written in windows powershell by me, just now with some ripping off of the select-file function and time conversion. It will read the garmin converted CSV and output it into normal looking stuff on the screen in the command window. I'll have it output to a file, im just getting through proof of concept now.

My intended workflow is this... Plug garmin directly into PC. Take the .FIT files and drag + drop them onto a shortcut, out comes nicely formatted text file with all the information i need. this isnt quite there yet... but its pretty dang close.

*edit*

made it output to file (that you name) and you can batch select multiple files at once. Now onto getting the fit to csv workflow going to have this a 1 step operation.

Code:
cls Add-Type -AssemblyName System.Windows.Forms function Select-File { [CmdletBinding()] param( [Parameter(ParameterSetName="Single")] [Parameter(ParameterSetName="Multi")] [Parameter(ParameterSetName="Save")] [string]$StartingFolder = [environment]::getfolderpath("mydocuments"), [Parameter(ParameterSetName="Single")] [Parameter(ParameterSetName="Multi")] [Parameter(ParameterSetName="Save")] [string]$NameFilter = "All Files (*.*)|*.*", [Parameter(ParameterSetName="Single")] [Parameter(ParameterSetName="Multi")] [Parameter(ParameterSetName="Save")] [switch]$AllowAnyExtension, [Parameter(Mandatory=$true,ParameterSetName="Save")] [switch]$Save, [Parameter(Mandatory=$true,ParameterSetName="Multi")] [Alias("Multi")] [switch]$AllowMulti ) if ($Save) { $Dialog = New-Object -TypeName System.Windows.Forms.SaveFileDialog } else { $Dialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog if ($AllowMulti) { $Dialog.Multiselect = $true } } if ($AllowAnyExtension) { $NameFilter = $NameFilter + "|All Files (*.*)|*.*" } $Dialog.Filter = $NameFilter $Dialog.InitialDirectory = $StartingFolder [void]($Dialog.ShowDialog()) $Dialog.FileNames } $fit = (Select-File -StartingFolder "C:\" -NameFilter "Garmin FIT Files (*.fit)|*.fit" -AllowMulti) copy $fit .\fit_Temp $fit_temp = get-childitem -Path .\fit_temp | select-object fullname foreach ($fitfile in $fit_temp) { $fit3 = $fitfile.fullname $fit2 = "`"$fit3`"" start-process -filepath '.\java\fittocsv.bat' -argumentlist $fit2 -wait } move-item -path .\fit_temp\*.csv -destination .\results\ $csv1 = import-csv (get-childitem -Path .\Results\*.csv) $customarray = @() foreach ($csv in $csv1) { $time = (([System.DateTimeOffset]::FromUnixTimeSeconds($time_hack)).DateTime.ToLocalTime()).ToString("s") $type = $csv.type $localnumber = $csv."local number" if ($type -eq "Data" -and $localnumber -eq "3") { $min = ($csv."Value 2" / 304.79999025) $max = ($csv."Value 3" / 304.79999025) $average = ($csv."Value 4" / 304.79999025) $shots = $csv."Value 6" $time_hack=$csv."Value 1" $extreme_spread= ($max - $min) Write-host "Session Time/Date:", $time Write-host "# of Shots:", $shots Write-host " " Write-host "Min:", $min Write-host "Max:", $max Write-host "Average:", $average Write-host "Extreme Spread:", $extreme_spread write-host " " write-host " " write-host " " $Session_name = Read-Host -Prompt "Enter Session Name" Write-output "Session Time: $time" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "# of Shots: $shots" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Min: $min" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Max: $max" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Average: $average" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Extreme Spread: $extreme_spread" | out-file -filepath .\Results\$Session_name.txt -Append Write-output " " | out-file -filepath .\Results\$Session_name.txt -Append } # $customarray = @() # $line = "" | select min,max,average,sessiontime,time,velocity,shotnum # $line.min = $min # $line.max = $max # $line.average = $average # $line.sessiontime = $time # $line.shotnum = $shot_num # $line.time = $time1 # $line.velocity = ($speed / 304.79999025) if ($type -eq "Data" -and $localnumber -eq "4") { $shot_num = $csv.'Value 3' $speed = ($csv.'Value 2' / 304.79999025) $time_hack1=$csv."value 1" $time1 = (([System.DateTimeOffset]::FromUnixTimeSeconds($time_hack1)).DateTime.ToLocalTime()).ToString("s") Write-output " " | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Shot #: $shot_num" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Speed: $speed" | out-file -filepath .\Results\$Session_name.txt -Append Write-output "Time of Shot: $time1" | out-file -filepath .\Results\$Session_name.txt -Append Write-output " " | out-file -filepath .\Results\$Session_name.txt -Append } }


*EDIT*

This should be pretty complete now. Can batch select many sessions and convert them all to readable txt as well as CSV (keeps both copies in "results" folder)
Reply


Messages In This Thread
Garmin Xero C1 Pro chrono - by jasper2408 - 10-27-2023, 07:22 PM
Garmin Xero C1 Pro chrono - by Timitus - 10-27-2023, 07:27 PM
Garmin Xero C1 Pro chrono - by Old Bob - 10-28-2023, 12:19 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 10-28-2023, 12:30 AM
Garmin Xero C1 Pro chrono - by Old Bob - 10-28-2023, 12:56 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 10-28-2023, 01:23 AM
Garmin Xero C1 Pro chrono - by Old Bob - 10-28-2023, 01:56 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 10-28-2023, 12:26 PM
Garmin Xero C1 Pro chrono - by SDW - 10-28-2023, 07:13 PM
Garmin Xero C1 Pro chrono - by SDW - 10-28-2023, 07:29 PM
Garmin Xero C1 Pro chrono - by mtnlvr - 10-28-2023, 09:56 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 10-28-2023, 11:09 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 10-29-2023, 01:24 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 10-31-2023, 12:02 PM
Garmin Xero C1 Pro chrono - by CJW - 11-01-2023, 02:56 AM
Garmin Xero C1 Pro chrono - by Klem - 11-01-2023, 10:03 AM
Garmin Xero C1 Pro chrono - by biodsl - 11-01-2023, 10:28 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 11-01-2023, 03:16 PM
Garmin Xero C1 Pro chrono - by biodsl - 11-01-2023, 04:09 PM
Garmin Xero C1 Pro chrono - by Legionnaire - 11-01-2023, 04:17 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 11-01-2023, 04:24 PM
Garmin Xero C1 Pro chrono - by Klem - 11-01-2023, 10:47 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 11-01-2023, 11:47 PM
Garmin Xero C1 Pro chrono - by SDW - 11-02-2023, 03:24 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 11-04-2023, 05:14 PM
Garmin Xero C1 Pro chrono - by Klem - 11-05-2023, 07:44 AM
Garmin Xero C1 Pro chrono - by lazyengineer - 12-29-2023, 05:20 PM
Garmin Xero C1 Pro chrono - by mtnlvr - 12-29-2023, 07:47 PM
Garmin Xero C1 Pro chrono - by lazyengineer - 12-30-2023, 04:57 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 12-30-2023, 03:13 PM
Garmin Xero C1 Pro chrono - by Cowdog - 12-30-2023, 04:02 PM
Garmin Xero C1 Pro chrono - by stonehog - 12-30-2023, 06:57 PM
Garmin Xero C1 Pro chrono - by mtnlvr - 12-30-2023, 09:08 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 12-31-2023, 03:09 PM
Garmin Xero C1 Pro chrono - by mtnlvr - 12-31-2023, 03:57 PM
Garmin Xero C1 Pro chrono - by SDW - 01-01-2024, 06:48 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-01-2024, 07:38 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 01-01-2024, 07:49 PM
Garmin Xero C1 Pro chrono - by SDW - 01-07-2024, 02:50 PM
Garmin Xero C1 Pro chrono - by SDW - 01-07-2024, 03:04 PM
Garmin Xero C1 Pro chrono - by Klem - 01-07-2024, 11:07 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-07-2024, 11:12 PM
Garmin Xero C1 Pro chrono - by natebonebusta - 01-07-2024, 11:44 PM
Garmin Xero C1 Pro chrono - by mtnlvr - 01-08-2024, 12:05 AM
Garmin Xero C1 Pro chrono - by Klem - 01-08-2024, 12:23 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-08-2024, 01:36 AM
Garmin Xero C1 Pro chrono - by mtnlvr - 01-08-2024, 02:30 AM
Garmin Xero C1 Pro chrono - by lazyengineer - 01-08-2024, 03:46 AM
Garmin Xero C1 Pro chrono - by SDW - 01-08-2024, 03:51 AM
Garmin Xero C1 Pro chrono - by SDW - 01-08-2024, 03:33 PM
Garmin Xero C1 Pro chrono - by SDW - 01-08-2024, 07:14 PM
Garmin Xero C1 Pro chrono - by Klem - 01-14-2024, 01:00 AM
Garmin Xero C1 Pro chrono - by SDW - 01-15-2024, 03:25 PM
Garmin Xero C1 Pro chrono - by grayfox - 01-15-2024, 04:05 PM
Garmin Xero C1 Pro chrono - by 37L1 - 01-15-2024, 04:39 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-15-2024, 04:49 PM
Garmin Xero C1 Pro chrono - by lazyengineer - 01-15-2024, 05:16 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-15-2024, 05:21 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-15-2024, 10:52 PM
Garmin Xero C1 Pro chrono - by SDW - 01-16-2024, 03:48 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-16-2024, 05:39 PM
Garmin Xero C1 Pro chrono - by mtnlvr - 01-16-2024, 06:15 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-16-2024, 07:29 PM
Garmin Xero C1 Pro chrono - by grayfox - 01-16-2024, 08:19 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-16-2024, 08:58 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-16-2024, 11:45 PM
Garmin Xero C1 Pro chrono - by grayfox - 01-17-2024, 01:31 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 02:58 AM
Garmin Xero C1 Pro chrono - by grayfox - 01-17-2024, 03:11 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 03:44 AM
Garmin Xero C1 Pro chrono - by lazyengineer - 01-17-2024, 05:07 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 06:03 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 04:57 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 01-17-2024, 10:37 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 10:38 PM
Garmin Xero C1 Pro chrono - by Klem - 01-17-2024, 10:45 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 01-17-2024, 10:47 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 10:58 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-17-2024, 11:39 PM
Garmin Xero C1 Pro chrono - by grayfox - 01-18-2024, 01:25 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 01:51 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 01-18-2024, 10:06 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 04:36 PM
Garmin Xero C1 Pro chrono - by SDW - 01-18-2024, 05:55 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 06:02 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 06:18 PM
Garmin Xero C1 Pro chrono - by SDW - 01-18-2024, 06:49 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 08:31 PM
Garmin Xero C1 Pro chrono - by SDW - 01-18-2024, 10:45 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 10:58 PM
Garmin Xero C1 Pro chrono - by SDW - 01-18-2024, 11:04 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-18-2024, 11:10 PM
Garmin Xero C1 Pro chrono - by SDW - 01-18-2024, 11:49 PM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-19-2024, 12:18 AM
Garmin Xero C1 Pro chrono - by grayfox - 01-19-2024, 12:34 AM
Garmin Xero C1 Pro chrono - by SDW - 01-19-2024, 12:40 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-19-2024, 12:57 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-19-2024, 01:08 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-19-2024, 02:51 AM
Garmin Xero C1 Pro chrono - by SDW - 01-19-2024, 04:45 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-19-2024, 06:43 AM
Garmin Xero C1 Pro chrono - by Steve Matthew - 01-19-2024, 09:03 AM
Garmin Xero C1 Pro chrono - by jasper2408 - 01-19-2024, 09:47 AM
Garmin Xero C1 Pro chrono - by Zeneffect - 01-19-2024, 10:29 PM
Garmin Xero C1 Pro chrono - by Popeye212 - 01-20-2024, 11:15 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 01-21-2024, 02:57 PM
Garmin Xero C1 Pro chrono - by jasper2408 - 02-23-2024, 08:04 PM
Garmin Xero C1 Pro chrono - by Klem - 01-08-2024, 06:28 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)