This is a followup question of this one where I try to port a python script to c++. long story short, after running my c++ port which is given below, the distance reported is off by a huge margin!
This function tries to create a list of intermediate waypoints between the given source and destination gps locations.
The last argument in you call to Position returns the area, which I'm careful to spell with a capital S, S12 (in m^2 so it's usually a big number). The distance is just the first argument s, of course. You can also then make the simpler call l.Position(s, lat2, lon2, azi). Let me know if this clears up your problem.
Last edit: Charles Karney 2022-04-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a followup question of this one where I try to port a python script to c++. long story short, after running my c++ port which is given below, the distance reported is off by a huge margin!
This function tries to create a list of intermediate waypoints between the given source and destination gps locations.
results in :
Is this a bug or am I missing something? by the way I'm using the latest version(1.52).
Thanks a lot in advance
The last argument in you call to
Position
returns the area, which I'm careful to spell with a capital S,S12
(in m^2 so it's usually a big number). The distance is just the first arguments
, of course. You can also then make the simpler calll.Position(s, lat2, lon2, azi)
. Let me know if this clears up your problem.Last edit: Charles Karney 2022-04-18
Thanks a lot. Yes that pretty much cleared everything.
God bless