This bat-script for windows can be used to synchronize a the locally levelled project coordinate systems between the terrestrial laserscan processing software from Riegl LMS called RiScan PRO, and the photogrammetric structure-from-motion processing software Reality Capture.
Using the script synchronizes Reality Capture ground plane definition with RiScan Pro project coordinate system (PRCS) through a 4x4 transformation matrix, specifically the so-called POP matrix.
The POP matrix represents the relation between the working PRCS where all laserscans are aligned and the global coordinate system (GLCS). By default GLCS is set to EPSG4978 - a geocentric system with the WGS84 ellipsoid.
The script transforms the coordinates of a cube with the dimensions 100x100x100m and the center of its base plane aligned with the coordinate origin, is imported into RealityCapture as reconstruction region using four points and applied to define the ground plane of the Reality Capture project.
Ideally, with this the Reality Capture project coordinate system can be set to a global unprojected system such as EPSG4978 and using this script the ground plane can be levelled and used as a secondary local system - effectively synchronizing both global and local system between RiScan Pro and Reality Capture.