Skip to content

Commit

Permalink
add carbon data struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetnow committed Nov 4, 2024
1 parent 1606b56 commit 196086f
Show file tree
Hide file tree
Showing 21 changed files with 2,024 additions and 223 deletions.
24 changes: 24 additions & 0 deletions city/person/v2/carbon.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

package city.person.v2;

// 车辆瞬时碳排放信息
// Vehicle instantaneous carbon emission information
message VehicleCarbon {
// ID
int32 id = 1;
// delta distance (m)
double ds = 2;
// vehicle speed (m/s)
double v = 3;
// vehicle acceleration (m/s^2)
double a = 4;
// energy for acceleration (J)
double u_acc = 5;
// energy for rolling resistance (J)
double u_roll = 6;
// energy for air resistance (J)
double u_aero = 7;
// C_D: drag coefficient
double c_d = 8;
}
4 changes: 4 additions & 0 deletions city/person/v2/vehicle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package city.person.v2;

import "city/person/v2/carbon.proto";
import "city/person/v2/motion.proto";
import "city/routing/v2/routing.proto";

Expand Down Expand Up @@ -75,6 +76,9 @@ message VehicleRuntime {
// 自由流下的预计到达时刻
// estimated arrival time under free flow
double eta_free_flow = 10;
// 碳排放信息
// carbon emission information
optional VehicleCarbon carbon = 11;
}

enum VehicleRelation {
Expand Down
29 changes: 29 additions & 0 deletions cpp/city/person/v2/carbon.grpc.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions cpp/city/person/v2/carbon.grpc.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 196086f

Please sign in to comment.