henc · Coordinate Conversion & Misc
Coordinate conversion (Win / Map / GL / WGS84 / Mercator) and VRM / EBL utilities
hencMapPosToWinPos
Section titled “hencMapPosToWinPos”Prototype
Section titled “Prototype”int hencMapPosToWinPos( double &x, double &y )Function
Section titled “Function”Calculate the coordinate value of the GDI Window corresponding to the coordinate value of the coordinates of latitude/longitude on the map.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : longitude(degree)
- OUT : The x coordinate value of the GDI Pixel
- double &y: IN, OUT
- IN : latitude(degree)
- OUT : The y coordinate value of the GDI Pixel
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencWinPosToMapPos
Section titled “hencWinPosToMapPos”Prototype
Section titled “Prototype”int hencWinPosToMapPos( double &x, double &y )Function
Section titled “Function”Calculates the coordinate value on the map corresponding to the Window GDI coordinate value.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate of GDI Pixel
- OUT : longitude(degree)
- double &y: IN, OUT
- IN : Y coordinate of GDI Pixel
- OUT : latitude(degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencMapPosToGlPos
Section titled “hencMapPosToGlPos”Prototype
Section titled “Prototype”int hencMapPosToGlPos( double &x, double &y )Function
Section titled “Function”Calculate the OpenGL coordinate value set in the library corresponding to the coordinate value of the latitude and longitude on the map.
Parameters
Section titled “Parameters”- x : IN, OUT
- IN : longitude(degree)
- OUT : X coordinate value of OpenGL Viewport
- y: IN, OUT
- IN : latitude(degree)
- OUT : Y coordinate value of OpenGL Viewport
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGlPosToMapPos
Section titled “hencGlPosToMapPos”Prototype
Section titled “Prototype”int hencGlPosToMapPos( double &x, double &y )Function
Section titled “Function”Calculates the map coordinate value corresponding to the OpenGL coordinate value set in the library.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate value of OpenGL Viewport
- OUT : longitude(degree)
- double &y: IN, OUT
- IN : Y coordinate value of OpenGL Viewport
- OUT : latitude(degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencWinPosToGlPos
Section titled “hencWinPosToGlPos”Prototype
Section titled “Prototype”int hencWinPosToGlPos( double &x, double &y )Function
Section titled “Function”Calculate the library setting OpenGL coordinate value corresponding to GDI Pixel coordinate value.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate of GDI Pixel
- OUT : X coordinate of OpenGL Viewport
- double &y: IN, OUT
- IN : Y coordinate of GDI Pixel
- OUT : Y coordinate of OpenGL Viewport
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGlPosToWinPos
Section titled “hencGlPosToWinPos”Prototype
Section titled “Prototype”int hencGlPosToWinPos( double &x, double &y )Function
Section titled “Function”Calculates the GDI pixel coordinate value corresponding to the OpenGL coordinate value set in the library.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate value of OpenGL Viewport
- OUT : X coordinate value in GDI pixel
- double &y: IN, OUT
- IN : Y coordinate value of OpenGL Viewport
- OUT : X coordinate value in GDI pixel
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencWgs84ToMercator
Section titled “hencWgs84ToMercator”Prototype
Section titled “Prototype”double hencWgs84ToMercator( double lat )Function
Section titled “Function”Calculate the Mercator projection coordinate value corresponding to the WGS84 latitude value.
Parameters
Section titled “Parameters”double lat : IN (WGS84 latitude, degree)
Return Value
Section titled “Return Value”Mercator projection coordinate (latitude. degree)
hencMercatorToWgs84
Section titled “hencMercatorToWgs84”Prototype
Section titled “Prototype”double hencMercatorToWgs84( double mercator_y )Function
Section titled “Function”Calculates the WGS84 latitude value corresponding to the Mercator projection coordinate value.
Parameters
Section titled “Parameters”double mercator_y : IN, Coordinate by Mecator projection. (latitude, degree)
Return Value
Section titled “Return Value”Coordinate by WGS84 projection (latitude. degree)
hencDrawVRM
Section titled “hencDrawVRM”Prototype
Section titled “Prototype”void hencDrawVRM( double cx, double cy, double radius, int resoultion = 360 )Function
Section titled “Function”VRM(Variable Range Marker) As a drawing function, draw a polygon that connects points of the same distance with respect to the center point.
Parameters
Section titled “Parameters”- double cx : IN (Center Longitude, degree)
- double cy : IN (Center Latitude, degree)
- double radius : IN (Distance from center, meter)
- int resolution : IN (Number of faces of polygon)
Return Value
Section titled “Return Value”None
hencDrawEBL
Section titled “hencDrawEBL”Prototype
Section titled “Prototype”void hencDrawEBL( double cx, double cy, double bearing, double radius1, double radius2 )Function
Section titled “Function”EBL(Electronic Bearing Line) drawing function
Parameters
Section titled “Parameters”- double cx : IN (Center point longitude, degree)
- double cy : IN (Center point latitude, degree)
- double bearing : IN (Angle. 0 degree northward direction, CW, degree)
- double radius1 : IN (Distance from the center point to the starting point of the EBL, meter)
- double radius2 : IN (Distance from the center point to the end point of the EBL, meter)
Return Value
Section titled “Return Value”None