A psalm of David, this one makes more sense if we keep in mind the image of a God who reveals Himself through His character in Creation. Anyone born anywhere has the capacity and means to grasp something of God’s personality and moral nature through the voice of reality, even if they never learn of His covenants or His name. This psalm celebrates answered prayers.
David declares that his heart is fully committed to Jehovah. He refers to celebrating Jehovah in the face of elohim, often used as a figure of speech referring to human VIPs as well as angels or pagan deities. It hardly matters, since there is none on the level of his Lord. So it makes no difference who regards his physical form; David is going to elevate his Master in the face of everyone and make it clear that no one has any greater authority.
No matter where he finds himself, David will symbolically face toward the place God has marked with His name on the earth, Jerusalem. A noteworthy thing it is that God prefers to be known first and foremost by the power of His moral truth rather than a name or title that men might repeat. Either way, those who call upon Him by any name at all will find He answers and gives His servants boldness from within their own souls.
How can anyone of power, upon hearing the Word of His commandments, not marvel at the wisdom and rightness of it? Nothing in this world could make as much sense to seeking hearts as the revelation of our Creator. It shines with blinding brilliance. For here is one who resides in the very heavens, and yet is able to crawl down on the level of those oppressed and driven to the ground. Yet those who think highly of themselves will be lucky if He even allows them to come into His Presence.
So David is assured that even in the midst of distress, God will reach out to him. Everyone who seeks to persecute David will have to face the wrath of Jehovah. In the midst of noise and confusion, God knows that really matters. He is fully aware of our commitments, and His mercy will meet us there to fulfill our real needs. He has made us along with everything around us; He has no intention of winding things up to let them run out on their own. He pays close attention to His own Creation.