Imagine a (x,y,z) coordinate system within a solar system, with (0,0,0) beeing the center of sun where Z axis goes thru both solar poles. I’m standing on a planet inside a house within that solar system. Now from my perspective Z axis is skewed in unknown direction depending on where exactly the planet is at this moment. What would be the steps I should take to create a local coordinate system with (0,0,0) being the house and where Z axis is perpendicular to the ground/house, so that I would be able to convert coordinates from local to global. I have the global coordinate of my house and directional vectors for where is up/forward/right for my house. I have some limited knowledge of vector math and projecting vectors on other surfaces, but there is a gap in my understanding that keeps me from solving this.