资源简介
提取各种NEMA0183格式数据的类,GPS,COMPASS,各种航海仪器输出的NEMA0183格式数据
代码片段和文件信息
/*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** Copyright 2005 Samuel R. Blackburn
**
** “You can get credit for something or get it done but not both.“
** Dr. Richard Garwin
**
** BSD License follows.
**
** Redistribution and use in source and binary forms with or without
** modification are permitted provided that the following conditions
** are met:
**
** Redistributions of source code must retain the above copyright notice
** this list of conditions and the following disclaimer. Redistributions
** in binary form must reproduce the above copyright notice this list
** of conditions and the following disclaimer in the documentation and/or
** other materials provided with the distribution. Neither the name of
** the WFC nor the names of its contributors may be used to endorse or
** promote products derived from this software without specific prior
** written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
** LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL
** SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
** LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE
** DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** $Workfile: HVD.cpp $
** $Revision: 4 $
** $Modtime: 10/10/98 2:44p $
*/
#include “nmea0183.h“
/*
** This Sentence Not Recommended For New Designs
** HDG is recommended.
*/
#pragma hdrstop
#if defined( _DEBUG ) && defined( _INC_CRTDBG )
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#define new DEBUG_NEW
#endif // _DEBUG
HVD::HVD()
{
Mnemonic = TEXT( “HVD“ );
Empty();
}
HVD::~HVD()
{
Mnemonic.Empty();
Empty();
}
void HVD::Empty( void )
{
MagneticVariationDegrees = 0.0;
MagneticVariationDirection = EW_Unknown;
}
BOOL HVD::Parse( const SENTENCE& sentence )
{
/*
** HVD - Magnetic Variation Automatically set
**
** 1 2 3
** | | |
** $--HVDx.xa*hh
**
** Field Number:
** 1) Magnetic Variation degrees
** 2) Magnetic Variation direction E = Easterly W = Westerly
** 3) Checksum
*/
/*
** First we check the checksum...
*/
const NMEA0183_BOOLEAN checksum_is_bad = sentence.IsChecksumBad();
if ( checksum_is_bad == True )
{
InvalidChecksum();
return( FALSE );
}
MagneticVariationDegrees = sentence.Double( 1 );
MagneticVariationDirection = senten
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 3908 2005-02-25 11:07 NMEA0183\AAM.CPP
....... 2494 2005-02-22 15:46 NMEA0183\AAM.HPP
....... 6814 2005-02-25 11:07 NMEA0183\ALM.CPP
....... 2775 2005-02-24 11:30 NMEA0183\ALM.HPP
....... 9565 2005-02-28 14:38 NMEA0183\APB.CPP
....... 3255 2005-02-28 14:38 NMEA0183\APB.HPP
....... 2661 2005-02-22 20:25 NMEA0183\ASD.CPP
....... 2148 2005-02-24 11:30 NMEA0183\ASD.HPP
....... 4157 2005-02-25 11:08 NMEA0183\BEC.CPP
....... 2517 2005-02-24 11:30 NMEA0183\BEC.HPP
....... 3963 2005-02-28 14:39 NMEA0183\BOD.CPP
....... 2476 2005-02-28 14:38 NMEA0183\BOD.HPP
....... 4680 2005-02-26 22:21 NMEA0183\BWC.CPP
....... 2614 2005-02-26 22:11 NMEA0183\BWC.HPP
....... 4693 2005-02-26 22:22 NMEA0183\BWR.CPP
....... 2622 2005-02-26 22:12 NMEA0183\BWR.HPP
....... 3711 2005-02-25 11:09 NMEA0183\BWW.CPP
....... 2431 2005-02-24 11:30 NMEA0183\BWW.HPP
....... 416 1994-12-31 07:55 NMEA0183\CHECKSUM.CPP
....... 3572 2005-02-25 11:09 NMEA0183\DBT.CPP
....... 2403 2005-02-24 11:30 NMEA0183\DBT.HPP
....... 6118 2005-02-25 11:09 NMEA0183\DCN.CPP
....... 2855 2005-02-24 11:30 NMEA0183\DCN.HPP
....... 2928 2005-02-22 20:27 NMEA0183\DECCALOP.CPP
....... 2549 2005-02-24 11:30 NMEA0183\DECCALOP.HPP
....... 3492 2005-02-25 11:09 NMEA0183\DPT.CPP
....... 2400 2005-02-24 11:30 NMEA0183\DPT.HPP
....... 11001 2005-02-22 20:27 NMEA0183\EXPID.CPP
....... 1129 1995-01-02 10:04 NMEA0183\FIELD.CPP
....... 2774 2005-02-22 20:27 NMEA0183\FREQMODE.CPP
............此处省略195个文件信息
评论
共有 条评论