Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

Sector File Building/Editing Questions


Josh Radford 956529
 Share

Recommended Posts

Josh Radford 956529
Posted
Posted

Hey guys,

 

I'm currently developing a couple of applications that interface with sector files, and I've run into an interesting situation.

 

According to the VRC docomeentation, the 6th and 7th lines of the [iNFO] section define the distance (in nm) between lines of latitude and longitude, respectively. I [Mod - Happy Thoughts]umed this information is used to "scale" the sector file within VRC so that it is displayed properly. However, today I opened up the CYYZ_TWR sector file and noticed that these values are huge!

 

Excerpt from file:

 

[INFO]
TORONTO TOWER V4.3
CYYZ_TWR
CYYZ
N043.40.37.800
W079.37.49.800
800         <<----These values are huge!
578         <<----
10
13.300000

 

The weird thing is, VRC still displays the sector file normally. In addition, I'm able to change these values to anything and VRC still displays the sector normally!!

 

My question is this: What does VRC base its distance information on? Somewhere along the line, latitude and longitude must be converted into screen coordinates to be displayed on the screen.

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

VRC uses both values to determine a scale factor, by dividing the "miles per degree of longitude" value by the "miles per degree of latitude" value. So if the values are 45 and 60 (typical for a sector file at 45 degrees of lat,) the scale factor would be .75.

 

VRC scope windows are drawn using the lat/lon coordinate system, and the display is scaled (squeezed) along the x axis by this scaling factor.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Josh Radford 956529
Posted
Posted

Thanks Ross. That clears things up a lot for me. I'm guessing that, on top of this scaling factor, there is also a standard scaling factor employed by the program for mapping lat/lon coords into screen space?

Link to comment
Share on other sites

Ross Carlson
Posted
Posted
Thanks Ross. That clears things up a lot for me. I'm guessing that, on top of this scaling factor, there is also a standard scaling factor employed by the program for mapping lat/lon coords into screen space?

 

That's taken care of by the graphics library, which in this case is OpenGL. I define a viewport using screen coordinates, and I define a "projection", using lat/lon extents, and OpenGL takes care of the mapping.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Josh Radford 956529
Posted
Posted

Perfect. Thanks!

Link to comment
Share on other sites

 Share