Lack of consistency between `fwd` and `fwd_intermediate` azimuth output
See original GitHub issueProblem description
I’ve noticed an inconsistency between the azimuth output of fwd
and fwd_intermediate
. In the example below, I compute the lon/lat/azi when moving 1km from London with an initial forward azimuth of 45 degrees with the both methods. As expected from the documentation, fwd
returns the backward azimuth whereas fwd_intermediate
returns the forward azimuth of the terminus point. For consistency and to avoid confusion, I suggest fwd_intermediate
also return the backward azimuth.
Code Sample
from pyproj import Geod, enums
wgs84 = Geod(ellps="WGS84")
# Inputs
london = (-0.118092, 51.509865) #lon/lat
dist = 1e3 # m
bearing = 45 # deg
flags = enums.GeodIntermediateFlag(0).AZIS_KEEP # get fwd_intermediate to return azimuths
# fwd
lon, lat, azi = wgs84.fwd(*london, bearing, dist)
# fwd_intermediate (return first and last point)
res = wgs84.fwd_intermediate(*london, bearing, 2, dist, flags=flags, terminus_idx=0, initial_idx=0)
print("lon, lat, azimuth from fwd :", lon, lat, azi)
print("lon, lat, azimuth from fwd_intermediate:", res.lons[-1], res.lats[-1], res.azis[-1])
which outputs:
lon, lat, azimuth from fwd : -0.10790547005142687 51.51622011204643 -134.99202649526126
lon, lat, azimuth from fwd_intermediate: -0.10790547005142687 51.51622011204643 45.007973504738736
Environment Information
pyproj info: pyproj: 3.4.0 PROJ: 9.1.0
Installation method
Installed via pip
Issue Analytics
- State:
- Created a year ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Global Meteor Network – Methodology and first results
A novel astrometry calibration method is presented which allows decoupling of the camera pointing from the distortion, and is used for frequent pointing ......
Read more >Aviation Electronics Technician - Intermediate - Navy Tribe
THE COURSE: This self-study course is organized into subject matter areas, each containing learning objectives to help you determine what you should learn ......
Read more >TELEMETRY STANDARDS IRIG STANDARD 106-04 Part I
1.0 Bit Rate Versus Receiver Intermediate-Frequency Bandwidth . ... Lack of proper output termination will not cause the reproduce amplifier to oscillate.
Read more >Enhanced metanephric specification to functional proximal ...
Here we show that enhanced specification to metanephric nephron progenitors results in elongated and radially aligned proximalised nephrons with ...
Read more >High-resolution retrieval of cloud microphysical properties and ...
Abstract. Optical properties of clouds and heavy aerosol retrieved from satellite measurements are the most important elements for calculating ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, As we don’t want to break backwards compatibility, I’ve added this option as a non-default argument. Hope it helps 😃
@snowman2 agrees with you, so I’ve changed the default. I added this parameter to
fwd
,inv
,fwd_intermediate
,inv_intermediate