BT368i
view release on metacpan or search on metacpan
lib/BT368i/NMEA/GP/RMC.pm view on Meta::CPAN
# 4) Latitude hemisphere, N or S
$self->{latitude_hemisphere} = $args[4];
# 5) Longitude, dddmm.mmmm format (leading zeros sent)
$self->{longitude} = $args[5];
# 6) Longitude hemisphere, E or W
$self->{longitude_hemisphere} = $args[6];
# 7) Speed over ground, 0.0 to 999.9 knots
$self->{speed} = $args[7];
# 8) Course over ground, 000.0 to 359.9 degrees, true (leading zeros sent)
$self->{course} = $args[8];
# 9) UTC date of position fix, ddmmyy format
my @utc_date = split(//, $args[9]);
my $dd = $utc_date[0]; $dd .= $utc_date[1];
my $mm = $utc_date[2]; $mm .= $utc_date[3];
my $yy = $utc_date[4]; $yy .= $utc_date[5];
$self->{utc_date} = $yy . '-' . $mm . '-' . $dd;
# 10) Magnetic variation, 000.0 to 180.0 degrees (leading zeros sent)
$self->{magnetic_variation} = $args[10];
# 11) Magnetic variation direction, E or W (westerly variation adds to true course)
$self->{magnetic_variation_direction} = $args[11];
}
1;
__END__
=head1 NAME
BT368i::NMEA::GP::RMC - The RMC sentance
=head1 SYNOPSIS
use BT368i::NMEA::GP::RMC;
my $rmc = new BT368i::NMEA::GP::RMC();
$rmc->parse();
$rmc->print();
=head1 DESCRIPTION
Used to decode the RMC message.
=head2 Methods
=over 2
=item $rmc->parse();
Parse a GPRMC sentance.
=item $rmc->print();
Print a decoded output of a GPRMC sentance.
=item $rmc->log($filename);
Log the GPRMC sentance to a file.
=back
=head1 AUTHOR
Travis Kent Beste, travis@tencorners.com
=head1 COPYRIGHT
Copyright 2010 Tencorners, LLC. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
Travis Kent Beste's GPS www site
http://www.travisbeste.com/software/gps
perl(1).
RingBuffer.pm.
Device::SerialPort.pm.
=cut
( run in 1.681 second using v1.01-cache-2.11-cpan-99c4e6809bf )