NDEVR
API Documentation
PhotogrammetryGPSAlign.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2026, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: DronePhotogrammetry
28File: PhotogrammetryGPSAlign
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/BaseValues.h>
35#include <NDEVR/Log.h>
36#include <array>
37#include <unordered_map>
38
39// OpenMVG forward declaration
40namespace openMVG { namespace sfm { struct SfM_Data; } }
41
42namespace NDEVR
43{
48 struct DRONE_PHOTOGRAMMETRY_API GPSAlignmentResult
49 {
50 bool applied = false;
51 std::array<double, 9> sR {};
52 std::array<double, 9> R {};
53 std::array<double, 3> t {};
54 };
55
60 class DRONE_PHOTOGRAMMETRY_API PhotogrammetryGPSAlign
61 {
62 public:
66 const openMVG::sfm::SfM_Data& sfm_data,
67 const std::unordered_map<uint32_t, std::array<double, 3>>& gps_lla,
68 LogPtr log);
69 };
70}
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
Computes a GPS-based similarity transform from EXIF GPS positions and SfM camera centres.
static GPSAlignmentResult run(const openMVG::sfm::SfM_Data &sfm_data, const std::unordered_map< uint32_t, std::array< double, 3 > > &gps_lla, LogPtr log)
Compute SfM-to-ENU similarity transform from EXIF GPS and recovered cameras.
The primary namespace for the NDEVR SDK.
Result of a GPS-based similarity transform (SfM -> ENU).
std::array< double, 9 > R
pure rotation (3x3 row-major)
std::array< double, 3 > t
translation (metres)
std::array< double, 9 > sR
scale * rotation (3x3 row-major)