prg_geo_bearing_compute()

Abstract

Computes a bearing for the shortest path between source and destination along the earth's sphere.

Syntax

prg_geo_bearing_compute (source_lat, source_long, dest_lat, dest_long)
Argument Type Description
source_lat double latitude of the first point
source_long double longitude of the first point
dest_lat double latitude of the second point
dest_long double longitude of the second point

Return Type

double

Bearing from the first point to the second.

prg_geo.h

Details

The return value is between 0.0 (inclusive) and 360.0 (exclusive). 0.0 is returned in the following situations:

  • The bearing is north.
  • The two points are the same.
  • The two points are diametrically opposed (opposite sides of the earth).

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com