Fact Groups¶
Fact groups are collections of related Fact objects exposed as sub-objects on the Vehicle. Each group provides telemetry data for a specific subsystem.
Access pattern: vehicle.<group>.<fact>.value
// GPS satellite count
vehicle.gps.count.value
// Battery voltage as formatted string
vehicle.battery1.voltage.valueString
// Wind direction in degrees
vehicle.wind.direction.value
See Fact System for how to work with individual Fact objects.
GPS¶
Type: VehicleGPSFactGroup
Access: vehicle.gps (active GPS), vehicle.gps1, vehicle.gps2
| Fact | Type | Description |
|---|---|---|
hdop |
Fact* |
Horizontal dilution of precision |
vdop |
Fact* |
Vertical dilution of precision |
courseOverGround |
Fact* |
Course over ground (degrees) |
count |
Fact* |
Number of satellites |
lock |
Fact* |
GPS fix type |
mgrs |
Fact* |
MGRS coordinate string |
hacc |
Fact* |
Horizontal accuracy (meters) |
vacc |
Fact* |
Vertical accuracy (meters) |
Additional properties (not Facts):
| Property | Type | Description |
|---|---|---|
rawGpsCoord |
QGeoCoordinate |
Raw GPS coordinate |
rawGpsCoordValid |
bool |
True if raw coordinate is valid |
timestamp |
quint64 |
GPS timestamp |
inUse |
bool |
True if this GPS is currently in use |
timedOut |
bool |
True if GPS data has timed out |
Example¶
Column {
QGCLabel { text: "Satellites: " + vehicle.gps.count.valueString }
QGCLabel { text: "HDOP: " + vehicle.gps.hdop.valueString }
QGCLabel { text: "Fix: " + vehicle.gps.lock.valueString }
QGCLabel {
text: "COG: " + vehicle.gps.courseOverGround.value.toFixed(1) + "°"
}
}
Battery¶
Type: VehicleBatteryFactGroup
Access: vehicle.battery1, vehicle.battery2, vehicle.battery3
| Fact | Type | Description |
|---|---|---|
voltage |
Fact* |
Battery voltage (V) |
percentRemaining |
Fact* |
Remaining charge (%) |
mahConsumed |
Fact* |
Milliamp-hours consumed |
current |
Fact* |
Current draw (A) |
temperature |
Fact* |
Battery temperature |
instantPower |
Fact* |
Instantaneous power (W) |
timeRemaining |
Fact* |
Estimated time remaining |
chargeState |
Fact* |
Charge state (see BatteryChargeState enum) |
mode |
Fact* |
Battery mode |
fault |
Fact* |
Fault code |
cycleCount |
Fact* |
Charge cycle count |
Additional properties:
| Property | Type | Description |
|---|---|---|
additionalDetailsAvailable |
bool |
True if extended battery info is available |
batteryFaultStrings |
QStringList |
Human-readable fault descriptions |
Example¶
Row {
spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { text: "Battery:" }
QGCLabel {
text: vehicle.battery1.percentRemaining.valueString
color: {
var pct = vehicle.battery1.percentRemaining.value
if (pct < 20) return qgcPal.colorRed
if (pct < 50) return qgcPal.colorOrange
return qgcPal.text
}
}
QGCLabel { text: vehicle.battery1.voltage.valueString }
}
Wind¶
Type: VehicleWindFactGroup
Access: vehicle.wind
| Fact | Type | Description |
|---|---|---|
direction |
Fact* |
Wind direction (degrees) |
speed |
Fact* |
Wind speed |
verticalSpeed |
Fact* |
Vertical wind speed |
Example¶
QGCLabel {
text: "Wind: " + vehicle.wind.speed.valueString +
" from " + vehicle.wind.direction.value.toFixed(0) + "°"
}
Vibration¶
Type: VehicleVibrationFactGroup
Access: vehicle.vibration
| Fact | Type | Description |
|---|---|---|
xAxis |
Fact* |
X-axis vibration level |
yAxis |
Fact* |
Y-axis vibration level |
zAxis |
Fact* |
Z-axis vibration level |
clipCount1 |
Fact* |
Accelerometer 1 clip count |
clipCount2 |
Fact* |
Accelerometer 2 clip count |
clipCount3 |
Fact* |
Accelerometer 3 clip count |
Temperature¶
Type: VehicleTemperatureFactGroup
Access: vehicle.temperature
| Fact | Type | Description |
|---|---|---|
temperature1 |
Fact* |
Temperature sensor 1 |
temperature2 |
Fact* |
Temperature sensor 2 |
temperature3 |
Fact* |
Temperature sensor 3 |
Clock¶
Type: VehicleClockFactGroup
Access: vehicle.clock
| Fact | Type | Description |
|---|---|---|
currentTime |
Fact* |
Current time |
currentDate |
Fact* |
Current date |
Setpoint¶
Type: VehicleSetpointFactGroup
Access: vehicle.setpoint
| Fact | Type | Description |
|---|---|---|
roll |
Fact* |
Roll setpoint (degrees) |
pitch |
Fact* |
Pitch setpoint (degrees) |
yaw |
Fact* |
Yaw setpoint (degrees) |
rollRate |
Fact* |
Roll rate setpoint (deg/s) |
pitchRate |
Fact* |
Pitch rate setpoint (deg/s) |
yawRate |
Fact* |
Yaw rate setpoint (deg/s) |
Distance Sensor¶
Type: VehicleDistanceSensorFactGroup
Access: vehicle.distanceSensor
| Fact | Type | Description |
|---|---|---|
rotationNone |
Fact* |
Forward distance |
rotationYaw45 |
Fact* |
Distance at 45° yaw |
rotationYaw90 |
Fact* |
Right distance |
rotationYaw135 |
Fact* |
Distance at 135° yaw |
rotationYaw180 |
Fact* |
Rear distance |
rotationYaw225 |
Fact* |
Distance at 225° yaw |
rotationYaw270 |
Fact* |
Left distance |
rotationYaw315 |
Fact* |
Distance at 315° yaw |
rotationPitch90 |
Fact* |
Downward distance |
rotationPitch270 |
Fact* |
Upward distance |
currentDistance |
Fact* |
Current active distance reading |
signalQuality |
Fact* |
Signal quality (0-100) |
maxDistance |
Fact* |
Maximum sensor range |
Cellular Status¶
Type: VehicleCellularStatusFactGroup
Access: vehicle.cellularStatus
| Fact | Type | Description |
|---|---|---|
quality |
Fact* |
Signal quality |
accessTechnology |
Fact* |
Access technology (LTE, 5G, etc.) |
status |
Fact* |
Modem status |
failureReason |
Fact* |
Failure reason code |
uplinkRate |
Fact* |
Upload rate |
downlinkRate |
Fact* |
Download rate |
Terrain¶
Type: TerrainFactGroup
Access: vehicle.terrain
| Fact | Type | Description |
|---|---|---|
blocksPending |
Fact* |
Number of terrain blocks pending download |
blocksLoaded |
Fact* |
Number of terrain blocks loaded |