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: radardat.cpp $
|
---|
13 | ** $Revision: 4 $
|
---|
14 | ** $Modtime: 10/10/98 2:42p $
|
---|
15 | */
|
---|
16 |
|
---|
17 |
|
---|
18 | RADAR_DATA::RADAR_DATA()
|
---|
19 | {
|
---|
20 | Empty();
|
---|
21 | }
|
---|
22 |
|
---|
23 | RADAR_DATA::~RADAR_DATA()
|
---|
24 | {
|
---|
25 | Empty();
|
---|
26 | }
|
---|
27 |
|
---|
28 | void RADAR_DATA::Empty( void )
|
---|
29 | {
|
---|
30 | OriginRangeFromOwnShip = 0.0;
|
---|
31 | OriginBearingDegreesFromZero = 0.0;
|
---|
32 | VariableRangeMarkerRange = 0.0;
|
---|
33 | BearingLineDegreesFromZero = 0.0;
|
---|
34 | }
|
---|
35 |
|
---|
36 | void RADAR_DATA::Parse( int first_field_number, const SENTENCE& sentence )
|
---|
37 | {
|
---|
38 | OriginRangeFromOwnShip = sentence.Double( first_field_number );
|
---|
39 | OriginBearingDegreesFromZero = sentence.Double( first_field_number + 1 );
|
---|
40 | VariableRangeMarkerRange = sentence.Double( first_field_number + 2 );
|
---|
41 | BearingLineDegreesFromZero = sentence.Double( first_field_number + 3 );
|
---|
42 | }
|
---|
43 |
|
---|
44 | void RADAR_DATA::Write( SENTENCE& sentence )
|
---|
45 | {
|
---|
46 | sentence += OriginRangeFromOwnShip;
|
---|
47 | sentence += OriginBearingDegreesFromZero;
|
---|
48 | sentence += VariableRangeMarkerRange;
|
---|
49 | sentence += BearingLineDegreesFromZero;
|
---|
50 | }
|
---|
51 |
|
---|
52 | const RADAR_DATA& RADAR_DATA::operator = ( const RADAR_DATA& source )
|
---|
53 | {
|
---|
54 | OriginRangeFromOwnShip = source.OriginRangeFromOwnShip;
|
---|
55 | OriginBearingDegreesFromZero = source.OriginBearingDegreesFromZero;
|
---|
56 | VariableRangeMarkerRange = source.VariableRangeMarkerRange;
|
---|
57 | BearingLineDegreesFromZero = source.BearingLineDegreesFromZero;
|
---|
58 |
|
---|
59 | return( *this );
|
---|
60 | }
|
---|