Geomagnetic signals are attractive media for indoor localization since they have less noise than RF and don't require additional equipment installation for signal generation. The fingerprinting technique used in geomagnetic field based indoor positioning systems (IPS) estimates the position by matching the magnetic vector sampled from the current location with the magnetic vectors recorded in the magnetic field map. However, since the magnetic field is represented by a 3-dimensional vector, the values of a magnetic vector may change depending on the user's orientation or the grip position. Thus, the sampled magnetic vector may have different values from the vector values stored in the magnetic field map depending on the sensor's orientation. This may substantially lower the positioning accuracy. To avoid this problem, the existing studies use only the magnitude of a magnetic vector, but this reduces the uniqueness of the fingerprint, which may also degrade the positioning accuracy. In this paper we propose a vector calibration algorithm which can adjust the sampled magnetic vector to the vector of the magnetic field map by using the parametric equation of a circle. This can minimize mismatching with the magnetic field map. To implement this, we need to compute the relative rotation angle from the moving direction of the current user to the moving direction during the field map collection. Since we can measure the moving direction by using the gyroscope and accelerometer, we can compute this relative rotation angle dynamically. To evaluate our vector calibration algorithm, we compare the value mismatches with and without vector calibration for 6 random-walk paths in our campus testbed of 2470 square meters. Our results show that with the calibration, we can decrease the difference between the sampled magnetic vector and the magnetic field map vectors from 17.61\muT to 2.38 \muT in x dimension, from 17.24\muT to 2.59 \muT in y dimension, and from 6.86 \muT to 2.16 \muT in z dimension on average. This translates to 83 reduction in the map mismatch compared to the numbers without calibration. In addition, we also demonstrate the effectiveness of the calibration by applying the algorithm to our long short-term memory (LSTM)-based IPS.