本文整理汇总了C++中NMEAInfo::ProvideIndicatedAirspeed方法的典型用法代码示例。如果您正苦于以下问题:C++ NMEAInfo::ProvideIndicatedAirspeed方法的具体用法?C++ NMEAInfo::ProvideIndicatedAirspeed怎么用?C++ NMEAInfo::ProvideIndicatedAirspeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NMEAInfo
的用法示例。
在下文中一共展示了NMEAInfo::ProvideIndicatedAirspeed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static bool
ParsePITV3(NMEAInputLine &line, NMEAInfo &info)
{
fixed value;
// bank angle [degrees, positive right]
if (line.ReadChecked(value)) {
info.attitude.bank_angle_available.Update(info.clock);
info.attitude.bank_angle = Angle::Degrees(value);
}
// pitch angle [degrees, positive up]
if (line.ReadChecked(value)) {
info.attitude.pitch_angle_available.Update(info.clock);
info.attitude.pitch_angle = Angle::Degrees(value);
}
// heading [degrees]
if (line.ReadChecked(value)) {
info.attitude.heading_available.Update(info.clock);
info.attitude.heading = Angle::Degrees(value);
}
// IAS [m/s]
if (line.ReadChecked(value)) {
info.ProvideIndicatedAirspeed(value);
}
// Load factor [g]
if (line.ReadChecked(value)) {
info.acceleration.ProvideGLoad(value, true);
}
return true;
}
示例2:
/**
* Parse a "$PDGFTL1" sentence.
*
* Example: "$PDGFTL1,2025,2000,250,-14,45,134,28,65,382,153*3D"
*/
static bool
PDGFTL1(NMEAInputLine &line, NMEAInfo &info)
{
double value;
// Baro Altitude QNE(1013.25) 2025 meter 2025 mt
if (line.ReadChecked(value))
info.ProvidePressureAltitude(value);
// Baro Altitude QNH 2000 meter 2000 mt
if (line.ReadChecked(value))
info.ProvideBaroAltitudeTrue(value);
// Vario 250 cm/sec +2,50 m/s
if (line.ReadChecked(value))
info.ProvideTotalEnergyVario(value / 100);
// Netto Vario -14 dm/sec -1,40 m/s
if (line.ReadChecked(value))
info.ProvideNettoVario(value / 10);
// Indicated Air Speed 45 km/h 45 km/h
if (line.ReadChecked(value))
info.ProvideIndicatedAirspeed(Units::ToSysUnit(value, Unit::KILOMETER_PER_HOUR));
// Ground Efficiency 134 ratio 13,4 : 1
line.Skip();
// Wind Speed 28 km/h 28 km/h
// Wind Direction 65 degree 65 degree
SpeedVector wind;
if (ReadSpeedVector(line, wind))
info.ProvideExternalWind(wind);
// Main Lithium Battery Voltage 382 0.01 volts 3,82 volts
if (line.ReadChecked(value)) {
info.voltage = value / 100;
info.voltage_available.Update(info.clock);
}
// Backup AA Battery Voltage 153 0.01 volts 1,53 volts
return true;
}