本文整理汇总了C++中NMEAParser::ParseNMEAString_Internal方法的典型用法代码示例。如果您正苦于以下问题:C++ NMEAParser::ParseNMEAString_Internal方法的具体用法?C++ NMEAParser::ParseNMEAString_Internal怎么用?C++ NMEAParser::ParseNMEAString_Internal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NMEAParser
的用法示例。
在下文中一共展示了NMEAParser::ParseNMEAString_Internal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseNMEAString
/**
* Redirects parsing of the String into GPS_INFO to the right device parser
* @param device 0 or 1, depending on the port used
* @param String NMEA string
* @param GPS_INFO GPS_INFO struct that will be updated
* @return Parsing success
*/
bool NMEAParser::ParseNMEAString(int device, const TCHAR *String,
NMEA_INFO *GPS_INFO) {
switch (device) {
case 0:
return nmeaParser1.ParseNMEAString_Internal(String, GPS_INFO);
case 1:
return nmeaParser2.ParseNMEAString_Internal(String, GPS_INFO);
};
return false;
}
示例2: ParseNMEAString
BOOL NMEAParser::ParseNMEAString(int device,
TCHAR *String, NMEA_INFO *GPS_INFO)
{
switch (device) {
case 0:
return nmeaParser1.ParseNMEAString_Internal(String, GPS_INFO);
case 1:
return nmeaParser2.ParseNMEAString_Internal(String, GPS_INFO);
};
return FALSE;
}
示例3: ParseNMEAString
BOOL NMEAParser::ParseNMEAString(int device,
TCHAR *String, NMEA_INFO *pGPS)
{
LKASSERT(!ReplayLogger::IsEnabled());
switch (device) {
case 0:
return nmeaParser1.ParseNMEAString_Internal(String, pGPS);
case 1:
return nmeaParser2.ParseNMEAString_Internal(String, pGPS);
};
return FALSE;
}
示例4: sprintf
/**
* This function creates some simulated traffic for FLARM debugging
* @param GPS_INFO Pointer to the NMEA_INFO struct
*/
void
Simulator::GenerateFLARMTraffic(NMEAInfo &basic)
{
static int i = 90;
i++;
if (i > 255)
i = 0;
if (i > 80)
return;
const Angle angle = Angle::degrees(fixed((i * 360) / 255)).as_bearing();
Angle dangle = (angle + Angle::degrees(fixed(120))).as_bearing();
Angle hangle = dangle.flipped().as_bearing();
int alt = (angle.ifastsine()) / 7;
int north = (angle.ifastsine()) / 2 - 200;
int east = (angle.ifastcosine()) / 1.5;
int track = -angle.as_bearing().value_degrees();
unsigned alarm_level = (i % 30 > 13 ? 0 : (i % 30 > 5 ? 2 : 1));
NMEAParser parser;
char buffer[50];
// PFLAA,<AlarmLevel>,<RelativeNorth>,<RelativeEast>,<RelativeVertical>,
// <IDType>,<ID>,<Track>,<TurnRate>,<GroundSpeed>,<ClimbRate>,<AcftType>
sprintf(buffer, "$PFLAA,%d,%d,%d,%d,2,DDA85C,%d,0,35,0,1",
alarm_level, north, east, alt, track);
AppendNMEAChecksum(buffer);
parser.ParseNMEAString_Internal(buffer, basic);
alt = (angle.ifastcosine()) / 10;
north = (dangle.ifastsine()) / 1.20 + 300;
east = (dangle.ifastcosine()) + 500;
track = hangle.value_degrees();
// PFLAA,<AlarmLevel>,<RelativeNorth>,<RelativeEast>,<RelativeVertical>,
// <IDType>,<ID>,<Track>,<TurnRate>,<GroundSpeed>,<ClimbRate>,<AcftType>
sprintf(buffer, "$PFLAA,0,%d,%d,%d,2,AA9146,,,,,1",
north, east, alt);
AppendNMEAChecksum(buffer);
parser.ParseNMEAString_Internal(buffer, basic);
// PFLAU,<RX>,<TX>,<GPS>,<Power>,<AlarmLevel>,<RelativeBearing>,<AlarmType>,
// <RelativeVertical>,<RelativeDistance>(,<ID>)
sprintf(buffer, "$PFLAU,2,1,2,1,%d", alarm_level);
AppendNMEAChecksum(buffer);
parser.ParseNMEAString_Internal(buffer, basic);
}