kmperdeg

Calculate the distance in kilometers per degree of longitude or latitude for any location
12 Downloads
Updated 22 Sep 2022

View License

This function calculates the distance in kilometers per degree of longitude or latitude for any location. This quantity can be used as the conversion factor to convert between distances in kilometers and distances in degrees of longitude or latitude for any location of interest.
INPUT
phi = degrees of latitude at the location of interest (-90 to 90 deg N)
OUTPUT
dlon = distance in kilometers per degree of longitute at phi
dlat = distance in kilometers per degree of latitute at phi
example use:
>> phi = [0 15 30 45 60 75 90]';
>> [dlon_km dlat_km] = kmperdeg(phi)
phi =
0
15
30
45
60
75
90
dlon_km =
111.3195
107.5505
96.4863
78.8468
55.8000
28.9020
0.0000
dlat_km =
110.5743
110.6487
110.8525
111.1318
111.4123
111.6184
111.6940

Cite As

Gregory Pelletier (2024). kmperdeg (https://www.mathworks.com/matlabcentral/fileexchange/117965-kmperdeg), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0