@@ -133,7 +133,8 @@ message GroundTruth
133133 optional uint32 country_code = 13 ;
134134
135135 // Projection string that allows to transform all coordinates in GroundTruth
136- // into a different cartographic projection.
136+ // into a different cartographic projection after the \c proj_frame_offset
137+ // has been applied.
137138 //
138139 // The string follows the PROJ rules for projections [1].
139140 //
@@ -178,4 +179,52 @@ message GroundTruth
178179 // Logical lanes used e.g. by traffic agents
179180 //
180181 repeated LogicalLane logical_lane = 19 ;
182+
183+ // Coordinate frame offset to be used for PROJ transformations.
184+ //
185+ optional ProjFrameOffset proj_frame_offset = 20 ;
186+
187+ //
188+ // \brief Coordinate frame offset to transform from OSI's global coordinate
189+ // system to a coordinate reference system to be used for given PROJ
190+ // transformations.
191+ //
192+ // If an offset is defined, always apply the \c proj_frame_offset on
193+ // global OSI coordinates before applying any transformations defined in
194+ // \c proj_string.
195+ //
196+ // To apply the offset, global coordinates are first translated by the given
197+ // positional offset (x,y,z). Then, the yaw angle is used to rotate around
198+ // the new origin.
199+ //
200+ // The offset is applied on global OSI coordinates using an affine
201+ // transformation with rotation around z-axis:
202+ //
203+ // xWorld = xOSI * cos(yaw) - yOSI * sin(yaw) + xOffset
204+ //
205+ // yWorld = xOSI * sin(yaw) + yOSI * cos(yaw) + yOffset
206+ //
207+ // zWorld = zOSI + zOffset
208+ //
209+ //
210+ // If no yaw is provided (recommended), the formulas simplify to:
211+ //
212+ // xWorld = xOSI + xOffset
213+ //
214+ // yWorld = yOSI + yOffset
215+ //
216+ // zWorld = zOSI + zOffset
217+ //
218+ message ProjFrameOffset
219+ {
220+ // Positional offset for relocation of the coordinate frame.
221+ //
222+ optional Vector3d position = 1 ;
223+
224+ // Yaw/heading angle for re-orientation of the coordinate frame around
225+ // the z-axis.
226+ //
227+ optional double yaw = 2 ;
228+ }
229+
181230}
0 commit comments