From 918bdd83944500ff99ff0acfba5e8c842ca103cb Mon Sep 17 00:00:00 2001 From: Roman Shtylman Date: Tue, 9 May 2023 17:55:00 -0700 Subject: [PATCH] feedback --- internal/schemas.ts | 17 ++++++++++++----- ros_foxglove_msgs/ros1/LocationFix.msg | 6 +++--- ros_foxglove_msgs/ros2/LocationFix.msg | 6 +++--- schemas/README.md | 12 ++++++------ schemas/flatbuffer/LocationFix.fbs | 6 +++--- schemas/jsonschema/LocationFix.json | 8 ++++---- schemas/jsonschema/index.ts | 8 ++++---- schemas/proto/foxglove/LocationFix.proto | 18 +++++++++--------- schemas/ros1/LocationFix.msg | 6 +++--- schemas/ros2/LocationFix.msg | 6 +++--- schemas/typescript/LocationFix.ts | 6 +++--- 11 files changed, 53 insertions(+), 46 deletions(-) diff --git a/internal/schemas.ts b/internal/schemas.ts index a35a913..05ca496 100644 --- a/internal/schemas.ts +++ b/internal/schemas.ts @@ -1228,31 +1228,36 @@ const LocationFix: FoxgloveMessageSchema = { name: "LocationFix", description: "A navigation satellite fix for any Global Navigation Satellite System", fields: [ + { + name: "timestamp", + type: { type: "primitive", name: "time" }, + description: "Timestamp of the message", + protobufFieldNumber: 6, + }, { name: "frame_id", type: { type: "primitive", name: "string" }, description: "Frame for the sensor. Latitude and longitude readings are at the origin of the frame.", - }, - { - name: "timestamp", - type: { type: "primitive", name: "time" }, - description: "Timestamp of the message", + protobufFieldNumber: 7, }, { name: "latitude", type: { type: "primitive", name: "float64" }, description: "Latitude in degrees", + protobufFieldNumber: 1, }, { name: "longitude", type: { type: "primitive", name: "float64" }, description: "Longitude in degrees", + protobufFieldNumber: 2, }, { name: "altitude", type: { type: "primitive", name: "float64" }, description: "Altitude in meters", + protobufFieldNumber: 3, }, { name: "position_covariance", @@ -1260,12 +1265,14 @@ const LocationFix: FoxgloveMessageSchema = { description: "Position covariance (m^2) defined relative to a tangential plane through the reported position. The components are East, North, and Up (ENU), in row-major order.", array: 9, + protobufFieldNumber: 4, }, { name: "position_covariance_type", type: { type: "enum", enum: PositionCovarianceType }, description: "If `position_covariance` is available, `position_covariance_type` must be set to indicate the type of covariance.", + protobufFieldNumber: 5, }, ], }; diff --git a/ros_foxglove_msgs/ros1/LocationFix.msg b/ros_foxglove_msgs/ros1/LocationFix.msg index 3e0703e..8593faa 100644 --- a/ros_foxglove_msgs/ros1/LocationFix.msg +++ b/ros_foxglove_msgs/ros1/LocationFix.msg @@ -3,12 +3,12 @@ # Generated by https://github.com/foxglove/schemas -# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. -string frame_id - # Timestamp of the message time timestamp +# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. +string frame_id + # Latitude in degrees float64 latitude diff --git a/ros_foxglove_msgs/ros2/LocationFix.msg b/ros_foxglove_msgs/ros2/LocationFix.msg index 4d0ae37..33cf956 100644 --- a/ros_foxglove_msgs/ros2/LocationFix.msg +++ b/ros_foxglove_msgs/ros2/LocationFix.msg @@ -3,12 +3,12 @@ # Generated by https://github.com/foxglove/schemas -# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. -string frame_id - # Timestamp of the message builtin_interfaces/Time timestamp +# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. +string frame_id + # Latitude in degrees float64 latitude diff --git a/schemas/README.md b/schemas/README.md index 0b38e29..8e04ab6 100644 --- a/schemas/README.md +++ b/schemas/README.md @@ -1319,28 +1319,28 @@ A navigation satellite fix for any Global Navigation Satellite System description -frame_id +timestamp -string +time -Frame for the sensor. Latitude and longitude readings are at the origin of the frame. +Timestamp of the message -timestamp +frame_id -time +string -Timestamp of the message +Frame for the sensor. Latitude and longitude readings are at the origin of the frame. diff --git a/schemas/flatbuffer/LocationFix.fbs b/schemas/flatbuffer/LocationFix.fbs index 7716f93..9db5a59 100644 --- a/schemas/flatbuffer/LocationFix.fbs +++ b/schemas/flatbuffer/LocationFix.fbs @@ -16,12 +16,12 @@ enum PositionCovarianceType : ubyte { } /// A navigation satellite fix for any Global Navigation Satellite System table LocationFix { - /// Frame for the sensor. Latitude and longitude readings are at the origin of the frame. - frame_id:string; - /// Timestamp of the message timestamp:Time; + /// Frame for the sensor. Latitude and longitude readings are at the origin of the frame. + frame_id:string; + /// Latitude in degrees latitude:double; diff --git a/schemas/jsonschema/LocationFix.json b/schemas/jsonschema/LocationFix.json index 437fa36..375f567 100644 --- a/schemas/jsonschema/LocationFix.json +++ b/schemas/jsonschema/LocationFix.json @@ -4,10 +4,6 @@ "$comment": "Generated by https://github.com/foxglove/schemas", "type": "object", "properties": { - "frame_id": { - "type": "string", - "description": "Frame for the sensor. Latitude and longitude readings are at the origin of the frame." - }, "timestamp": { "type": "object", "title": "time", @@ -24,6 +20,10 @@ }, "description": "Timestamp of the message" }, + "frame_id": { + "type": "string", + "description": "Frame for the sensor. Latitude and longitude readings are at the origin of the frame." + }, "latitude": { "type": "number", "description": "Latitude in degrees" diff --git a/schemas/jsonschema/index.ts b/schemas/jsonschema/index.ts index a140594..c7197d8 100644 --- a/schemas/jsonschema/index.ts +++ b/schemas/jsonschema/index.ts @@ -1533,10 +1533,6 @@ export const LocationFix = { "$comment": "Generated by https://github.com/foxglove/schemas", "type": "object", "properties": { - "frame_id": { - "type": "string", - "description": "Frame for the sensor. Latitude and longitude readings are at the origin of the frame." - }, "timestamp": { "type": "object", "title": "time", @@ -1553,6 +1549,10 @@ export const LocationFix = { }, "description": "Timestamp of the message" }, + "frame_id": { + "type": "string", + "description": "Frame for the sensor. Latitude and longitude readings are at the origin of the frame." + }, "latitude": { "type": "number", "description": "Latitude in degrees" diff --git a/schemas/proto/foxglove/LocationFix.proto b/schemas/proto/foxglove/LocationFix.proto index 77c2da3..6ddbc59 100644 --- a/schemas/proto/foxglove/LocationFix.proto +++ b/schemas/proto/foxglove/LocationFix.proto @@ -18,24 +18,24 @@ message LocationFix { KNOWN = 3; } - // Frame for the sensor. Latitude and longitude readings are at the origin of the frame. - string frame_id = 1; - // Timestamp of the message - google.protobuf.Timestamp timestamp = 2; + google.protobuf.Timestamp timestamp = 6; + + // Frame for the sensor. Latitude and longitude readings are at the origin of the frame. + string frame_id = 7; // Latitude in degrees - double latitude = 3; + double latitude = 1; // Longitude in degrees - double longitude = 4; + double longitude = 2; // Altitude in meters - double altitude = 5; + double altitude = 3; // Position covariance (m^2) defined relative to a tangential plane through the reported position. The components are East, North, and Up (ENU), in row-major order. - repeated double position_covariance = 6; // length 9 + repeated double position_covariance = 4; // length 9 // If `position_covariance` is available, `position_covariance_type` must be set to indicate the type of covariance. - PositionCovarianceType position_covariance_type = 7; + PositionCovarianceType position_covariance_type = 5; } diff --git a/schemas/ros1/LocationFix.msg b/schemas/ros1/LocationFix.msg index 3e0703e..8593faa 100644 --- a/schemas/ros1/LocationFix.msg +++ b/schemas/ros1/LocationFix.msg @@ -3,12 +3,12 @@ # Generated by https://github.com/foxglove/schemas -# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. -string frame_id - # Timestamp of the message time timestamp +# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. +string frame_id + # Latitude in degrees float64 latitude diff --git a/schemas/ros2/LocationFix.msg b/schemas/ros2/LocationFix.msg index 4d0ae37..33cf956 100644 --- a/schemas/ros2/LocationFix.msg +++ b/schemas/ros2/LocationFix.msg @@ -3,12 +3,12 @@ # Generated by https://github.com/foxglove/schemas -# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. -string frame_id - # Timestamp of the message builtin_interfaces/Time timestamp +# Frame for the sensor. Latitude and longitude readings are at the origin of the frame. +string frame_id + # Latitude in degrees float64 latitude diff --git a/schemas/typescript/LocationFix.ts b/schemas/typescript/LocationFix.ts index b3c72f9..27d2c97 100644 --- a/schemas/typescript/LocationFix.ts +++ b/schemas/typescript/LocationFix.ts @@ -5,12 +5,12 @@ import { Time } from "./Time"; /** A navigation satellite fix for any Global Navigation Satellite System */ export type LocationFix = { - /** Frame for the sensor. Latitude and longitude readings are at the origin of the frame. */ - frame_id: string; - /** Timestamp of the message */ timestamp: Time; + /** Frame for the sensor. Latitude and longitude readings are at the origin of the frame. */ + frame_id: string; + /** Latitude in degrees */ latitude: number;