diff --git a/meshtastic/atak.options b/meshtastic/atak.options new file mode 100644 index 0000000..b567331 --- /dev/null +++ b/meshtastic/atak.options @@ -0,0 +1,4 @@ +*Contact.callsign max_size:120 +*Status.battery int_size:8 +*PLI.course int_size:16 +*GeoChat.message max_size:200 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto new file mode 100644 index 0000000..ae8092e --- /dev/null +++ b/meshtastic/atak.proto @@ -0,0 +1,246 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ATAKProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; +/* + * Packets for the official ATAK Plugin + */ +message TAKPacket +{ + /* + * Are the payloads strings compressed for LoRA transport? + */ + bool is_compressed = 1; + /* + * The contact / callsign for ATAK user + */ + Contact contact = 2; + /* + * The group for ATAK user + */ + Group group = 3; + /* + * The status of the ATAK EUD + */ + Status status = 4; + /* + * The payload of the packet + */ + oneof payload_variant { + /* + * TAK position report + */ + PLI pli = 5; + /* + * ATAK GeoChat message + */ + GeoChat chat = 6; + } +} + +/* + * ATAK GeoChat message + */ +message GeoChat { + /* + * The text message + */ + string message = 1; + + /* + * Uid recipient of the message + */ + optional string to = 2; +} + +/* + * ATAK Group + * <__group role='Team Member' name='Cyan'/> + */ +message Group { + /* + * Role of the group member + */ + MemberRole role = 1; + /* + * Team (color) + * Default Cyan + */ + Team team = 2; +} + +enum Team { + /* + * Unspecifed + */ + Unspecifed_Color = 0; + /* + * White + */ + White = 1; + /* + * Yellow + */ + Yellow = 2; + /* + * Orange + */ + Orange = 3; + /* + * Magenta + */ + Magenta = 4; + /* + * Red + */ + Red = 5; + /* + * Maroon + */ + Maroon = 6; + /* + * Purple + */ + Purple = 7; + /* + * Dark Blue + */ + Dark_Blue = 8; + /* + * Blue + */ + Blue = 9; + /* + * Cyan + */ + Cyan = 10; + /* + * Teal + */ + Teal = 11; + /* + * Green + */ + Green = 12; + /* + * Dark Green + */ + Dark_Green = 13; + /* + * Brown + */ + Brown = 14; +} + +/* + * Role of the group member + */ +enum MemberRole { + /* + * Unspecifed + */ + Unspecifed = 0; + /* + * Team Member + */ + TeamMember = 1; + /* + * Team Lead + */ + TeamLead = 2; + /* + * Headquarters + */ + HQ = 3; + /* + * Airsoft enthusiast + */ + Sniper = 4; + /* + * Medic + */ + Medic = 5; + /* + * ForwardObserver + */ + ForwardObserver = 6; + /* + * Radio Telephone Operator + */ + RTO = 7; + /* + * Doggo + */ + K9 = 8; +} + +/* + * ATAK EUD Status + * + */ +message Status { + /* + * Battery level + */ + uint32 battery = 1; +} +/* + * ATAK Contact + * + */ +message Contact { + /* + * Callsign + */ + string callsign = 1; + /* + * IP address of endpoint in integer form (0.0.0.0 default) + */ + // fixed32 enpoint_address = 3; + /* + * Port of endpoint (4242 default) + */ + // uint32 endpoint_port = 4; + /* + * Phone represented as integer + * Terrible practice, but we really need the wire savings + */ + // uint32 phone = 4; +} + +/* + * Position Location Information from ATAK + */ +message PLI { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 longitude_i = 2; + + /* + * Altitude (ATAK prefers HAE) + */ + uint32 altitude = 3; + + /* + * Speed + */ + uint32 speed = 4; + + /* + * Course in degrees + */ + uint32 course = 5; +} \ No newline at end of file diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index ad8bd71..731b3bc 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -44,7 +44,6 @@ # MyMessage.name max_size:40 # or fixed_length or fixed_count, or max_count - #This value may want to be a few bytes smaller to compensate for the parent fields. *Compressed.data max_size:237 @@ -57,4 +56,4 @@ *MqttClientProxyMessage.topic max_size:60 *MqttClientProxyMessage.data max_size:435 -*MqttClientProxyMessage.text max_size:435 \ No newline at end of file +*MqttClientProxyMessage.text max_size:435 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 3c78229..e6e277f 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1527,4 +1527,5 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} + diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index cd6bced..f781a35 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -184,6 +184,12 @@ enum PortNum { * ENCODING: Protobuf */ NEIGHBORINFO_APP = 71; + + /* + * ATAK Plugin + * Portnum for payloads from the official Meshtastic ATAK plugin + */ + ATAK_PLUGIN = 72; /* * Private applications should use portnums >= 256.