Additive manufacturing (AM) technology, specifically 3D printing, holds great promise for in-orbit manufacturing. In-space printing can significantly reduce the mass, cost, and risk of long-term space exploration by enabling replacement parts to be made as needed and reducing dependence on Earth. However, printing in a zero-gravity environment poses challenges due to the absence of a rigid ground for the print platform, which can result in vibrational and rotational forces that may impact printing integrity. To address this issue, this paper proposes a novel linear magnetic position tracking algorithm, named Navigation Integrating Magnets By Linear Estimation (NIMBLE), for dynamic vibration compensation during 3D printing of truss structures in space. Compared to the most commonly used nonlinear optimization method, the NIMBLE algorithm is more than two orders of magnitude faster. With only a single 3-axis magnet sensor and a small NdFeB magnet, the NIMBLE algorithm provides a simple and easily implemented tracking solution for in-orbit 3D printing.