Skip to content

Commit

Permalink
Convert stid position from mm to m
Browse files Browse the repository at this point in the history
  • Loading branch information
tsundvoll committed Oct 12, 2022
1 parent a802ec1 commit 130f3ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/api/Services/StidService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ public async Task<Position> GetTagPosition(string tag)
if (stidTagPositionResponse is null)
throw new JsonException("Failed to deserialize tag position from STID");

return new Position(x: stidTagPositionResponse.XCoordinate, y: stidTagPositionResponse.YCoordinate, z: stidTagPositionResponse.ZCoordinate);
// Convert from millimeter to meter
return new Position(
x: stidTagPositionResponse.XCoordinate / 1000,
y: stidTagPositionResponse.YCoordinate / 1000,
z: stidTagPositionResponse.ZCoordinate / 1000
);
}
}
}

0 comments on commit 130f3ba

Please sign in to comment.