City police in Baltimore acted in good faith in using a tracking device without a warrant to follow the movement of a suspect, a divided federal appeals court said Tuesday in upholding a firearms conviction.

The authorities in 2011 installed the battery-operated Global Positioning System device under the rear bumper of a vehicle parked in a public lot in suburban Baltimore. Officers used visual surveillance and the GPS tracker to find and stop the driver, Henry Stephens, the target of a gun and drug investigation. The police found a loaded pistol in Stephens’ vehicle.