Skip to content

Commit e9cb772

Browse files
thomassedlmayerpmai
authored andcommitted
Add proj frame offset to groundtruth
Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
1 parent ffcf413 commit e9cb772

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

osi_groundtruth.proto

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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,45 @@ 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+
// xWorld = xOSI * cos(yaw) - yOSI * sin(yaw) + xOffset
203+
// yWorld = xOSI * sin(yaw) + yOSI * cos(yaw) + yOffset
204+
// zWorld = zOSI + zOffset
205+
//
206+
// If no yaw is provided (recommended), the formulas simplify to:
207+
// xWorld = xOSI + xOffset
208+
// yWorld = yOSI + yOffset
209+
// zWorld = zOSI + zOffset
210+
//
211+
message ProjFrameOffset
212+
{
213+
// Positional offset for relocation of the coordinate frame.
214+
//
215+
optional Vector3d position = 1;
216+
217+
// Yaw/heading angle for re-orientation of the coordinate frame around
218+
// the z-axis.
219+
//
220+
optional double yaw = 2;
221+
}
222+
181223
}

0 commit comments

Comments
 (0)