示例#1
0
文件: rmb.cpp 项目: AluOne/OpenCPN
bool RMB::Write( SENTENCE& sentence )
{

   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += IsDataValid;
   sentence += CrossTrackError;
   if(DirectionToSteer == Left)
       sentence += _T("L");
   else
       sentence += _T("R");

   sentence += From;
   sentence += To;
   sentence += DestinationPosition;
   sentence += RangeToDestinationNauticalMiles;
   sentence += BearingToDestinationDegreesTrue;
   sentence += DestinationClosingVelocityKnots;
   sentence += IsArrivalCircleEntered;

   sentence.Finish();

//   NMEA0183_BOOLEAN check = sentence.IsChecksumBad( 14 );

   return( TRUE );
}
示例#2
0
bool GGA::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += UTCTime;
   sentence += Position;
   sentence += GPSQuality;
   sentence += NumberOfSatellitesInUse;
   sentence += HorizontalDilutionOfPrecision;
   sentence += AntennaAltitudeMeters;
   sentence += _T("M");
   sentence += GeoidalSeparationMeters;
   sentence += _T("M");
   sentence += AgeOfDifferentialGPSDataSeconds;
   sentence += DifferentialReferenceStationID;

   sentence.Finish();

   return( TRUE );
}
示例#3
0
文件: xte.cpp 项目: AluOne/OpenCPN
bool XTE::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += IsLoranBlinkOK;
   sentence += IsLoranCCycleLockOK;
   sentence += CrossTrackErrorDistance;

   if(DirectionToSteer == Left)
       sentence += _T("L");
   else
       sentence += _T("R");
   
   sentence += CrossTrackUnits;

   sentence.Finish();

   return( TRUE );
}
示例#4
0
文件: apb.cpp 项目: AluOne/OpenCPN
bool APB::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += IsLoranBlinkOK;
   sentence += IsLoranCCycleLockOK;
   sentence.Add( CrossTrackErrorMagnitude, g_NMEAAPBPrecision);

   if(DirectionToSteer == Left)
       sentence += _T("L");
   else
       sentence += _T("R");
   
   sentence += CrossTrackUnits;
   sentence += IsArrivalCircleEntered;
   sentence += IsPerpendicular;
   sentence.Add( BearingOriginToDestination, g_NMEAAPBPrecision);
   sentence += BearingOriginToDestinationUnits;
   sentence += To;
   sentence.Add( BearingPresentPositionToDestination, g_NMEAAPBPrecision );
   sentence += BearingPresentPositionToDestinationUnits;
   sentence.Add( HeadingToSteer, g_NMEAAPBPrecision );
   sentence += HeadingToSteerUnits;

   sentence.Finish();

   return( TRUE );
}
示例#5
0
bool RMC::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += UTCTime;
   sentence += IsDataValid;
   sentence += Position;
   sentence += SpeedOverGroundKnots;
   sentence += TrackMadeGoodDegreesTrue;
   sentence += Date;

   if(MagneticVariation > 360.)
         sentence += _T(",,");
   else
   {
         sentence += MagneticVariation;
         sentence += MagneticVariationDirection;
   }

   sentence.Finish();

   return( TRUE );
}
示例#6
0
文件: gsv.cpp 项目: AluOne/OpenCPN
bool GSV::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence.Finish();

   return( TRUE );
}
示例#7
0
bool ZZU::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += UTCTimeString;

   sentence.Finish();

   return( true );
}
示例#8
0
bool HDM::Write(SENTENCE& sentence) {
  /*
  ** Let the parent do its thing
  */

  RESPONSE::Write(sentence);

  sentence += DegreesMagnetic;
  sentence += _T("M");

  sentence.Finish();

  return (TRUE);
}
示例#9
0
bool VWE::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += EfficiencyPercent;

   sentence.Finish();

   return( true );
}
示例#10
0
bool HDM::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += HeadingDegrees;
   sentence += "M";

   sentence.Finish();

   return( true );
}
示例#11
0
文件: wpl.cpp 项目: AluOne/OpenCPN
bool WPL::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += Position;
   sentence += To;

   sentence.Finish();

   return( TRUE );
}
示例#12
0
bool TEP::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += ElevationDegrees;
   sentence += "D";

   sentence.Finish();

   return( true );
}
示例#13
0
文件: hdt.cpp 项目: AluOne/OpenCPN
bool HDT::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += DegreesTrue;
   sentence += _T("T");

   sentence.Finish();

   return( TRUE );
}
示例#14
0
文件: stn.cpp 项目: mikejwatts/epl_pi
BOOL STN::Write( SENTENCE& sentence )
{
   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += TalkerIDNumber;

   sentence.Finish();

   return( TRUE );
}
示例#15
0
bool WDR::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += NauticalMiles;
   sentence += "N";
   sentence += To;

   sentence.Finish();

   return( true );
}
示例#16
0
bool ZLZ::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += UTCTimeString;
   sentence += LocalTimeString;
   sentence += LocalHourDeviation;

   sentence.Finish();

   return( true );
}
示例#17
0
bool RTE::Write( SENTENCE& sentence )
{

   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += total_number_of_messages;
   sentence += message_number;

   switch( TypeOfRoute )
   {
      case CompleteRoute:

//            sentence += _T("C");             // uppercase required for GPS MLR FFX312
           //            sentence += _T("c");             // trying lowercase for generic NMEA device
           sentence += wxString((wxChar)m_complete_char);
            break;

      case WorkingRoute:

         sentence += _T("w");
         break;

      default:

//         sentence += "";
         break;
   }

   sentence += RouteName;

   for(unsigned int i=0 ; i < Waypoints.GetCount() ; i++)
         sentence += Waypoints[i];

    if(m_skip_checksum){
        wxString temp_string;
        temp_string.Printf(_T("%c%c"), CARRIAGE_RETURN, LINE_FEED );
        sentence.Sentence += temp_string;
    }
    else
        sentence.Finish();

   return( TRUE );
}
示例#18
0
文件: dpt.cpp 项目: AluOne/OpenCPN
bool DPT::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += DepthMeters;
   sentence += OffsetFromTransducerMeters;

   sentence.Finish();

   return( TRUE );
}
示例#19
0
bool MTW::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   CRESPONSE::Write( sentence );

   sentence += Temperature;
   sentence += UnitOfMeasurement;

   sentence.Finish();

   return( TRUE );
}
示例#20
0
bool VPW::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += Knots;
   sentence += "N";
   sentence += MetersPerSecond;
   sentence += "M";

   sentence.Finish();

   return( true );
}
示例#21
0
bool HSC::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += DegreesTrue;
   sentence += "T";
   sentence += DegreesMagnetic;
   sentence += "M";

   sentence.Finish();

   return( true );
}
示例#22
0
bool RPM::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += Source;
   sentence += SourceNumber;
   sentence += RevolutionsPerMinute;
   sentence += PropellerPitchPercentage;
   sentence += IsDataValid;
   
   sentence.Finish();

   return( true );
}
示例#23
0
文件: hdg.cpp 项目: AluOne/OpenCPN
bool HDG::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += MagneticSensorHeadingDegrees;
   sentence += MagneticDeviationDegrees;
   sentence += MagneticDeviationDirection;
   sentence += MagneticVariationDegrees;
   sentence += MagneticVariationDirection;

   sentence.Finish();

   return( TRUE );
}
示例#24
0
bool GTD::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += TimeDifference1;
   sentence += TimeDifference2;
   sentence += TimeDifference3;
   sentence += TimeDifference4;
   sentence += TimeDifference5;

   sentence.Finish();

   return( true );
}
示例#25
0
文件: ztg.cpp 项目: mikejwatts/epl_pi
BOOL ZTG::Write( SENTENCE& sentence )
{
   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += UTCTime;
   sentence += TimeRemaining;
   sentence += To;

   sentence.Finish();

   return( TRUE );
}
示例#26
0
文件: gll.cpp 项目: AluOne/OpenCPN
bool GLL::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */

   RESPONSE::Write( sentence );

   sentence += Position;
   sentence += UTCTime;
   sentence += IsDataValid;

   sentence.Finish();

   return( TRUE );
}
示例#27
0
bool WNC::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += MilesDistance;
   sentence += "N";
   sentence += KilometersDistance;
   sentence += "K";
   sentence += To;
   sentence += From;

   sentence.Finish();

   return( true );
}
示例#28
0
bool BOD::Write( SENTENCE& sentence )
{
   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += BearingTrue;
   sentence += "T";
   sentence += BearingMagnetic;
   sentence += "M";
   sentence += To;
   sentence += From;

   sentence.Finish();

   return( true );
}
示例#29
0
bool RSA::Write( SENTENCE& sentence )
{
//   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   CRESPONSE::Write( sentence );

   sentence += Starboard;
   sentence += IsStarboardDataValid;
   sentence += Port;
   sentence += IsPortDataValid;
   
   sentence.Finish();

   return( TRUE );
}
示例#30
0
文件: hsc.cpp 项目: mikejwatts/epl_pi
BOOL HSC::Write( SENTENCE& sentence )
{
   ASSERT_VALID( this );

   /*
   ** Let the parent do its thing
   */
   
   RESPONSE::Write( sentence );

   sentence += DegreesTrue;
   sentence += "T";
   sentence += DegreesMagnetic;
   sentence += "M";

   sentence.Finish();

   return( TRUE );
}