function moveTo (from, headingDistance) {
  // TODO: improve precision of this function moveTo
  const lat = getLatitude(from)
  const lon = getLongitude(from)
  const { heading, distance } = headingDistance 

  const dLat = distance * Math.cos(degToRad(heading)) / EARTH_RADIUS
  const dLon = distance * Math.sin(degToRad(heading)) / (EARTH_RADIUS * Math.cos(degToRad(lat)))

  return createLocation(lat + radToDeg(dLat), lon + radToDeg(dLon), getLocationType(from))
}
/**
 * Move to a new location from a start location, heading, and distance
 *
 * This is a rough estimation.
 *
 * Source: 
 * 
 *   http://gis.stackexchange.com/questions/2951/algorithm-for-offsetting-a-latitude-longitude-by-some-amount-of-meters
 * 
 * @param {Location} from             Start location
 * @param {HeadingDistance} headingDistance   An object with property `heading` in degrees and `distance` in meters
 * @return {Location} Returns the moved location
 */
Move to a new location from a start location, heading, and distance
This is a rough estimation.





@param {Location} from             Start location
@param {HeadingDistance} headingDistance   An object with property `heading` in degrees and `distance` in meters
@return {Location} Returns the moved location
Move to a new location from a start location heading and distance This is a rough estimation . @param { Location } from Start location @param { HeadingDistance } headingDistance An object with property ` heading ` in degrees and ` distance ` in meters @return { Location } Returns the moved location
function moveTo (from, headingDistance) {
  const lat = getLatitude(from)
  const lon = getLongitude(from)
  const { heading, distance } = headingDistance 
  const dLat = distance * Math.cos(degToRad(heading)) / EARTH_RADIUS
  const dLon = distance * Math.sin(degToRad(heading)) / (EARTH_RADIUS * Math.cos(degToRad(lat)))
  return createLocation(lat + radToDeg(dLat), lon + radToDeg(dLon), getLocationType(from))
}
function moveTo ( from , headingDistance ) { const lat = getLatitude ( from ) const lon = getLongitude ( from ) const { heading , distance } = headingDistance const dLat = distance * Math . cos ( degToRad ( heading ) ) / EARTH_RADIUS const dLon = distance * Math . sin ( degToRad ( heading ) ) / ( EARTH_RADIUS * Math . cos ( degToRad ( lat ) ) ) return createLocation ( lat + radToDeg ( dLat ) , lon + radToDeg ( dLon ) , getLocationType ( from ) ) }
Move to a new location from a start location, heading, and distance
 This is a rough estimation.
Move to a new location from a start location heading and distance This is a rough estimation .
// TODO: improve precision of this function moveTo