VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGarsUtil.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ********************************************************************/
5 
9 
10 #pragma once
11 #include <vrvUtil/vrvUtil.h>
12 
13 namespace makVrv
14 {
15  enum class DtGarsPrecision
16  {
17  Cell,
18  Quadrant,
19  Keypad
20  };
21 
25  {
26  public:
27 
29  DtGarsUtil() = default;
30 
32  ~DtGarsUtil() = default;
33 
35  DtGarsUtil(const DtGarsUtil& orig) = default;
36 
38  DtGarsUtil& operator=(const DtGarsUtil& orig) = default;
39 
40  // Takes in an Global Area ReferenceSystem grid and fills in outLat, outLon with the
41  // corresponding latitude and longitude of that grid's center in radians
42  static bool convertToLatLon(const std::string& garsStr, double& outLat, double& outLon);
43 
44  // Convert lat/lon (in radians) to a GARS string
45  static std::string convertToGars(double lat, double lon, DtGarsPrecision precision);
46 
47  // Create the longitude 'Cell' portion of a GARS string (from "001" to "720")
48  static std::string calculateLongitudeCellStr(double degLon);
49 
50  // Create the latitude 'Cell' portion of a GARS string (from "AA" to "QZ")
51  static std::string calculateLatitudeCellStr(double degLat);
52 
53  // Create the 'Quadrant' portion of a GARS string (from "1" to "4")
54  static std::string calculateQuadrantStr(double degLat, double degLon);
55 
56  // Create the 'Keypad' portion of a GARS string (from "1" to "9")
57  static std::string calculateKeypadStr(double degLat, double degLon);
58  };
59 }
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
DtGarsPrecision
Definition: DtGarsUtil.h:15
Contains DLL export macros.
Contains functions to help process MGRS coordinates.
Definition: DtGarsUtil.h:24

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)