4 changed files with 114 additions and 0 deletions
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
|
||||
/airmap_telemetry.pb.* |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
|
||||
// protoc -I=. --cpp_out=. airmap_telemetry.proto |
||||
|
||||
syntax = "proto2"; |
||||
|
||||
package airmap.telemetry; |
||||
|
||||
message Position { |
||||
|
||||
// UNIX time in Milliseconds |
||||
required uint64 timestamp = 1; |
||||
|
||||
// The recorded latitude |
||||
// Decimal place requirement: 7 decimal places. |
||||
required double latitude = 2; |
||||
|
||||
// The recorded longitude |
||||
// Decimal place requirement: 7 decimal places. |
||||
required double longitude = 3; |
||||
|
||||
//Altitude above mean sea level (ie. GPS), meters |
||||
required float altitude_agl = 4; |
||||
|
||||
// Altitude above ground level, meters |
||||
required float altitude_msl = 5; |
||||
|
||||
// Horizontal Dilution of Precision, in meters |
||||
required float horizontal_accuracy = 6; |
||||
} |
||||
|
||||
message Attitude { |
||||
|
||||
// UNIX time in Milliseconds |
||||
required uint64 timestamp = 1; |
||||
|
||||
// Yaw angle measured from True North, { 0 <= x < 360 } degrees |
||||
required float yaw = 2; |
||||
|
||||
// Pitch angle, { -180 < x <= 180 } degrees |
||||
required float pitch = 3; |
||||
|
||||
// Roll angle, { -180 < x <= 180 } degrees |
||||
required float roll = 4; |
||||
} |
||||
|
||||
message Speed { |
||||
|
||||
// UNIX time in Milliseconds |
||||
required uint64 timestamp = 1; |
||||
|
||||
// Aircraft Speed in the x direction in meters per second using the North-East-Down (N-E-D) coordinate system |
||||
required float velocity_x = 2; |
||||
|
||||
// Aircraft Speed in the y direction in meters per second using the North-East-Down (N-E-D) coordinate system |
||||
required float velocity_y = 3; |
||||
|
||||
// Aircraft Speed in the z direction in meters per second using the North-East-Down (N-E-D) coordinate system |
||||
required float velocity_z = 4; |
||||
} |
||||
|
||||
message Barometer { |
||||
|
||||
// UNIX time in Milliseconds |
||||
required uint64 timestamp = 1; |
||||
|
||||
// Barometric pressure in hPa |
||||
required float pressure = 2; |
||||
} |
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
# Qt qmake integration with Google Protocol Buffers compiler protoc |
||||
# |
||||
# To compile protocol buffers with qt qmake, specify PROTOS variable and |
||||
# include this file |
||||
# |
||||
# Example: |
||||
# BITSIZE = $$system(getconf LONG_BIT) |
||||
# if (contains(BITSIZE, 64)) { |
||||
# LIBS += /usr/lib/x86_64-linux-gnu/libprotobuf.so |
||||
# } |
||||
# if (contains(BITSIZE, 32)) { |
||||
# LIBS += /usr/lib/libprotobuf.so |
||||
# } |
||||
# PROTOS = a.proto b.proto |
||||
# include(protobuf.pri) |
||||
# |
||||
# By default protoc looks for .proto files (including the imported ones) in |
||||
# the current directory where protoc is run. If you need to include additional |
||||
# paths specify the PROTOPATH variable |
||||
|
||||
message("Generating protocol buffer classes from .proto files.") |
||||
|
||||
INCLUDEPATH += $$PWD |
||||
DEPENDPATH += $$PWD |
||||
|
||||
protobuf_decl.name = protobuf headers |
||||
protobuf_decl.input = PROTOS |
||||
protobuf_decl.output = ${QMAKE_FILE_IN_PATH}/${QMAKE_FILE_BASE}.pb.h |
||||
protobuf_decl.commands = protoc --cpp_out=${QMAKE_FILE_IN_PATH} --proto_path=${QMAKE_FILE_IN_PATH} ${QMAKE_FILE_NAME} |
||||
protobuf_decl.variable_out = HEADERS |
||||
QMAKE_EXTRA_COMPILERS += protobuf_decl |
||||
|
||||
protobuf_impl.name = protobuf sources |
||||
protobuf_impl.input = PROTOS |
||||
protobuf_impl.output = ${QMAKE_FILE_IN_PATH}/${QMAKE_FILE_BASE}.pb.cc |
||||
protobuf_impl.depends = ${QMAKE_FILE_IN_PATH}/${QMAKE_FILE_BASE}.pb.h |
||||
protobuf_impl.commands = $$escape_expand(\n) |
||||
protobuf_impl.variable_out = SOURCES |
||||
QMAKE_EXTRA_COMPILERS += protobuf_impl |
Loading…
Reference in new issue