ph_latlongcalclong PowerHome formula function
Description
Given a starting latitude and longitude,
a bearing and a distance to travel, calculates the
new longitude
Syntax
ph_latlongcalclong ( d_lat1, d_long1, d_bearing, d_distance )
Argument | Description |
d_lat1 | Double. Starting latitude in decimal degrees |
d_long1 | Double. Starting longitude in decimal degrees |
d_bearing | Double. Bearing (heading) in decimal degrees (0
>= d_bearing < 360) |
d_distance | Double. Distance in Kilometers |
Return value
Double. Returns the calcuated longitude
in decimal format
Usage
Use this function along with the
ph_latlongcalclat( ) function to calculate a new latitude and longitude from a
starting point (lat/long) and traveling for d_distance on a bearing
of d_bearing
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_latlongcalclat(28.78,
-81.25,25.2,38.4) - Returns a latitude of
-81.0817332315134