Apollo  6.0
Open source self driving car software
frame_transform.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 #pragma once
17 
18 #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
19 #include <proj_api.h>
20 
21 #include "Eigen/Geometry"
22 
23 namespace apollo {
24 namespace localization {
25 namespace msf {
26 
28 
30 struct UTMCoor {
31  UTMCoor() : x(0.0), y(0.0) {}
32  double x;
33  double y;
34 };
35 
37 /* including log(longitude) and lat(latitude). */
38 struct WGS84Corr {
39  WGS84Corr() : log(0.0), lat(0.0) {}
40  double log; // longitude
41  double lat; // latitude
42 };
43 
45  public:
46  static bool LatlonToUtmXY(double lon, double lat, UTMCoor *utm_xy);
47  static bool UtmXYToLatlon(double x, double y, int zone, bool southhemi,
48  WGS84Corr *latlon);
49  static bool XYZToBlh(const Vector3d &xyz, Vector3d *blh);
50  static bool BlhToXYZ(const Vector3d &blh, Vector3d *xyz);
51 
52  // static bool XyzToBlh(const Vector3d& xyz, Position *blh);
53  // static bool BlhToXyz(const Position& blh, Vector3d *xyz);
54 };
55 
56 } // namespace msf
57 } // namespace localization
58 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double lat
Definition: frame_transform.h:41
double log
Definition: frame_transform.h:40
Definition: frame_transform.h:44
Eigen::Vector3d Vector3d
Definition: frame_transform.h:27
UTMCoor()
Definition: frame_transform.h:31
the WGS84 coordinate struct
Definition: frame_transform.h:38
WGS84Corr()
Definition: frame_transform.h:39
the UTM coordinate struct including x and y.
Definition: frame_transform.h:30
double x
Definition: frame_transform.h:32
double y
Definition: frame_transform.h:33