Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Garmin Xero C1 Pro chrono
#76
changed up the way it loads files so it processes them 1 at a time instead of im not sure how to explain it... shoving it all in a giant pile and trying to sort from there wasnt working..

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\ $items = get-childitem -Path .\Results\*.csv | select fullname foreach ($item in $items) { $csv1 = $item.fullname | import-csv $csv_data = $csv1 | where 'type' -eq 'data' | where 'local number' -eq 4 $measured = $csv_data.'value 2' | measure-object -average $newNumbers = 0 ForEach ($number in $csv_data) { $newNumbers += [Math]::Pow(($number.'value 2' - $measured.Average), 2) } $stdDev = [math]::Sqrt($($newNumbers / ($measured.Count - 1))) $stddev_fps=$stddev / 304.79999025 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 " " write-host "Standard Deviation:", $stddev_fps Write-host "Extreme Spread:", $extreme_spread 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 "Standard Deviation: $stddev_fps" | 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 $newNumbers = 0 cls } 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 } } } remove-item .\fit_temp\*.fit


ES and SD are added though the numbers are suspect on SD... need to see what they are doing and how to get them to align. my math is good, but im not sure if i chose the "right" SD equation (i see there are 2?)

TXT output file now looks like this:



Session Time: 2004-01-13T17:18:43
# of Shots: 5
Min: 2627.82816804897
Max: 2678.33341900837
Average: 2650.3905047287
Standard Deviation: 18.7458957133989
Extreme Spread: 50.5052509594034


Shot #: 1
Speed: 2653.21202712867
Time of Shot: 2004-01-16T11:16:12


Shot #: 2
Speed: 2678.33341900837
Time of Shot: 2004-01-16T11:16:22


Shot #: 3
Speed: 2652.38197460868
Time of Shot: 2004-01-16T11:16:29


Shot #: 4
Speed: 2627.82816804897
Time of Shot: 2004-01-16T11:16:39


Shot #: 5
Speed: 2640.20021568882
Time of Shot: 2004-01-16T11:16:48



SOMEONE PLEASE CHECK MY MATH PLEASE PRETTY PLEASE
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)