Last change
on this file since 109 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.4 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: vwe.cpp $
|
---|
13 | ** $Revision: 4 $
|
---|
14 | ** $Modtime: 10/10/98 2:39p $
|
---|
15 | */
|
---|
16 |
|
---|
17 | /*
|
---|
18 | ** This Sentence Not Recommended For New Designs
|
---|
19 | ** There is no recommended replacement.
|
---|
20 | */
|
---|
21 |
|
---|
22 |
|
---|
23 |
|
---|
24 | VWE::VWE()
|
---|
25 | {
|
---|
26 | Mnemonic = "VWE";
|
---|
27 | Empty();
|
---|
28 | }
|
---|
29 |
|
---|
30 | VWE::~VWE()
|
---|
31 | {
|
---|
32 | //Mnemonic.Empty();
|
---|
33 | Empty();
|
---|
34 | }
|
---|
35 |
|
---|
36 | void VWE::Empty( void )
|
---|
37 | {
|
---|
38 | EfficiencyPercent = 0;
|
---|
39 | }
|
---|
40 |
|
---|
41 | BOOL VWE::Parse( const SENTENCE& sentence )
|
---|
42 | {
|
---|
43 | /*
|
---|
44 | ** VWE - Wind Track Efficiency
|
---|
45 | **
|
---|
46 | ** 1 2
|
---|
47 | ** | |
|
---|
48 | ** $--VWE,x.x,*hh<CR><LF>
|
---|
49 | **
|
---|
50 | ** Field Number:
|
---|
51 | ** 1) Efficiency, Percent
|
---|
52 | ** 2) Checksum
|
---|
53 | */
|
---|
54 |
|
---|
55 | /*
|
---|
56 | ** First we check the checksum...
|
---|
57 | */
|
---|
58 |
|
---|
59 | if ( sentence.IsChecksumBad( 2 ) == True )
|
---|
60 | {
|
---|
61 | SetErrorMessage( "Invalid Checksum" );
|
---|
62 | return( FALSE );
|
---|
63 | }
|
---|
64 |
|
---|
65 | EfficiencyPercent = sentence.Integer( 1 );
|
---|
66 |
|
---|
67 | return( TRUE );
|
---|
68 | }
|
---|
69 |
|
---|
70 | BOOL VWE::Write( SENTENCE& sentence )
|
---|
71 | {
|
---|
72 | /*
|
---|
73 | ** Let the parent do its thing
|
---|
74 | */
|
---|
75 |
|
---|
76 | RESPONSE::Write( sentence );
|
---|
77 |
|
---|
78 | sentence += EfficiencyPercent;
|
---|
79 |
|
---|
80 | sentence.Finish();
|
---|
81 |
|
---|
82 | return( TRUE );
|
---|
83 | }
|
---|
84 |
|
---|
85 | const VWE& VWE::operator = ( const VWE& source )
|
---|
86 | {
|
---|
87 | EfficiencyPercent = source.EfficiencyPercent;
|
---|
88 |
|
---|
89 | return( *this );
|
---|
90 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.