Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

computeOffset testcase seem to be fail. #6

Open
BorisLok opened this issue Apr 30, 2021 · 0 comments
Open

computeOffset testcase seem to be fail. #6

BorisLok opened this issue Apr 30, 2021 · 0 comments

Comments

@BorisLok
Copy link

BorisLok commented Apr 30, 2021

I did some testing accroding to your code, but the result came out to be failed (as below).

EXPECT_NEAR_LatLan(down,  SphericalUtil::computeOffset(front, M_PI * MathUtil::EARTH_RADIUS / 2, 180));

I tested the "compute offset" function in Javascript version and got the same answser LatLng(lat: -90, lng: 63.43494882292201) as your output.
So I think the answser shoud be LatLng(lat: -90, lng: 63.43494882292201) and not LatLng(lat: -90, lng: 0).

import { SphericalUtil, MathUtil} from "node-geometry-library";

let ans = SphericalUtil.computeOffset({ lat: 0, lng: 0 }, Math.PI * MathUtil.EARTH_RADIUS / 2.0, 180);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant