Reverse engineering the VFR map to get sim position

I would suggest using the game’s APIs for defining instruments instead of invoking the custom element APIs directly: HTML gauges within aircraft package?

As for console output, you can use coherent gt debugger (not available anywhere) or msfs-webui-devkit (available for free on github)