Before you know the qibla direction in your city we have to be honest with you because the prayer/salat in any muslim's life is a very serious and important thing ... it is the cornerstone of islamic religion. So, we can't underestimate the qibla direction determination like as most of other islamic applications and websites do. Especially that any programming code might give you incorrect results .. because at the end who wrote this code is a human like as you and me, and as we all know ( perfection is only for Allah/God ).
The method we are using to determine the qibla direction for Bagram is a purely programmatic/automated method, and we always advise you to make the priority in knowing the direction of qibla by asking the trustworthy muslims who live in Bagram .. but if you don't find someone then, you can use the normal compass .. but you have to have some few knowledge about world map and ( north,south,west and east ) directions and the location of KAABA or Al-Masjid al-Haram ( Great Mosque of Mecca ) on the world map, and no doubt this is the second best method you can use to know the qibla direction in your city.
but just in case you are compelled to do that for any reason or you don't have compass, We can guarantee to give you an accurate Qibla direction in Bagram and in most cities of the world by more than 95% accurate ratio.
We are very sorry for this long introduction, but we had have to be honest and clear to please Allah/God and because we know the prayer importance in any muslim's life
if you don't know the ( north, south, west and east ) directions in your city, then all you have to do is to wait until the next sunrise or sunset and by knowing the sunrise or sunset place you can easily determine the west and east directions in your city, the red arrow in the compass image below refers to the qibla direction