A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/firefly-cpp/TCXReader.jl below:

firefly-cpp/TCXReader.jl: A parser for TCX files

TCXReader.jl -- A parser for TCX files

✨ Detailed insights📦 Installation🚀 Usage🗃️ Datasets🔗 Related packages/frameworks🔑 License

TCXReader.jl is a Julia package designed to simplify the process of reading and processing .tcx files, commonly used by Garmin devices and other GPS-enabled fitness devices to store workout data. This package allows Julia developers and data scientists to easily import, analyze, and transform training data for further analysis and visualization. With support for key TCX data elements such as track points, laps, activities, and device information, TCXReader.jl provides a comprehensive toolset for accessing the rich data captured during workouts.

using TCXReader: loadTCXFile

# Load a TCX file and access its data
author, activities = loadTCXFile("path/to/your/file.tcx")
using TCXReader: loadTCXFile

function main()
    # Load a TCX file and access its data
    author, activities = loadTCXFile("path/to/your/file.tcx")

    # Display basic information about the workout's author
    println("Author Information:")
    println("Name: ", author.name)
    println("Build Version: ", author.build.versionMajor, ".", author.build.versionMinor)
    println("Language ID: ", author.langID)
    println("Part Number: ", author.partNumber)

    # Iterate through each activity in the TCX file
    for activity in activities
        println("\nActivity Information:")
        println("Sport: ", activity.sport)
        println("ID: ", activity.id)
        println("Device Name: ", activity.device.name)
        println("Device Version: ", activity.device.version)

        # Display overall metrics for the activity
        println("Total Time (seconds): ", activity.total_time)
        println("Total Distance (meters): ", activity.total_distance)
        println("Maximum Speed: ", activity.max_speed)
        println("Total Calories: ", activity.total_calories)
        println("Average Heart Rate (BPM): ", activity.avg_hr)
        println("Maximum Heart Rate (BPM): ", activity.max_hr)
        println("Average Cadence (Zero Averaging ON): ", activity.avg_cadence_zero_avg_on)
        println("Average Cadence (Zero Averaging OFF): ", activity.avg_cadence_zero_avg_off)
        println("Max Cadence: ", activity.max_cadence)
        println("Average Speed: ", activity.avg_speed)
        println("Total Ascent (meters): ", activity.total_ascent)
        println("Total Descent (meters): ", activity.total_descent)
        println("Max Altitude (meters): ", activity.max_altitude)
        println("Average Watts (Zero Averaging ON): ", activity.avg_watts_zero_avg_on)
        println("Average Watts (Zero Averaging OFF): ", activity.avg_watts_zero_avg_off)
        println("Max Watts: ", activity.max_watts)

        # Display information about each lap within the activity
        println("\nLaps and Track Points:")
        for (i, lap) in enumerate(activity.laps)
            println("Lap #$i:")
            println("\tStart Time: ", lap.startTime)
            println("\tTotal Time Seconds: ", lap.totalTimeSeconds)
            println("\tDistance Meters: ", lap.distanceMeters)
            # Additional lap details here
        end
    end

    # Optionally, export the loaded data to a CSV file for further analysis
    loadTCXFile("path/to/your/file.tcx", "output_path/tcx_data_export.csv")
end

main()

Datasets available and used in the examples on the following links: DATASET1, DATASET2, DATASET3.

🔗 Related packages/frameworks

[1] tcxreader: Python reader/parser for Garmin's TCX file format.

[2] sport-activities-features: A minimalistic toolbox for extracting features from sports activity files written in Python

[3] tcxread: A parser for TCX files written in Ruby

[4] TCX2Graph.jl: Building Property Graphs from TCX Files

This package is distributed under the MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4