Package: nautical-calculations
nautical_calculationsnautical-calculations is a Python library used for dealing with some basic Geospatial calculations on the geographic coordinate system.It is developed to act as an interface for performing calculations like the nautical distance (Great Circle distance), Rhumb line distance and bearing angle. It explores the possiblitity of using these basic terms in performing operations like:Finding all the coordinates which lie on the great circle line joining any two points on the mapFinding the coordinates of a point at a particular angle and distance from the given point.Finding the coordinates of midpoint on the great circle line joining any two points on the map.The main idea is to save the time of defining your own functions to derive these terms, thus making the project development easier.InstallationUse the package managerpipto install nautical_calculations.pipinstallnautical-calculationsUsagefromnautical_calculationsimport*orfromnautical_calculations.basicimportget_distancefromnautical_calculations.basicimportget_bearingfromnautical_calculations.basicimportrhumb_linefromnautical_calculations.operationsimportget_pointfromnautical_calculations.operationsimportget_midpointfromnautical_calculations.operationsimportdivide_by_intervalfromnautical_calculations.operationsimportdivide_by_numberUsage examples:I) Nautical distance (km)get_distance(lat1,long1,lat2,long2)# returns the nautical distance (in km) between two coordinates (lat1,long1) and (lat2,long2)II) Bearing (degrees)get_bearing(lat1,long1,lat2,long2)# returns the bearing between two coordinates (lat1,long1) and (lat2,long2)III) Rhumb Line (km)rhumb_line(lat1,long1,lat2,long2)# returns rhumb line distance (in km) between two given coordinatesIV) Point (lat,long)get_point(lat,long,azimuth,distance)# returns the coordinate (lat1,long1) at a particular distance and angle (azimuth) from the given point (lat,long)V) Intermediate points (by number)divide_by_number(lat1,long1,lat2,long2,number)# returns a list containing all points in between the two specified coordinate pairs (lat-long) given the number valueVI) Intermediate points (by interval)divide_by_interval(lat1,long1,lat2,long2,interval)# returns a list containing all points in between the two specified coordinate pairs (lat-long) given the interval valueVII) Midpointget_midpoint(lat1,long1,lat2,long2)#Returns the coordinates of midpoint on the rhumb line joining the given endpoint coordinates (lat1,long1,lat2,long2)VIII) Conversionsfromnautical_calculations.operationsimportconvert_to_radians,convert_to_miles,convert_to_kilometres,convert_to_degressconvert_to_miles(distance)#converts distance in kms to milesconvert_to_kilometres(distance)#converts distance in miles to kmsconvert_to_radians(angle)#converts angle in degrees to radiansconvert_to_degress(angle)#converts angle in radians to degreesGithub repository linkhttps://github.com/AmeyHengle/nautical_calculations.gitContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.Referenceshttp://mathforum.org/library/drmath/view/51879.htmlhttp://www.edwilliams.org/avform.htm#Intermediatehttp://mathforum.org/library/drmath/view/55417.htmlhttp://mathforum.org/library/drmath/view/51822.htmlLicenseMIT