⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p.cpp

📁 来自网络,国外网友做的,vc++代码,测试过,表示感谢. 可以读取串口GPS数据显示地理位置,需要有外置的串口的GPS接收机连接电脑,在demo主窗口界面可以输出GPS接收的地理位置,经度纬度,时间
💻 CPP
字号:
#include "nmea0183.h"
#pragma hdrstop

/*
** Author: Samuel R. Blackburn
** Internet: sam_blackburn@pobox.com
**
** You can use it any way you like as long as you don't try to sell it.
**
** Copyright, 1996, Samuel R. Blackburn
**
** $Workfile: p.cpp $
** $Revision: 4 $
** $Modtime: 10/10/98 2:42p $
*/

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

P::P()
{
   Mnemonic = "P";
   Empty();
}

P::~P()
{
   Mnemonic.Empty();
   Empty();
}

void P::Empty( void )
{
   Sentence.Empty();
   Source.Empty();
}

BOOL P::Parse( const SENTENCE& sentence )
{
   /*
   ** This is where parsing of proprietary sentences will go...
   */

   Sentence = sentence;

   CString temp_string = sentence.Field( 0 );

   Source      = temp_string.Mid( 1, 3 );
   CompanyName = Manufacturers[ Source ];

   TRACE1( "Source is   \"%s\"\n", (const char *) Source );
   TRACE1( "CompanyName \"%s\"\n", (const char *) CompanyName );

   return( TRUE );
}

BOOL P::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += Sentence;

   sentence.Finish();

   return( TRUE );
}

const P& P::operator = ( const P& source )
{
   Sentence = source.Sentence;

   return( *this );
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -