I'm creating a new ship through ProtoVessel.CreateVesselNode. I managed to place it correctly on the ground and got rotation to work properly, which I tested by using data from vessels saved in persistent.sfs.
The next step is to get this working for any point on the planet, and that's where I got stuck. No matter how I try, I can't get the ship to point upwards like a proper rocket should. How can I calculate the rotation quaternion to point the ship upwards for any latitude and longitude on a celestial body?