Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 10 additions & 56 deletions obc.proto
Original file line number Diff line number Diff line change
@@ -1,51 +1,22 @@
syntax = "proto3";
option go_package = "github.com/tritonuas/gcs/internal/protos";

/**
* Represents the possibe target objects.
* enum has to start with 0.
* (KEEP)
*/
enum ODLCObjects {
Undefined = 0;
Mannequin = 1;
Car = 2;
Motorcycle = 3;
Airplane = 4;
Bus = 5;
Boat = 6;
Stopsign = 7;
Snowboard = 8;
Umbrella = 9;
SoccerBall = 10;
Basketball = 11;
Volleyball = 12;
Football = 13;
Baseballbat = 14;
Mattress = 15;
Tennisracket = 16;
Suitcase = 17;
Skis = 18;
}

/**
* Represents the Airdrop IDs
* Old name: BottleDropIndex
* Old name: AirdropIndex
*/
enum AirdropIndex {
Kaz = 0;
Kimi = 1;
Chris = 2;
Daniel = 3;
enum AirdropType {
Undefined = 0;
Water = 1;
Beacon = 2;
}

/**
* Represents a Bottle/Aidrop Object
* Old name: Bottle
*/
message Airdrop {
AirdropIndex Index = 1; // Unique ID
ODLCObjects Object = 2; // Unique Target
AirdropType Index = 1; // Unique ID
}

/**
Expand All @@ -55,7 +26,7 @@ message Airdrop {
* Don't touch unless you want to break stuff
*/
message AirdropSwap {
AirdropIndex index = 1;
AirdropType index = 1;
}

/**
Expand Down Expand Up @@ -88,9 +59,8 @@ message Mission {
* (MODIFY)
*/
message AirdropTarget {
AirdropIndex Index = 1;
AirdropType Index = 1;
GPSCoord Coordinate = 2;
ODLCObjects Object = 3;
}

/**
Expand All @@ -111,25 +81,9 @@ message IdentifiedTarget {
string Picture = 2;
repeated GPSCoord coordinates = 3;
repeated BboxProto bboxes = 4;
repeated AirdropType target_type = 5;
}

/**
* Represents the results of manual CV matching
* NOTE / TODO:
ok so these protobuf messages should really be refactored a bit
currently the MatchedTarget protobuf message contains both a Bottle and
IdentifiedTarget, which in theory seems fine but gets annoying because
now to make the message to send down here we have to construct an entire IdentifiedTarget
struct and then send that down, when really we should only need to send the id
down because all of the IdentifiedTarget information should have been sent
in the GET /targets/all endpoint

- tyler (old lead)
*/
message MatchedTarget {
Airdrop Airdrop = 1; // Airdrop ID
ODLCObjects Object = 2; // associated object
}

/**
* Represents the connectivity of elements in the OBC.
Expand All @@ -140,7 +94,7 @@ message OBCConnInfo {
float mav_rc_strength = 2;
bool camera_good = 3;
repeated int32 ms_since_ad_heartbeat = 4;
repeated AirdropIndex dropped_airdrop_idx = 5;
repeated AirdropType dropped_airdrop_idx = 5;
}

/**
Expand Down