I am looking for a function that takes the vehicle’s current GPS value as a QGC.
This code seems to be related.
src/FlightMap.qml
// Update ground station position
Connections {
target: QGroundControl.qgcPositionManger
onLastPositionUpdated: {
if (valid && lastPosition.latitude && Math.abs(lastPosition.latitude) > 0.001 && lastPosition.longitude && Math.abs(lastPosition.longitude) > 0.001) {
gcsPosition = QtPositioning.coordinate(lastPosition.latitude,lastPosition.longitude)
if (!firstGCSPositionReceived && !firstVehiclePositionReceived && allowGCSLocationCenter) {
firstGCSPositionReceived = true
center = gcsPosition
zoomLevel = QGroundControl.flightMapInitialZoom
}
}
}
}
But I do not know where “lastPosition” is set.
Somebody save me