I found another sample here : https://geographiclib.sourceforge.io/html/classGeographicLib_1_1GeodesicLine.html which uses Geodesic geod(Constants::WGS84_a(), Constants::WGS84_f());
to construct a geod and that fixes the issues (the commented alternative which I used fails)
and instead of l.s13, I guess I should be using Distance() method instead right?
now how should I port position:
# python
g = l.Position(s, Geodesic.STANDARD | Geodesic.LONG_UNROLL)
to C++? it seems position here is completely different!
for the reference this is my python snippet I'm trying to port to C++:
Hi,
I'm trying to port my python code to its C++ counter part, but when trying to use
InverseLine
, I'm facing the following error :and this is the snippet I'm trying to run:
Whats wrong here and how can I use this method?
Thanks a lot in advance
Last edit: Master 2022-04-18
I found another sample here : https://geographiclib.sourceforge.io/html/classGeographicLib_1_1GeodesicLine.html which uses
Geodesic geod(Constants::WGS84_a(), Constants::WGS84_f());
to construct a geod and that fixes the issues (the commented alternative which I used fails)
and instead of
l.s13
, I guess I should be using Distance() method instead right?now how should I port position:
to C++? it seems position here is completely different!
for the reference this is my python snippet I'm trying to port to C++:
Last edit: Master 2022-04-18
OK, I guess I found it, Position, takes out variables, which I believe would initialize them after the method call.
Correct. The methods in
C++
library typically only return single values. For most methods, the results are via reference arguments.