NetAthlon2::RAW - Perl extension to parse NetAthlon2 RAW performance data files
use NetAthlon2::RAW; my $t = NetAthlon2::RAW->new (); my $d = $t->parse('Bike2009-07-02 5-54pm.RAW');
A perl module to parse the NetAthlon RAW file format. parse() will return a hash reference to the resultant data structure
Creates a new NetAthlon2::RAW object. new() does not accept any options at this time.
Returns a hash reference with the contents of $file. Keys included are:
$file
Calculation of the averages of the non-zero Cadence values from the Check Points array.
Calculation of the averages of the non-zero Heart Rate values from the Check Points array.
Calculation of the averages of the non-zero Speed values from the Check Points array. Used to be just the division of the Distance by the Elapsed Time, but the Elapsed Time is the time of the race, where as the Distance is the whole distance, including any warmup time. This lead to incorrect Average Speed calculations in version 0.01.
Calculation of the averages of the non-zero Watts values from the Check Points array.
The overall Cadence of the training session, in miles.
This is an array of each sample taken during the training session. Each array element is an anonymous hash with the following keys:
The instantaneous Altitude at the Elapsed Time.
The instantaneous Cadence at the Elapsed Time.
A calculation of when the sample was taken, based on the number of samples collected multiplied by the Sample Rate. Number is in seconds.
The instantaneous Grade at the Elapsed Time.
The instantaneous Heart Rate at the Elapsed Time.
The instantaneous Speed at the Elapsed Time. Number is in miles per hour.
The instantaneous Watts at the Elapsed Time.
The overall Distance of the training session, in miles.
The time of the training session, in seconds.
Values taken from the training session.
The highest training zone.
The second training zone.
The bottom training zone.
Number of seconds between each Check Point sample.
The start time of the training session, in a UNIX time_t format.
Number of minutes the time listed in the file name and the time listed inside the file can vary before throwing an error. The default is 1 minute.
The maximum watts can be, to be used in calculating the Average Watts. The default is 2000 watts.
http://www.whitepeak.org/Raw.aspx
I believe that the field that Martin lists on his web site (www.whitepeak.org) as the Grade of the course is not. In all my testing the Grade was 0, whereas the field he listed as Unknown had positive and negative values, and looks to me to be Grade * 10, so I have implemented the code to show this deviation from Martin's documentation.
Based on some empirical data, I believe the Unknown value listed after the Distance, is really Cadence for the entire time. I have added the Cadence field in addition to Average Cadence.
Jim Pirzyk, <jim+perl@pirzyk.org>
Copyright (c) 2009 pirzyk.org All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install NetAthlon2::RAW, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NetAthlon2::RAW
CPAN shell
perl -MCPAN -e shell install NetAthlon2::RAW
For more information on module installation, please visit the detailed CPAN module installation guide.