Skip to content

[Bug]: vincenty.vreckon returns incorrect answer if longitude is negative. #88

@jesse-prescott

Description

@jesse-prescott

What happened?

Consider the following example:

image

Assuming I'm starting at the point at the bottom left, I want to work out the point in the top right knowing the distance travelled and the azimuth.

To do, I use the following code:

import pymap3d.vincenty

lat2, lon2 = pymap3d.vincenty.vreckon(52.22610277777778, -1.2696583333333333, 839.63, 63.02)
print(lat2, lon2)

The above code returns:

52.22952562862266 358.7412927899441

Note the latitude is correct but the longitude is totally invalid. This appears to be caused by using negative longitudes. Negative latitudes seem to be correctly handled.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmatlab-comparecomparing PyMap3D and Matlab outputs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions