# Y:/msp/devkits/temp_geotrans/master/geotrans3.1/CCS/src/dtcc/CoordinateSystems/bng/BritishNationalGrid.cpp File Reference

`#include <ctype.h>`
`#include <math.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include "TransverseMercator.h"`
`#include "BritishNationalGrid.h"`
`#include "BNGCoordinates.h"`
`#include "EllipsoidParameters.h"`
`#include "MapProjectionCoordinates.h"`
`#include "GeodeticCoordinates.h"`
`#include "CoordinateConversionException.h"`
`#include "ErrorMessages.h"`

Go to the source code of this file.

## Functions

void | findIndex (char letter, const char *letterArray, long *index)
long | roundBNG (double value)
void | makeBNGString (char ltrnum[4], long easting, long northing, char *BNGString, long precision)
bool | checkOutOfArea (char BNG500, char BNG100)
void | breakBNGString (char *BNGString, char letters[3], double *easting, double *northing, long *precision)

## Variables

const double | PI = 3.14159265358979323e0
const double | PI_OVER_2 = (PI / 2.0e0)
const double | TWO_PI = (2.0e0 * PI)
const double | MAX_LAT = (61.5 * PI / 180.0)
const double | MIN_LAT = (49.5 * PI / 180.0)
const double | MAX_LON = (3.5 * PI / 180.0)
const double | MIN_LON = (-10.0 * PI / 180.0)
const char * | BNG500GRID = "STNOHJ"
const char * | BNG100GRID = "VWXYZQRSTULMNOPFGHJKABCDE"
const double | BNG_Origin_Lat = (49.0 * PI / 180.0)
const double | BNG_Origin_Long = (-2.0 * PI / 180.0)
const double | BNG_False_Northing = -100000.0
const double | BNG_False_Easting = 400000.0
const double | BNG_Scale_Factor = .9996012717
const double | BNG_Max_Easting = 759961.0
const double | BNG_Max_Northing = 1257875.0
const double | BNG_Min_Easting = -133134.0
const double | BNG_Min_Northing = -14829.0

## Function Documentation

void breakBNGString | ( | char * | BNGString,
|  | char | letters[3],
|  | double * | easting,
|  | double * | northing,
|  | long * | precision |
| ) |  |  |

Definition at line 335 of file BritishNationalGrid.cpp.

bool checkOutOfArea | ( | char | BNG500,
|  | char | BNG100 |
| ) |  |  |

Error_Code = BNG_NO_ERROR;

Definition at line 226 of file BritishNationalGrid.cpp.

void findIndex | ( | char | letter,
|  | const char * | letterArray,
|  | long * | index |
| ) |  |  |

Definition at line 149 of file BritishNationalGrid.cpp.

void makeBNGString | ( | char | ltrnum[4],
|  | long | easting,
|  | long | northing,
|  | char * | BNGString,
|  | long | precision |
| ) |  |  |

Definition at line 193 of file BritishNationalGrid.cpp.

long roundBNG | ( | double | value | ) |

Definition at line 179 of file BritishNationalGrid.cpp.

## Variable Documentation

const char* BNG100GRID = "VWXYZQRSTULMNOPFGHJKABCDE"

Definition at line 126 of file BritishNationalGrid.cpp.

const char* BNG500GRID = "STNOHJ"

Definition at line 125 of file BritishNationalGrid.cpp.

const double BNG_False_Easting = 400000.0

Definition at line 132 of file BritishNationalGrid.cpp.

const double BNG_False_Northing = -100000.0

Definition at line 131 of file BritishNationalGrid.cpp.

const double BNG_Max_Easting = 759961.0

Definition at line 136 of file BritishNationalGrid.cpp.

const double BNG_Max_Northing = 1257875.0

Definition at line 137 of file BritishNationalGrid.cpp.

const double BNG_Min_Easting = -133134.0

Definition at line 138 of file BritishNationalGrid.cpp.

const double BNG_Min_Northing = -14829.0

Definition at line 139 of file BritishNationalGrid.cpp.

const double BNG_Origin_Lat = (49.0 * PI / 180.0)

Definition at line 129 of file BritishNationalGrid.cpp.

const double BNG_Origin_Long = (-2.0 * PI / 180.0)

Definition at line 130 of file BritishNationalGrid.cpp.

const double BNG_Scale_Factor = .9996012717

Definition at line 133 of file BritishNationalGrid.cpp.

const double MAX_LAT = (61.5 * PI / 180.0)

Definition at line 121 of file BritishNationalGrid.cpp.

const double MAX_LON = (3.5 * PI / 180.0)

Definition at line 123 of file BritishNationalGrid.cpp.

const double MIN_LAT = (49.5 * PI / 180.0)

Definition at line 122 of file BritishNationalGrid.cpp.

const double MIN_LON = (-10.0 * PI / 180.0)

Definition at line 124 of file BritishNationalGrid.cpp.

const double PI = 3.14159265358979323e0

Definition at line 118 of file BritishNationalGrid.cpp.

const double PI_OVER_2 = (PI / 2.0e0)

Definition at line 119 of file BritishNationalGrid.cpp.

const double TWO_PI = (2.0e0 * PI)

Definition at line 120 of file BritishNationalGrid.cpp.