SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
latlontps_proj.h
1#pragma once
2
3#include <memory>
4#include "projection/utils/tps_transform.h"
5#include "common/geodetic/geodetic_coordinates.h"
6
7namespace satdump
8{
9 namespace proj
10 {
11 class LatLonTpsProjHelper
12 {
13 private:
14 std::shared_ptr<satdump::projection::VizGeorefSpline2D> tps_fwd;
15 std::shared_ptr<satdump::projection::VizGeorefSpline2D> tps_rev;
16 double shift_lon = 0, shift_lat = 0;
17 double tps_fwd_xy[2];
18 double tps_rev_ll[2];
19
20 public:
21 LatLonTpsProjHelper(std::vector<satdump::projection::GCP> gcps, bool fwd, bool rev);
22
23 void forward(geodetic::geodetic_coords_t pos, double &x, double &y);
24 void reverse(double x, double y, geodetic::geodetic_coords_t &pos);
25 };
26 }
27}