From 10aa3ba940ef176534bbe35bd3cd0bdb9efd199f Mon Sep 17 00:00:00 2001 From: Apoorva Srinivas Appadoo Date: Mon, 20 May 2024 18:04:35 +0200 Subject: [PATCH] WIP: error in parsing --- gen/go/proto/satellite/v1/satellite.pb.go | 244 +++++++++--------- .../proto/satellite/v1/satellite.swagger.json | 11 + go.mod | 2 + go.sum | 10 + proto/satellite/v1/satellite.proto | 1 + service/satelliteservice.go | 46 +++- 6 files changed, 187 insertions(+), 127 deletions(-) diff --git a/gen/go/proto/satellite/v1/satellite.pb.go b/gen/go/proto/satellite/v1/satellite.pb.go index 24b1a8f..5198bf8 100644 --- a/gen/go/proto/satellite/v1/satellite.pb.go +++ b/gen/go/proto/satellite/v1/satellite.pb.go @@ -31,6 +31,7 @@ type Satellite struct { Lat float64 `protobuf:"fixed64,2,opt,name=lat,proto3" json:"lat,omitempty"` Lon float64 `protobuf:"fixed64,3,opt,name=lon,proto3" json:"lon,omitempty"` Altitude float64 `protobuf:"fixed64,4,opt,name=altitude,proto3" json:"altitude,omitempty"` + Velocity float64 `protobuf:"fixed64,5,opt,name=velocity,proto3" json:"velocity,omitempty"` } func (x *Satellite) Reset() { @@ -93,6 +94,13 @@ func (x *Satellite) GetAltitude() float64 { return 0 } +func (x *Satellite) GetVelocity() float64 { + if x != nil { + return x.Velocity + } + return 0 +} + type SatelliteDetail struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -556,128 +564,130 @@ var file_proto_satellite_v1_satellite_proto_rawDesc = []byte{ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x5b, 0x0a, 0x09, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0e, + 0x6f, 0x22, 0x77, 0x0a, 0x09, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xaa, - 0x0a, 0x0a, 0x0f, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x63, 0x73, 0x64, 0x73, 0x5f, 0x6f, 0x6d, 0x6d, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x63, 0x73, 0x64, - 0x73, 0x4f, 0x6d, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x65, 0x6e, 0x74, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x5f, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x65, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x6d, 0x65, 0x61, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x68, - 0x65, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, - 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6d, 0x65, 0x61, 0x6e, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x65, - 0x63, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x65, 0x63, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x63, 0x69, 0x74, 0x79, 0x12, - 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x23, 0x0a, 0x0e, 0x72, 0x61, 0x5f, 0x6f, 0x66, 0x5f, 0x61, 0x73, 0x63, 0x5f, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x61, 0x4f, 0x66, 0x41, - 0x73, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x72, 0x67, 0x5f, 0x6f, 0x66, - 0x5f, 0x70, 0x65, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x61, 0x72, 0x67, 0x4f, 0x66, 0x50, 0x65, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6f, 0x6d, 0x61, - 0x6c, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x61, 0x6e, 0x41, 0x6e, - 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, - 0x69, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, - 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x13, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, - 0x0c, 0x6e, 0x6f, 0x72, 0x61, 0x64, 0x5f, 0x63, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x6f, 0x72, 0x61, 0x64, 0x43, 0x61, 0x74, 0x49, 0x64, 0x12, - 0x24, 0x0a, 0x0e, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6e, - 0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x5f, 0x61, 0x74, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x76, - 0x41, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x73, 0x74, 0x61, 0x72, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x73, 0x74, 0x61, 0x72, 0x12, 0x26, 0x0a, - 0x0f, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x74, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x61, 0x6e, 0x4d, 0x6f, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x6f, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6f, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x6d, 0x65, 0x61, 0x6e, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x64, 0x6f, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6d, 0x69, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x61, 0x78, 0x69, - 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6d, 0x69, 0x6d, 0x61, 0x6a, - 0x6f, 0x72, 0x41, 0x78, 0x69, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x61, 0x70, 0x6f, 0x61, 0x70, 0x73, 0x69, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x61, 0x70, 0x6f, 0x61, 0x70, 0x73, 0x69, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, - 0x72, 0x69, 0x61, 0x70, 0x73, 0x69, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x65, 0x72, 0x69, 0x61, 0x70, 0x73, 0x69, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x63, 0x73, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x63, 0x73, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x75, 0x6e, 0x63, - 0x68, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, - 0x75, 0x6e, 0x63, 0x68, 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x74, 0x65, - 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x64, 0x65, 0x63, 0x61, 0x79, 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x13, 0x0a, 0x05, 0x67, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x67, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, - 0x30, 0x18, 0x26, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x65, - 0x30, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x31, 0x18, 0x27, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x31, 0x12, 0x1b, - 0x0a, 0x09, 0x74, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x32, 0x18, 0x28, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x32, 0x22, 0x4e, 0x0a, 0x1c, 0x47, - 0x65, 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x58, 0x0a, 0x1d, 0x47, - 0x65, 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, - 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x65, 0x6c, - 0x6c, 0x69, 0x74, 0x65, 0x73, 0x32, 0x97, 0x02, 0x0a, 0x10, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, - 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x08, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x22, 0xaa, 0x0a, 0x0a, 0x0f, 0x53, + 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x24, + 0x0a, 0x0e, 0x63, 0x63, 0x73, 0x64, 0x73, 0x5f, 0x6f, 0x6d, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x63, 0x73, 0x64, 0x73, 0x4f, 0x6d, 0x6d, + 0x56, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, + 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, + 0x65, 0x61, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x68, 0x65, 0x6f, 0x72, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x61, + 0x6e, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x63, 0x63, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, + 0x63, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x63, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x69, + 0x6e, 0x63, 0x6c, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, + 0x0e, 0x72, 0x61, 0x5f, 0x6f, 0x66, 0x5f, 0x61, 0x73, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x61, 0x4f, 0x66, 0x41, 0x73, 0x63, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x72, 0x67, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, + 0x72, 0x67, 0x4f, 0x66, 0x50, 0x65, 0x72, 0x69, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x61, 0x6e, 0x41, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, + 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x69, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x70, 0x68, 0x65, 0x6d, + 0x65, 0x72, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6e, 0x6f, 0x72, + 0x61, 0x64, 0x5f, 0x63, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x6e, 0x6f, 0x72, 0x61, 0x64, 0x43, 0x61, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x4e, + 0x6f, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x5f, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x76, 0x41, 0x74, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x73, 0x74, 0x61, 0x72, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x73, 0x74, 0x61, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x65, 0x61, + 0x6e, 0x5f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x74, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x61, 0x6e, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, + 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x64, 0x6f, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x61, + 0x6e, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x64, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, + 0x65, 0x6d, 0x69, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6d, 0x69, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x41, 0x78, + 0x69, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x1b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, + 0x6f, 0x61, 0x70, 0x73, 0x69, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, + 0x6f, 0x61, 0x70, 0x73, 0x69, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x69, 0x61, 0x70, + 0x73, 0x69, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x72, 0x69, 0x61, + 0x70, 0x73, 0x69, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x63, 0x73, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x63, 0x73, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x64, 0x61, + 0x74, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, + 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x74, 0x65, 0x18, 0x22, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x61, 0x79, 0x44, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x67, + 0x70, 0x5f, 0x69, 0x64, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, 0x70, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x30, 0x18, 0x26, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x30, 0x12, 0x1b, 0x0a, + 0x09, 0x74, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x31, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x31, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6c, + 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x32, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x32, 0x22, 0x4e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x61, + 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x58, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x61, + 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x73, 0x61, 0x74, 0x65, + 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, + 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x74, 0x65, + 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, + 0x73, 0x32, 0x97, 0x02, 0x0a, 0x10, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x61, + 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x2a, 0x2e, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x61, 0x74, 0x65, 0x6c, - 0x6c, 0x69, 0x74, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6f, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x12, 0x17, 0x2e, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x1a, 0x1d, 0x2e, - 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x74, - 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x21, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, - 0x69, 0x74, 0x65, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, - 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x73, - 0x75, 0x6b, 0x6f, 0x79, 0x61, 0x63, 0x68, 0x69, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x2d, 0x66, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2d, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2d, 0x73, 0x61, - 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, + 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, + 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6f, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x12, 0x17, 0x2e, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x1a, 0x1d, 0x2e, 0x73, 0x61, 0x74, 0x65, + 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, + 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x2f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x40, 0x5a, 0x3e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x73, 0x75, 0x6b, 0x6f, 0x79, + 0x61, 0x63, 0x68, 0x69, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x2d, 0x66, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x2d, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2d, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, + 0x69, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/openapiv2/proto/satellite/v1/satellite.swagger.json b/gen/openapiv2/proto/satellite/v1/satellite.swagger.json index a92af61..e6a1f12 100644 --- a/gen/openapiv2/proto/satellite/v1/satellite.swagger.json +++ b/gen/openapiv2/proto/satellite/v1/satellite.swagger.json @@ -60,6 +60,13 @@ "required": false, "type": "number", "format": "double" + }, + { + "name": "velocity", + "in": "query", + "required": false, + "type": "number", + "format": "double" } ], "tags": [ @@ -157,6 +164,10 @@ "altitude": { "type": "number", "format": "double" + }, + "velocity": { + "type": "number", + "format": "double" } } }, diff --git a/go.mod b/go.mod index 14a974d..382c1d8 100644 --- a/go.mod +++ b/go.mod @@ -13,9 +13,11 @@ require ( require ( github.com/go-resty/resty/v2 v2.13.1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 + github.com/joshuaferrara/go-satellite v0.0.0-20220611180459-512638c64e5b ) require ( + github.com/pkg/errors v0.9.1 // indirect github.com/stretchr/testify v1.8.4 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect diff --git a/go.sum b/go.sum index 38987ab..7af7637 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,14 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/joshuaferrara/go-satellite v0.0.0-20220611180459-512638c64e5b h1:JlltDRgni6FuoFwluvoZCrE6cmpojccO4WsqeYlFJLE= +github.com/joshuaferrara/go-satellite v0.0.0-20220611180459-512638c64e5b/go.mod h1:msW2QeN9IsnRyvuK8OBAzBwn6DHwXpiAiqBk8dbLfrU= +github.com/onsi/ginkgo v1.2.1-0.20160509182050-5437a97bf824 h1:MbMqwlWoESqhGm4Sslfdyeq7Ww8R9ppeKS5DcO3xDI0= +github.com/onsi/ginkgo v1.2.1-0.20160509182050-5437a97bf824/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20160516222431-c73e51675ad2 h1:38zSYUaJJkzreBjLz7tx4AUTVjnFI7EQBnlRoWt4QFA= +github.com/onsi/gomega v0.0.0-20160516222431-c73e51675ad2/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -76,6 +84,8 @@ google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLp google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.0.0-20160301204022-a83829b6f129 h1:RBgb9aPUbZ9nu66ecQNIBNsA7j3mB5h8PNDIfhPjaJg= +gopkg.in/yaml.v2 v2.0.0-20160301204022-a83829b6f129/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/proto/satellite/v1/satellite.proto b/proto/satellite/v1/satellite.proto index e7c8eb0..c9676c4 100644 --- a/proto/satellite/v1/satellite.proto +++ b/proto/satellite/v1/satellite.proto @@ -10,6 +10,7 @@ message Satellite { double lat = 2; double lon = 3; double altitude = 4; + double velocity = 5; } diff --git a/service/satelliteservice.go b/service/satelliteservice.go index 05529be..5da2159 100644 --- a/service/satelliteservice.go +++ b/service/satelliteservice.go @@ -3,13 +3,16 @@ package service import ( "context" "github.com/go-resty/resty/v2" + "github.com/joshuaferrara/go-satellite" log "github.com/sirupsen/logrus" "github.com/tsukoyachi/react-flight-tracker-satellite/gen/go/proto/satellite/v1" "github.com/tsukoyachi/react-flight-tracker-satellite/spacetrack" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" _ "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/timestamppb" "os" + "time" ) type SatelliteService struct { @@ -106,16 +109,39 @@ func (api SatelliteService) GetSatelliteDetail(ctx context.Context, req *v1.Sate } func (api SatelliteService) GetSatellitePositions(ctx context.Context, req *v1.GetSatellitePositionsRequest) (*v1.GetSatellitePositionsResponse, error) { - // print("GetSatellitePositions") - log.Info(req.GetTime()) + calculatedPositions := make([]*v1.Satellite, 0) + reqTime := req.GetTime() + if reqTime == nil { + reqTime = ×tamppb.Timestamp{ + Seconds: time.Now().Unix(), + Nanos: 0, + } + } + // iterate over api.data + for id, data := range api.data { + log.Info("Calculating position for satellite", id) + log.Info(data.TLE_LINE1, data.TLE_LINE2) + goSat := satellite.TLEToSat(data.TLE_LINE1, data.TLE_LINE2, satellite.GravityWGS84) + // propagate the satellite position + t := time.Unix(reqTime.Seconds, int64(reqTime.Nanos)) + + log.Info(goSat.ErrorStr, goSat.Error) + log.Info(t) + pos, vec := satellite.Propagate(goSat, t.Year(), int(t.Month()), t.Day(), t.Hour(), t.Minute(), t.Second()) + log.Info(pos, vec) + gst := satellite.GSTimeFromDate(t.Year(), int(t.Month()), t.Day(), t.Hour(), t.Minute(), t.Second()) + + // convert Earth Centered Inertial coordinates to Lat/Long + altitude, velocity, ret := satellite.ECIToLLA(pos, gst) + calculatedPositions = append(calculatedPositions, &v1.Satellite{ + Id: id, + Lat: ret.Latitude, + Lon: ret.Longitude, + Altitude: altitude, + Velocity: velocity, + }) + } return &v1.GetSatellitePositionsResponse{ - Satellites: []*v1.Satellite{ - { - Id: "1", - Lat: 0, - Lon: 0, - Altitude: float64(req.GetTime().GetSeconds()), - }, - }, + Satellites: calculatedPositions, }, nil }