legacy.capnp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. using Cxx = import "./include/c++.capnp";
  2. $Cxx.namespace("cereal");
  3. @0x80ef1ec4889c2a63;
  4. # legacy.capnp: a home for deprecated structs
  5. struct LogRotate @0x9811e1f38f62f2d1 {
  6. segmentNum @0 :Int32;
  7. path @1 :Text;
  8. }
  9. struct LiveUI @0xc08240f996aefced {
  10. rearViewCam @0 :Bool;
  11. alertText1 @1 :Text;
  12. alertText2 @2 :Text;
  13. awarenessStatus @3 :Float32;
  14. }
  15. struct UiLayoutState @0x88dcce08ad29dda0 {
  16. activeApp @0 :App;
  17. sidebarCollapsed @1 :Bool;
  18. mapEnabled @2 :Bool;
  19. mockEngaged @3 :Bool;
  20. enum App @0x9917470acf94d285 {
  21. home @0;
  22. music @1;
  23. nav @2;
  24. settings @3;
  25. none @4;
  26. }
  27. }
  28. struct OrbslamCorrection @0x8afd33dc9b35e1aa {
  29. correctionMonoTime @0 :UInt64;
  30. prePositionECEF @1 :List(Float64);
  31. postPositionECEF @2 :List(Float64);
  32. prePoseQuatECEF @3 :List(Float32);
  33. postPoseQuatECEF @4 :List(Float32);
  34. numInliers @5 :UInt32;
  35. }
  36. struct EthernetPacket @0xa99a9d5b33cf5859 {
  37. pkt @0 :Data;
  38. ts @1 :Float32;
  39. }
  40. struct CellInfo @0xcff7566681c277ce {
  41. timestamp @0 :UInt64;
  42. repr @1 :Text; # android toString() for now
  43. }
  44. struct WifiScan @0xd4df5a192382ba0b {
  45. bssid @0 :Text;
  46. ssid @1 :Text;
  47. capabilities @2 :Text;
  48. frequency @3 :Int32;
  49. level @4 :Int32;
  50. timestamp @5 :Int64;
  51. centerFreq0 @6 :Int32;
  52. centerFreq1 @7 :Int32;
  53. channelWidth @8 :ChannelWidth;
  54. operatorFriendlyName @9 :Text;
  55. venueName @10 :Text;
  56. is80211mcResponder @11 :Bool;
  57. passpoint @12 :Bool;
  58. distanceCm @13 :Int32;
  59. distanceSdCm @14 :Int32;
  60. enum ChannelWidth @0xcb6a279f015f6b51 {
  61. w20Mhz @0;
  62. w40Mhz @1;
  63. w80Mhz @2;
  64. w160Mhz @3;
  65. w80Plus80Mhz @4;
  66. }
  67. }
  68. struct LiveEventData @0x94b7baa90c5c321e {
  69. name @0 :Text;
  70. value @1 :Int32;
  71. }
  72. struct ModelData @0xb8aad62cffef28a9 {
  73. frameId @0 :UInt32;
  74. frameAge @12 :UInt32;
  75. frameDropPerc @13 :Float32;
  76. timestampEof @9 :UInt64;
  77. modelExecutionTime @14 :Float32;
  78. gpuExecutionTime @16 :Float32;
  79. rawPred @15 :Data;
  80. path @1 :PathData;
  81. leftLane @2 :PathData;
  82. rightLane @3 :PathData;
  83. lead @4 :LeadData;
  84. freePath @6 :List(Float32);
  85. settings @5 :ModelSettings;
  86. leadFuture @7 :LeadData;
  87. speed @8 :List(Float32);
  88. meta @10 :MetaData;
  89. longitudinal @11 :LongitudinalData;
  90. struct PathData @0x8817eeea389e9f08 {
  91. points @0 :List(Float32);
  92. prob @1 :Float32;
  93. std @2 :Float32;
  94. stds @3 :List(Float32);
  95. poly @4 :List(Float32);
  96. validLen @5 :Float32;
  97. }
  98. struct LeadData @0xd1c9bef96d26fa91 {
  99. dist @0 :Float32;
  100. prob @1 :Float32;
  101. std @2 :Float32;
  102. relVel @3 :Float32;
  103. relVelStd @4 :Float32;
  104. relY @5 :Float32;
  105. relYStd @6 :Float32;
  106. relA @7 :Float32;
  107. relAStd @8 :Float32;
  108. }
  109. struct ModelSettings @0xa26e3710efd3e914 {
  110. bigBoxX @0 :UInt16;
  111. bigBoxY @1 :UInt16;
  112. bigBoxWidth @2 :UInt16;
  113. bigBoxHeight @3 :UInt16;
  114. boxProjection @4 :List(Float32);
  115. yuvCorrection @5 :List(Float32);
  116. inputTransform @6 :List(Float32);
  117. }
  118. struct MetaData @0x9744f25fb60f2bf8 {
  119. engagedProb @0 :Float32;
  120. desirePrediction @1 :List(Float32);
  121. brakeDisengageProb @2 :Float32;
  122. gasDisengageProb @3 :Float32;
  123. steerOverrideProb @4 :Float32;
  124. desireState @5 :List(Float32);
  125. }
  126. struct LongitudinalData @0xf98f999c6a071122 {
  127. distances @2 :List(Float32);
  128. speeds @0 :List(Float32);
  129. accelerations @1 :List(Float32);
  130. }
  131. }
  132. struct ECEFPoint @0xc25bbbd524983447 {
  133. x @0 :Float64;
  134. y @1 :Float64;
  135. z @2 :Float64;
  136. }
  137. struct ECEFPointDEPRECATED @0xe10e21168db0c7f7 {
  138. x @0 :Float32;
  139. y @1 :Float32;
  140. z @2 :Float32;
  141. }
  142. struct GPSPlannerPoints @0xab54c59699f8f9f3 {
  143. curPosDEPRECATED @0 :ECEFPointDEPRECATED;
  144. pointsDEPRECATED @1 :List(ECEFPointDEPRECATED);
  145. curPos @6 :ECEFPoint;
  146. points @7 :List(ECEFPoint);
  147. valid @2 :Bool;
  148. trackName @3 :Text;
  149. speedLimit @4 :Float32;
  150. accelTarget @5 :Float32;
  151. }
  152. struct GPSPlannerPlan @0xf5ad1d90cdc1dd6b {
  153. valid @0 :Bool;
  154. poly @1 :List(Float32);
  155. trackName @2 :Text;
  156. speed @3 :Float32;
  157. acceleration @4 :Float32;
  158. pointsDEPRECATED @5 :List(ECEFPointDEPRECATED);
  159. points @6 :List(ECEFPoint);
  160. xLookahead @7 :Float32;
  161. }
  162. struct UiNavigationEvent @0x90c8426c3eaddd3b {
  163. type @0: Type;
  164. status @1: Status;
  165. distanceTo @2: Float32;
  166. endRoadPointDEPRECATED @3: ECEFPointDEPRECATED;
  167. endRoadPoint @4: ECEFPoint;
  168. enum Type @0xe8db07dcf8fcea05 {
  169. none @0;
  170. laneChangeLeft @1;
  171. laneChangeRight @2;
  172. mergeLeft @3;
  173. mergeRight @4;
  174. turnLeft @5;
  175. turnRight @6;
  176. }
  177. enum Status @0xb9aa88c75ef99a1f {
  178. none @0;
  179. passive @1;
  180. approaching @2;
  181. active @3;
  182. }
  183. }
  184. struct LiveLocationData @0xb99b2bc7a57e8128 {
  185. status @0 :UInt8;
  186. # 3D fix
  187. lat @1 :Float64;
  188. lon @2 :Float64;
  189. alt @3 :Float32; # m
  190. # speed
  191. speed @4 :Float32; # m/s
  192. # NED velocity components
  193. vNED @5 :List(Float32);
  194. # roll, pitch, heading (x,y,z)
  195. roll @6 :Float32; # WRT to center of earth?
  196. pitch @7 :Float32; # WRT to center of earth?
  197. heading @8 :Float32; # WRT to north?
  198. # what are these?
  199. wanderAngle @9 :Float32;
  200. trackAngle @10 :Float32;
  201. # car frame -- https://upload.wikimedia.org/wikipedia/commons/f/f5/RPY_angles_of_cars.png
  202. # gyro, in car frame, deg/s
  203. gyro @11 :List(Float32);
  204. # accel, in car frame, m/s^2
  205. accel @12 :List(Float32);
  206. accuracy @13 :Accuracy;
  207. source @14 :SensorSource;
  208. # if we are fixing a location in the past
  209. fixMonoTime @15 :UInt64;
  210. gpsWeek @16 :Int32;
  211. timeOfWeek @17 :Float64;
  212. positionECEF @18 :List(Float64);
  213. poseQuatECEF @19 :List(Float32);
  214. pitchCalibration @20 :Float32;
  215. yawCalibration @21 :Float32;
  216. imuFrame @22 :List(Float32);
  217. struct Accuracy @0x943dc4625473b03f {
  218. pNEDError @0 :List(Float32);
  219. vNEDError @1 :List(Float32);
  220. rollError @2 :Float32;
  221. pitchError @3 :Float32;
  222. headingError @4 :Float32;
  223. ellipsoidSemiMajorError @5 :Float32;
  224. ellipsoidSemiMinorError @6 :Float32;
  225. ellipsoidOrientationError @7 :Float32;
  226. }
  227. enum SensorSource @0xc871d3cc252af657 {
  228. applanix @0;
  229. kalman @1;
  230. orbslam @2;
  231. timing @3;
  232. dummy @4;
  233. }
  234. }
  235. struct OrbOdometry @0xd7700859ed1f5b76 {
  236. # timing first
  237. startMonoTime @0 :UInt64;
  238. endMonoTime @1 :UInt64;
  239. # fundamental matrix and error
  240. f @2: List(Float64);
  241. err @3: Float64;
  242. # number of inlier points
  243. inliers @4: Int32;
  244. # for debug only
  245. # indexed by endMonoTime features
  246. # value is startMonoTime feature match
  247. # -1 if no match
  248. matches @5: List(Int16);
  249. }
  250. struct OrbFeatures @0xcd60164a8a0159ef {
  251. timestampEof @0 :UInt64;
  252. # transposed arrays of normalized image coordinates
  253. # len(xs) == len(ys) == len(descriptors) * 32
  254. xs @1 :List(Float32);
  255. ys @2 :List(Float32);
  256. descriptors @3 :Data;
  257. octaves @4 :List(Int8);
  258. # match index to last OrbFeatures
  259. # -1 if no match
  260. timestampLastEof @5 :UInt64;
  261. matches @6: List(Int16);
  262. }
  263. struct OrbFeaturesSummary @0xd500d30c5803fa4f {
  264. timestampEof @0 :UInt64;
  265. timestampLastEof @1 :UInt64;
  266. featureCount @2 :UInt16;
  267. matchCount @3 :UInt16;
  268. computeNs @4 :UInt64;
  269. }
  270. struct OrbKeyFrame @0xc8233c0345e27e24 {
  271. # this is a globally unique id for the KeyFrame
  272. id @0: UInt64;
  273. # this is the location of the KeyFrame
  274. pos @1: ECEFPoint;
  275. # these are the features in the world
  276. # len(dpos) == len(descriptors) * 32
  277. dpos @2 :List(ECEFPoint);
  278. descriptors @3 :Data;
  279. }
  280. struct KalmanOdometry @0x92e21bb7ea38793a {
  281. trans @0 :List(Float32); # m/s in device frame
  282. rot @1 :List(Float32); # rad/s in device frame
  283. transStd @2 :List(Float32); # std m/s in device frame
  284. rotStd @3 :List(Float32); # std rad/s in device frame
  285. }
  286. struct OrbObservation @0x9b326d4e436afec7 {
  287. observationMonoTime @0 :UInt64;
  288. normalizedCoordinates @1 :List(Float32);
  289. locationECEF @2 :List(Float64);
  290. matchDistance @3: UInt32;
  291. }
  292. struct CalibrationFeatures @0x8fdfadb254ea867a {
  293. frameId @0 :UInt32;
  294. p0 @1 :List(Float32);
  295. p1 @2 :List(Float32);
  296. status @3 :List(Int8);
  297. }
  298. struct NavStatus @0xbd8822120928120c {
  299. isNavigating @0 :Bool;
  300. currentAddress @1 :Address;
  301. struct Address @0xce7cd672cacc7814 {
  302. title @0 :Text;
  303. lat @1 :Float64;
  304. lng @2 :Float64;
  305. house @3 :Text;
  306. address @4 :Text;
  307. street @5 :Text;
  308. city @6 :Text;
  309. state @7 :Text;
  310. country @8 :Text;
  311. }
  312. }
  313. struct NavUpdate @0xdb98be6565516acb {
  314. isNavigating @0 :Bool;
  315. curSegment @1 :Int32;
  316. segments @2 :List(Segment);
  317. struct LatLng @0x9eaef9187cadbb9b {
  318. lat @0 :Float64;
  319. lng @1 :Float64;
  320. }
  321. struct Segment @0xa5b39b4fc4d7da3f {
  322. from @0 :LatLng;
  323. to @1 :LatLng;
  324. updateTime @2 :Int32;
  325. distance @3 :Int32;
  326. crossTime @4 :Int32;
  327. exitNo @5 :Int32;
  328. instruction @6 :Instruction;
  329. parts @7 :List(LatLng);
  330. enum Instruction @0xc5417a637451246f {
  331. turnLeft @0;
  332. turnRight @1;
  333. keepLeft @2;
  334. keepRight @3;
  335. straight @4;
  336. roundaboutExitNumber @5;
  337. roundaboutExit @6;
  338. roundaboutTurnLeft @7;
  339. unkn8 @8;
  340. roundaboutStraight @9;
  341. unkn10 @10;
  342. roundaboutTurnRight @11;
  343. unkn12 @12;
  344. roundaboutUturn @13;
  345. unkn14 @14;
  346. arrive @15;
  347. exitLeft @16;
  348. exitRight @17;
  349. unkn18 @18;
  350. uturn @19;
  351. # ...
  352. }
  353. }
  354. }
  355. struct TrafficEvent @0xacfa74a094e62626 {
  356. type @0 :Type;
  357. distance @1 :Float32;
  358. action @2 :Action;
  359. resuming @3 :Bool;
  360. enum Type @0xd85d75253435bf4b {
  361. stopSign @0;
  362. lightRed @1;
  363. lightYellow @2;
  364. lightGreen @3;
  365. stopLight @4;
  366. }
  367. enum Action @0xa6f6ce72165ccb49 {
  368. none @0;
  369. yield @1;
  370. stop @2;
  371. resumeReady @3;
  372. }
  373. }
  374. struct AndroidGnss @0xdfdf30d03fc485bd {
  375. union {
  376. measurements @0 :Measurements;
  377. navigationMessage @1 :NavigationMessage;
  378. }
  379. struct Measurements @0xa20710d4f428d6cd {
  380. clock @0 :Clock;
  381. measurements @1 :List(Measurement);
  382. struct Clock @0xa0e27b453a38f450 {
  383. timeNanos @0 :Int64;
  384. hardwareClockDiscontinuityCount @1 :Int32;
  385. hasTimeUncertaintyNanos @2 :Bool;
  386. timeUncertaintyNanos @3 :Float64;
  387. hasLeapSecond @4 :Bool;
  388. leapSecond @5 :Int32;
  389. hasFullBiasNanos @6 :Bool;
  390. fullBiasNanos @7 :Int64;
  391. hasBiasNanos @8 :Bool;
  392. biasNanos @9 :Float64;
  393. hasBiasUncertaintyNanos @10 :Bool;
  394. biasUncertaintyNanos @11 :Float64;
  395. hasDriftNanosPerSecond @12 :Bool;
  396. driftNanosPerSecond @13 :Float64;
  397. hasDriftUncertaintyNanosPerSecond @14 :Bool;
  398. driftUncertaintyNanosPerSecond @15 :Float64;
  399. }
  400. struct Measurement @0xd949bf717d77614d {
  401. svId @0 :Int32;
  402. constellation @1 :Constellation;
  403. timeOffsetNanos @2 :Float64;
  404. state @3 :Int32;
  405. receivedSvTimeNanos @4 :Int64;
  406. receivedSvTimeUncertaintyNanos @5 :Int64;
  407. cn0DbHz @6 :Float64;
  408. pseudorangeRateMetersPerSecond @7 :Float64;
  409. pseudorangeRateUncertaintyMetersPerSecond @8 :Float64;
  410. accumulatedDeltaRangeState @9 :Int32;
  411. accumulatedDeltaRangeMeters @10 :Float64;
  412. accumulatedDeltaRangeUncertaintyMeters @11 :Float64;
  413. hasCarrierFrequencyHz @12 :Bool;
  414. carrierFrequencyHz @13 :Float32;
  415. hasCarrierCycles @14 :Bool;
  416. carrierCycles @15 :Int64;
  417. hasCarrierPhase @16 :Bool;
  418. carrierPhase @17 :Float64;
  419. hasCarrierPhaseUncertainty @18 :Bool;
  420. carrierPhaseUncertainty @19 :Float64;
  421. hasSnrInDb @20 :Bool;
  422. snrInDb @21 :Float64;
  423. multipathIndicator @22 :MultipathIndicator;
  424. enum Constellation @0x9ef1f3ff0deb5ffb {
  425. unknown @0;
  426. gps @1;
  427. sbas @2;
  428. glonass @3;
  429. qzss @4;
  430. beidou @5;
  431. galileo @6;
  432. }
  433. enum State @0xcbb9490adce12d72 {
  434. unknown @0;
  435. codeLock @1;
  436. bitSync @2;
  437. subframeSync @3;
  438. towDecoded @4;
  439. msecAmbiguous @5;
  440. symbolSync @6;
  441. gloStringSync @7;
  442. gloTodDecoded @8;
  443. bdsD2BitSync @9;
  444. bdsD2SubframeSync @10;
  445. galE1bcCodeLock @11;
  446. galE1c2ndCodeLock @12;
  447. galE1bPageSync @13;
  448. sbasSync @14;
  449. }
  450. enum MultipathIndicator @0xc04e7b6231d4caa8 {
  451. unknown @0;
  452. detected @1;
  453. notDetected @2;
  454. }
  455. }
  456. }
  457. struct NavigationMessage @0xe2517b083095fd4e {
  458. type @0 :Int32;
  459. svId @1 :Int32;
  460. messageId @2 :Int32;
  461. submessageId @3 :Int32;
  462. data @4 :Data;
  463. status @5 :Status;
  464. enum Status @0xec1ff7996b35366f {
  465. unknown @0;
  466. parityPassed @1;
  467. parityRebuilt @2;
  468. }
  469. }
  470. }
  471. struct LidarPts @0xe3d6685d4e9d8f7a {
  472. r @0 :List(UInt16); # uint16 m*500.0
  473. theta @1 :List(UInt16); # uint16 deg*100.0
  474. reflect @2 :List(UInt8); # uint8 0-255
  475. # For storing out of file.
  476. idx @3 :UInt64;
  477. # For storing in file
  478. pkt @4 :Data;
  479. }