本文整理汇总了C++中NMEAInfo::ProvideTrueAirspeedWithAltitude方法的典型用法代码示例。如果您正苦于以下问题:C++ NMEAInfo::ProvideTrueAirspeedWithAltitude方法的具体用法?C++ NMEAInfo::ProvideTrueAirspeedWithAltitude怎么用?C++ NMEAInfo::ProvideTrueAirspeedWithAltitude使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NMEAInfo
的用法示例。
在下文中一共展示了NMEAInfo::ProvideTrueAirspeedWithAltitude方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IAS
static bool
LXWP0(NMEAInputLine &line, NMEAInfo &info)
{
/*
$LXWP0,Y,222.3,1665.5,1.71,,,,,,239,174,10.1
0 loger_stored (Y/N)
1 IAS (kph) ----> Condor uses TAS!
2 baroaltitude (m)
3-8 vario (m/s) (last 6 measurements in last second)
9 heading of plane
10 windcourse (deg)
11 windspeed (kph)
*/
fixed value;
line.Skip();
fixed airspeed;
bool tas_available = line.ReadChecked(airspeed);
if (tas_available && (airspeed < fixed(-50) || airspeed > fixed(250)))
/* implausible */
return false;
fixed alt = fixed_zero;
if (line.ReadChecked(alt))
/* a dump on a LX7007 has confirmed that the LX sends uncorrected
altitude above 1013.25hPa here */
info.ProvidePressureAltitude(alt);
if (tas_available)
info.ProvideTrueAirspeedWithAltitude(Units::ToSysUnit(airspeed,
Unit::KILOMETER_PER_HOUR),
alt);
if (line.ReadChecked(value))
info.ProvideTotalEnergyVario(value);
line.Skip(6);
SpeedVector wind;
if (ReadSpeedVector(line, wind))
info.ProvideExternalWind(wind);
return true;
}
示例2: IAS
static bool
cLXWP0(NMEAInputLine &line, NMEAInfo &info)
{
/*
$LXWP0,Y,222.3,1665.5,1.71,,,,,,239,174,10.1
0 logger_stored (Y/N)
1 IAS (kph) ----> Condor uses TAS!
2 baroaltitude (m)
3 vario (m/s)
4-8 unknown
9 heading of plane
10 windcourse (deg)
11 windspeed (kph)
*/
fixed value;
line.Skip();
fixed airspeed;
bool tas_available = line.ReadChecked(airspeed);
fixed alt = line.Read(fixed_zero);
if (tas_available)
info.ProvideTrueAirspeedWithAltitude(Units::ToSysUnit(airspeed,
Unit::KILOMETER_PER_HOUR),
alt);
// ToDo check if QNH correction is needed!
info.ProvideBaroAltitudeTrue(alt);
if (line.ReadChecked(value))
info.ProvideTotalEnergyVario(value);
line.Skip(6);
SpeedVector wind;
if (ReadSpeedVector(line, wind))
info.ProvideExternalWind(wind);
return true;
}