source: pacpussensors/trunk/NMEA0183/src/DECCALOP.cpp

Last change on this file was 59, checked in by DHERBOMEZ Gérald, 10 years ago

Integration of new modules:

  • GPS NMEA0183 decoder
  • Span CPT Decoder

Update of:

File size: 1.2 KB
Line 
1#include "nmea0183.h"
2#pragma hdrstop
3
4/*
5** Author: Samuel R. Blackburn
6** Internet: sam_blackburn@pobox.com
7**
8** You can use it any way you like as long as you don't try to sell it.
9**
10** Copyright, 1996, Samuel R. Blackburn
11**
12** $Workfile: deccalop.cpp $
13** $Revision: 5 $
14** $Modtime: 10/10/98 2:46p $
15*/
16
17
18LINE_OF_POSITION::LINE_OF_POSITION()
19{
20 Empty();
21}
22
23LINE_OF_POSITION::~LINE_OF_POSITION()
24{
25 Empty();
26}
27
28void LINE_OF_POSITION::Empty( void )
29{
30 //ZoneID.Empty();
31 LineOfPosition = 0.0;
32 MasterLine = NMEA_Unknown;
33}
34
35void LINE_OF_POSITION::Parse( int first_field_number, const SENTENCE& sentence )
36{
37 ZoneID = sentence.Field( first_field_number );
38 LineOfPosition = sentence.Double( first_field_number + 1 );
39 MasterLine = sentence.Boolean( first_field_number + 2 );
40}
41
42void LINE_OF_POSITION::Write( SENTENCE& sentence )
43{
44 sentence += ZoneID;
45 sentence += LineOfPosition;
46 sentence += MasterLine;
47}
48
49const LINE_OF_POSITION& LINE_OF_POSITION::operator = ( const LINE_OF_POSITION& source )
50{
51 ZoneID = source.ZoneID;
52 LineOfPosition = source.LineOfPosition;
53 MasterLine = source.MasterLine;
54
55 return( *this );
56}
Note: See TracBrowser for help on using the repository browser.