g-factor formulas of 3d 5 ions in trigonal-symmetry fields and their applications