Excel-based method for calculating distance between two points by using longitude and latitude through vector method
By applying vector method in Excel, using latitude and longitude data to calculate the distance between two points in marine ecological monitoring, the problems of low computing efficiency and complex operation in the existing technology are solved, and fast and simple distance calculation and range planning optimization are achieved. .
Patent Information
- Application Number
- CN202410963924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-08
AI Technical Summary
In marine ecological monitoring, it is difficult for the existing technology to quickly and effectively calculate the distance between two points, resulting in low efficiency in voyage planning and data processing, and requires professional skills to operate map production software, limiting the number of staff.
The vector method based on Excel is used to obtain latitude and longitude data, convert it into radian data, and use the earth's average radius and trigonometric function to represent vector coordinates, and calculate the included angle and distance based on the quantity product formula and the inverse cosine function, simplifying the calculation process.
It realizes rapid calculation of the distance between two points, reduces the workload of marine ecological monitoring range planning, optimizes the range planning, saves voyage costs, and improves data processing efficiency and is easy to operate.
Smart Images

Figure CN118916598A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a method for calculating the distance between two points by using longitude and latitude in a vector method based on Excel. Background Art
[0002] In the process of marine ecological monitoring, it is necessary to plan the survey voyage schedule according to the distance between the monitoring stations, and estimate the corresponding voyage costs. In addition, after the ecological monitoring sampling is completed, the horizontal trawling and bottom trawling data processing of the organisms also need to use the distance between the sampling starting point and the end point. In current work, if the longitude and latitude of two points are known, the distance between the two points is mostly calculated in map making software such as ArcGIS or Surfer. However, the operation of map making software requires certain basic knowledge and professional skills, and the operation is relatively complicated, and there are fewer staff members who can skillfully operate map making software. In order to improve the working efficiency of the distance calculation problem between the stations in marine ecological monitoring, the present invention attempts to solve the calculation problem from longitude and latitude to the distance between two points with common office software Excel. Summary of the invention
[0003] The present invention overcomes the defects of the prior art and provides a method for calculating the distance between two points using longitude and latitude using the vector method based on Excel. Its important purpose is to reduce the workload of marine ecological monitoring voyage planning, quickly calculate the total sailing distance, optimize voyage planning, save voyage costs, and improve the efficiency of data processing in the later stage of marine ecological monitoring.
[0004] To achieve the above object, the present invention provides a method for calculating the distance between two points using longitude and latitude by vector method based on Excel in a first aspect, comprising: Obtain the decimal latitude and longitude data of survey station point A and point B, and convert the latitude and longitude data of the survey station into arc data; Using the average radius of the earth r and the longitude and latitude of point A and point B The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of Solving vectors based on the vector dot product formula The angle between The cosine of ; Solving for vectors using the inverse cosine function The angle between The arc of Based on the definition of radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The length of the arc is the distance between point A and point B.
[0005] In this scheme, the decimal latitude and longitude data of survey station point A and point B are obtained, and the latitude and longitude data of the survey station are converted into radian data, specifically including: The radian conversion formula for point A and point B is as follows: ; in, is the conversion result of the longitude arc of point A, is the conversion result of the longitude arc of point B, is the latitude radian conversion result of point A, is the latitude radian conversion result of point B, is the longitude coordinate of point A, is the longitude coordinate of point B, is the latitude coordinate of point A, is the latitude coordinate of point B.
[0006] In this scheme, the average radius of the earth r and the arc of longitude and latitude of point A and point B are used. The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of , including: With the center of the earth as the origin O, establish the x, y and z axis earth coordinate system, the x axis is in the equatorial plane and intersects the prime meridian, the z axis is along the direction of the earth's rotation axis, and the y axis forms a right-handed coordinate system with the x axis and the z axis; Draw perpendicular lines from point A and point B to the equatorial plane to obtain the foot of the perpendicular A1 and B1, which form a vector with the center of the earth O , is a vector Projection vector on the equatorial plane; Longitude radian For vector Angle with the x-axis, latitude radians For vector The angle of According to the average radius of the earth r The latitude and longitude of point A and point B in radians The trigonometric relationship between vectors and The coordinates are: . ; in, is the conversion result of the longitude arc of point A, is the conversion result of the longitude arc of point B, is the latitude radian conversion result of point A, The latitude radian conversion result of point B.
[0007] In this solution, the vector is solved based on the vector dot product formula The angle between The cosine value of , including: The vector The formula for the scalar product is: ; The vector The angle between The formula for calculating the cosine value of is: ; in, For vector The model, For vector Model.
[0008] In this solution, the vector is solved by the inverse cosine function. The angle between The arc includes: The angle The formula for calculating the arc is: ; in, For vector The angle between The cosine value of .
[0009] In this solution, the definition based on radians is: The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The arc length is the distance between point A and point B, including: The central angle The mathematical expression is: =∠AOB= ; in, is the central angle formed by point A and point B and the center of the earth O, that is, ∠AOB, for The length of the arc, r is the average radius of the earth; Said The solution formula is: ; in, is the arc length, r is the average radius of the Earth.
[0010] A second aspect of the present invention provides a system for calculating the distance between two points by using longitude and latitude using a vector method based on Excel, the system comprising: a memory and a processor, the memory containing a method program for calculating the distance between two points by using longitude and latitude using a vector method based on Excel, and the method program for calculating the distance between two points by using longitude and latitude using a vector method based on Excel when executed by the processor implements the following steps: Obtain the decimal latitude and longitude data of survey station point A and point B, and convert the latitude and longitude data of the survey station into arc data; Using the average radius of the earth r and the longitude and latitude of point A and point B The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of Solving vectors based on the vector dot product formula The angle between The cosine of ; Solving for vectors using the inverse cosine function The angle between The arc of Based on the definition of radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The length of the arc is the distance between point A and point B.
[0011] The third aspect of the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes a method program for calculating the distance between two points using longitude and latitude using a vector method based on Excel, and when the method program for calculating the distance between two points using longitude and latitude using a vector method based on Excel is executed by a processor, the steps of the method for calculating the distance between two points using longitude and latitude using a vector method based on Excel as described in any one of the claims are implemented.
[0012] Compared with the prior art solutions, the present invention has the following beneficial effects: (1) The present invention uses the knowledge of vector dot product and radians to explain the calculation method of the distance between two points from longitude and latitude, and the calculation method is simple; (2) The present invention uses Excel These four trigonometric functions are used to compile a calculation formula for calculating the distance between two points from longitude and latitude. A small number of functions are used and the calculation method is quick.
[0013] (3) The present invention uses Excel to read the longitude and latitude data of the survey station, and by editing the distance calculation formula into Excel, the distance between the two points at the return output end is realized, and the operation method is simple.
[0014] Therefore, the method of calculating the distance between two points by using the vector method based on Excel described in the present invention is a method that saves time, effort and worry. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the drawings required for use in the embodiments or exemplary descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to the drawings without paying creative work.
[0016] Figure 1 A flow chart of a method for calculating the distance between two points using longitude and latitude using a vector method based on Excel according to an embodiment of the present invention; Figure 2 A schematic diagram of the principle of a calculation method provided by an embodiment of the present invention; Figure 3 A comparison chart of Excel calculation results and ArcGIS vector calculation results provided in one embodiment of the present invention; The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0017] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0018] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0019] Figure 1 A flow chart of a method for calculating the distance between two points using longitude and latitude using a vector method based on Excel according to an embodiment of the present invention; like Figure 1 As shown, the present invention provides a method flow chart for calculating the distance between two points using longitude and latitude using a vector method based on Excel, including: S102, obtaining the decimal latitude and longitude data of survey station point A and point B, and converting the latitude and longitude data of the survey station into radian data; S104, using the average radius of the earth r and the longitude and latitude of point A and point B The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of S106, solve vector based on vector dot product formula The angle between The cosine of ; S108, solve vector by arccosine function The angle between The arc of S110, based on the definition of radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The length of the arc is the distance between point A and point B.
[0020] It should be noted that longitude and latitude coordinates are usually used to identify the position of any point on the surface of the earth. Longitude and latitude are coordinate systems composed of longitude and latitude. They are spherical coordinate systems that use a three-dimensional coordinate system to define space on the earth. Longitude is a dihedral angle, which takes the prime meridian plane as the starting point plane and the meridian plane where a certain point is located as the end point plane. That is to say, the longitude of a certain point is the plane angle of the dihedral angle formed by the meridian plane where the point is located and the prime meridian plane. The prime meridian is the 0° longitude of the earth. The International Meridian Conference in 1884 decided to use the meridian passing through the Airy transit instrument at the Royal Observatory (old site) in Greenwich, London, England as the prime meridian, as the starting meridian for longitude measurement. The east of the prime meridian is called the east longitude, and the maximum value of the east longitude is 180°. The west of the prime meridian is called the west longitude, and the maximum value of the west longitude is 180°. Latitude is a line-plane angle, which is the line-plane angle formed by the line connecting a certain point with the center of the earth and the equatorial plane of the earth. The equator is the 0° latitude of the earth. The latitude north of the equator is called the north latitude, and the maximum value of the north latitude is 90°N. The latitude south of the equator is called the south latitude, and the maximum value of the south latitude is 90°S.
[0021] Further, in a preferred embodiment of the present invention, the detailed process of the Excel-based method for calculating the distance between two points using longitude and latitude by vector method is as follows: S102, obtaining the decimal latitude and longitude data of survey station point A and point B, and converting the latitude and longitude data of the survey station into radian data; With the center of the earth as the origin O, establish the earth coordinate system of x, y and z axes, and obtain the decimal latitude and longitude data of the survey station, that is, obtain the latitude and longitude coordinates of two points A and B on the earth's surface; In the established earth coordinate system, the average radius of the earth is r, the x-axis is in the equatorial plane and intersects the prime meridian, the z-axis is along the direction of the earth's rotation axis, and the y-axis forms a right-handed coordinate system with the x-axis and the z-axis; The expressions of the obtained longitude and latitude coordinates of the two points A and B on the earth's surface are: ; in, is the longitude coordinate of point A, is the longitude coordinate of point B, is the latitude coordinate of point A, is the latitude coordinate of point B.
[0022] Convert the decimal degrees of longitude and latitude of point A and point B into radians (λ, φ) (rad); The radian conversion formula for point A and point B is as follows: ; in, is the conversion result of the longitude arc of point A, is the conversion result of the longitude arc of point B, is the latitude radian conversion result of point A, is the latitude radian conversion result of point B, is the longitude coordinate of point A, is the longitude coordinate of point B, is the latitude coordinate of point A, is the latitude coordinate of point B.
[0023] S104, using the average radius of the earth r and the longitude and latitude of point A and point B The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of Draw perpendicular lines from point A and point B to the equatorial plane to obtain the foot of the perpendicular A1 and B1, which form a vector with the center of the earth O , is a vector Projection vector on the equatorial plane; Longitude radian For vector Angle with the x-axis, latitude radians For vector The angle of use and the average radius of the Earthr To represent vector and The coordinates are: ,① in, is the conversion result of the longitude arc of point A, is the conversion result of the longitude arc of point B, is the latitude radian conversion result of point A, The latitude radian conversion result of point B.
[0024] S106, solve vector based on vector dot product formula The angle between The cosine of ; The vector The formula for the scalar product is: ; The vector The angle between The formula for calculating the cosine value of is: , ② in, For vector The model, For vector The model, .
[0025] Furthermore, according to vector coordinate operations, the dot product of two vectors is equal to the sum of the products of their corresponding coordinates, specifically: ; Substituting the specific coordinates into formula ①, we get: , ③ Based on the trigonometric formula of the difference between two angles Based on the trigonometric formula of the difference between two angles , transform formula ③ into: , ④ Substituting equation ④ into equation ②, we get: ,⑤ Finally, we get the vector The angle between The cosine value of .
[0026] S108, solve vector by arccosine function The angle between The arc of The vector is transformed by the inverse cosine function The angle between Solve for the cosine value of The arccosine function is ; in, For vector The angle between The cosine value of .
[0027] S110, based on the definition of radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The length of the arc is the distance between point A and point B.
[0028] The central angle The mathematical expression is: =∠AOB= , in, is the central angle formed by point A and point B and the center of the earth O, that is, ∠AOB, for The length of the arc, r is the average radius of the earth; Said The solution formula is: ,⑥ in, is the arc length, r is the average radius of the Earth, Angle The arc.
[0029] Further, substitute equation ⑤ into equation ⑥ to solve The arc length, that is, the distance between survey stations A and B, is: ,⑦ Based on formula ⑦, the distance between survey stations A and B is obtained.
[0030] Further, according to the above calculation principle, use , , , These four trigonometric functions can complete the functions of the embodiment of the present invention. The calculation formula of the method for calculating the distance between two points using the longitude and latitude based on Excel is as follows: .
[0031] In addition, the following description is made of the variables and functions involved in the calculation formula of the method for calculating the distance between two points using the longitude and latitude by the vector method based on Excel provided by the present invention: (1) Variables : is the longitude of points A and B on the Earth's surface in decimal degrees (°); : is the latitude of points A and B on the Earth's surface in decimal degrees (°); : is the average radius of the Earth, which is 6371.393km; d : is the distance between point A and point B on the earth's surface, in km.
[0032] (2) Function RADIANS: is a function that converts angles into radians. )、RADIANS( )、RADIANS( ) and RADIANS( ) - Use the RADIANS function to convert the longitude and latitude of point A and point B from decimal degrees (°) to radians (rad); COS: is a function to find the cosine value of radians. Indicates that the latitude of point A and point B is converted from decimal degrees to degrees using the RADIANS function. Convert to radians and Then, use the COS function to calculate and The cosine value of ; Representation: Use the RADIANS function to convert the longitude of point A and point B from decimal degrees to Convert to radians and Then, use the COS function to calculate ( ), we get ; SIN: is a function to find the sine value of radians. Indicates that the latitude of point A and point B is converted from decimal degrees to degrees using the RADIANS function. Convert to radians and Then, use the SIN function to calculate and The sine value of ; ACOS: is a function to find the arc cosine radian of the cosine value. ; Indicates calculation using ACOS function The arc cosine radian is used to obtain the central angle between point A and point B and the center of the earth O. The arc of ; Indicates that r and The distance between point A and point B is calculated by multiplying the distance between them.
[0033] Figure 2 A schematic diagram of the principle of a calculation method provided by an embodiment of the present invention; like Figure 2 As shown, point A and point B are the endpoints of the distance to be measured, r is the average radius of the earth; ∠AOB is the central angle formed by point A and point B and the center of the earth O , points A' and B' are the feet of perpendicular lines drawn from points A and B to the equatorial plane, OA' and OB' are vectors Projection on the equatorial plane. ∠xOA' and ∠xOB' are longitudes The plane angle of the dihedral angle, radians ; ∠AOA' and ∠BOB' are latitude The line angle represented by .
[0034] It should be noted that when two rays are emitted from the center of a circle to the circumference, an angle is formed. When the arc length of this angle is equal to the radius of the circle, the arc size of this angle is defined as 1 radian. A radian is an angular unit that measures the central angle of a circle by the ratio of the arc length to the radius of the circle.
[0035] Furthermore, the latitude and longitude data in the present invention is generated using the RAND function in Excel, using the formula f(x) =m+RAND()*(nm) can generate uniformly distributed random real numbers greater than or equal to m and less than or equal to n, and 30 sets of longitude and latitude data are generated at low latitudes, middle latitudes and high latitudes. The present invention uses a total of 90 sets of longitude and latitude data.
[0036] Furthermore, the reliability of the distance calculation result of the method for calculating the distance between two points using the longitude and latitude by the vector method based on Excel provided by the present invention is verified as follows: 90 longitude and latitude data randomly generated by Excel are used to calculate the distance between two adjacent longitude and latitude data in Excel based on the calculation formula of the calculation method of the present invention, which is recorded as distance d 1At the same time, using these 90 identical longitude and latitude data in ArcGIS, through ArcToolbox-Data Management Tools-Features-XY ToLine, calculate the distance between two adjacent longitude and latitude in the CGCS2000_3_Degree_GK_CM_114E projection coordinate system by Calculate Geometry-Length, and record it as distance d 2 In Excel, use ROUND(d,3) to convert the distances obtained by the above two calculation methods into d 1 and d 2 All values are rounded to 3 decimal places. ,calculate d 1 and d 2 The relative error of .
[0037] The generated 90 longitude and latitude data are divided into three categories: low latitude, middle latitude and high latitude for relative error analysis, and the relative error statistics of the three types of latitude are performed, as shown in Tables 1, 2, 3 and 4 below: Table 1. Relative error statistics of calculation results based on low latitudes ; Table 2. Relative error statistics of calculation results based on mid-latitudes ; Table 3. Relative error statistics of calculation results based on high latitudes ; Table 4. Relative error statistics of calculation results based on three latitude band examples ; The results show that in low latitudes, d 1 and d 2 The average relative error is 0.1%; in the mid-latitude region, d 1 and d 2 The average relative error is 0.02%; in high latitudes, d 1 and d 2 The average relative error is -0.4%, which indicates that the method of calculating the distance between two points by using the vector method of longitude and latitude in Excel in the present invention is reliable.
[0038] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0039] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0040] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0041] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0042] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0043] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method based on Excel to calculate the distance between two points using longitude and latitude using vector method. It is characterized in that include: Obtain the decimal latitude and longitude data of survey station point A and point B, and convert the latitude and longitude data of the survey station into arc data; Using the average radius of the earth r and the longitude and latitude of point A and point B The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of Solving vectors based on the vector dot product formula The angle between The cosine of ; Solving for vectors using the inverse cosine function The angle between The arc of Based on the definition of radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The length of the arc is the distance between point A and point B.
2. The method of calculating the distance between two points by longitude and latitude based on Excel using vector method according to claim 1, It is characterized in that The step of obtaining the decimal latitude and longitude data of survey station point A and point B, and converting the latitude and longitude data of the survey station into radian data, specifically includes: The radian conversion formula for point A and point B is as follows: ; in, is the conversion result of the longitude radian of point A, is the conversion result of the longitude arc of point B, is the latitude radian conversion result of point A, is the latitude radian conversion result of point B, is the longitude coordinate of point A, is the longitude coordinate of point B, is the latitude coordinate of point A, is the latitude coordinate of point B.
3. The method of calculating the distance between two points by longitude and latitude based on Excel using vector method according to claim 1, It is characterized in that The average radius of the earth r and the longitude and latitude of point A and point B are used to calculate the arc The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of , including: With the center of the earth as the origin O, establish the x, y and z axis earth coordinate system, the x axis is in the equatorial plane and intersects the prime meridian, the z axis is along the direction of the earth's rotation axis, and the y axis forms a right-handed coordinate system with the x axis and the z axis; Draw perpendicular lines from point A and point B to the equatorial plane to obtain the foot of the perpendicular A. 1 and B 1 , and the Earth's center O forms a vector , is a vector Projection vector on the equatorial plane; Longitude radian For vector Angle with the x-axis, latitude radians For vector The angle of According to the average radius of the earth r The latitude and longitude of point A and point B in radians The trigonometric relationship between vectors and The coordinates are: ; in, is the conversion result of the longitude radian of point A, is the conversion result of the longitude arc of point B, is the latitude radian conversion result of point A, The latitude radian conversion result of point B.
4. The method of calculating the distance between two points by longitude and latitude based on Excel using vector method according to claim 1, It is characterized in that The vector dot product formula is used to solve the vector The angle between The cosine value of , including: The vector The formula for the scalar product is: ; The vector The angle between The formula for calculating the cosine value of is: ; in, For vector The model, For vector Model.
5. The method of calculating the distance between two points by longitude and latitude based on Excel using vector method according to claim 1, It is characterized in that The vector is solved by the arc cosine function The angle between The arc includes: The angle The formula for calculating the radian is: ; in, For vector The angle between The cosine value of .
6. The method of calculating the distance between two points by longitude and latitude based on Excel using vector method according to claim 1, It is characterized in that The definition based on radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The arc length is the distance between point A and point B, including: The central angle The mathematical expression is: =∠AOB= ; in, is the central angle formed by point A and point B and the center of the earth O, that is, ∠AOB, for The length of the arc, r is the average radius of the earth; Said The solution formula is: ; in, is the arc length, r is the average radius of the Earth.
7. A system based on Excel that uses the vector method to calculate the distance between two points using longitude and latitude. It is characterized in that The system includes: a memory and a processor, wherein the memory contains a method program for calculating the distance between two points by using the vector method using the longitude and latitude based on Excel, and when the method program for calculating the distance between two points by using the vector method using the longitude and latitude based on Excel is executed by the processor, the following steps are implemented: Obtain the decimal latitude and longitude data of survey station point A and point B, and convert the latitude and longitude data of the survey station into arc data; Using the average radius of the earth r and the longitude and latitude of point A and point B The trigonometric relationship represents the vector between the center of the earth O and the survey station points A and B The coordinates of Solving vectors based on the vector dot product formula The angle between The cosine of ; Solving for vectors using the inverse cosine function The angle between The arc of Based on the definition of radians, The radian is The ratio of the corresponding arc length to the circle radius can be solved The arc length is The length of the arc is the distance between point A and point B.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a method program for calculating the distance between two points using longitude and latitude using a vector method based on Excel. When the method program for calculating the distance between two points using longitude and latitude using a vector method based on Excel is executed by a processor, the steps of the method for calculating the distance between two points using longitude and latitude using a vector method based on Excel as described in any one of claims 1 to 6 are implemented.
