Apollo 10.0
自动驾驶开放平台
frame_transform.h
浏览该文件的文档.
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
23namespace apollo {
24namespace localization {
25namespace msf {
26
27typedef Eigen::Vector3d Vector3d;
28
30struct UTMCoor {
31 UTMCoor() : x(0.0), y(0.0) {}
32 double x;
33 double y;
34};
35
37/* including log(longitude) and lat(latitude). */
38struct 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
static bool LatlonToUtmXY(double lon, double lat, UTMCoor *utm_xy)
static bool UtmXYToLatlon(double x, double y, int zone, bool southhemi, WGS84Corr *latlon)
static bool XYZToBlh(const Vector3d &xyz, Vector3d *blh)
static bool BlhToXYZ(const Vector3d &blh, Vector3d *xyz)
class register implement
Definition arena_queue.h:37
the UTM coordinate struct including x and y.
the WGS84 coordinate struct