How to calculate bearings between two points (in decimal degrees) using Excel





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







3















Having problems formulating the bearing from two points in decimal degrees in excel. I'm using the following formula:



=MOD(ATAN2(SIN(LonB-LonA)*COS(LatB),COS(LatA*SIN(LatB)-SIN(LatA)*COS(LonB-LonA))),6.30318)


Example data




  • Lat A (38.6318909290283)

  • Lon A (-90.2828979492187)

  • Lat B (38.5352759115441)

  • Lon B(-89.8448181152343)


The answer I get is 5.024 degrees it should be 105.619 degrees










share|improve this question




















  • 1





    I don't know if the formula is correct or not, but Excel's SIN and COS function expect the angles in Radians, not Degrees

    – Ron Rosenfeld
    Jun 10 '16 at 1:52


















3















Having problems formulating the bearing from two points in decimal degrees in excel. I'm using the following formula:



=MOD(ATAN2(SIN(LonB-LonA)*COS(LatB),COS(LatA*SIN(LatB)-SIN(LatA)*COS(LonB-LonA))),6.30318)


Example data




  • Lat A (38.6318909290283)

  • Lon A (-90.2828979492187)

  • Lat B (38.5352759115441)

  • Lon B(-89.8448181152343)


The answer I get is 5.024 degrees it should be 105.619 degrees










share|improve this question




















  • 1





    I don't know if the formula is correct or not, but Excel's SIN and COS function expect the angles in Radians, not Degrees

    – Ron Rosenfeld
    Jun 10 '16 at 1:52














3












3








3


1






Having problems formulating the bearing from two points in decimal degrees in excel. I'm using the following formula:



=MOD(ATAN2(SIN(LonB-LonA)*COS(LatB),COS(LatA*SIN(LatB)-SIN(LatA)*COS(LonB-LonA))),6.30318)


Example data




  • Lat A (38.6318909290283)

  • Lon A (-90.2828979492187)

  • Lat B (38.5352759115441)

  • Lon B(-89.8448181152343)


The answer I get is 5.024 degrees it should be 105.619 degrees










share|improve this question
















Having problems formulating the bearing from two points in decimal degrees in excel. I'm using the following formula:



=MOD(ATAN2(SIN(LonB-LonA)*COS(LatB),COS(LatA*SIN(LatB)-SIN(LatA)*COS(LonB-LonA))),6.30318)


Example data




  • Lat A (38.6318909290283)

  • Lon A (-90.2828979492187)

  • Lat B (38.5352759115441)

  • Lon B(-89.8448181152343)


The answer I get is 5.024 degrees it should be 105.619 degrees







microsoft-excel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 10 '16 at 1:31









Ron Rosenfeld

2,0992611




2,0992611










asked Jun 9 '16 at 22:14









JeffJeff

60129




60129








  • 1





    I don't know if the formula is correct or not, but Excel's SIN and COS function expect the angles in Radians, not Degrees

    – Ron Rosenfeld
    Jun 10 '16 at 1:52














  • 1





    I don't know if the formula is correct or not, but Excel's SIN and COS function expect the angles in Radians, not Degrees

    – Ron Rosenfeld
    Jun 10 '16 at 1:52








1




1





I don't know if the formula is correct or not, but Excel's SIN and COS function expect the angles in Radians, not Degrees

– Ron Rosenfeld
Jun 10 '16 at 1:52





I don't know if the formula is correct or not, but Excel's SIN and COS function expect the angles in Radians, not Degrees

– Ron Rosenfeld
Jun 10 '16 at 1:52










2 Answers
2






active

oldest

votes


















4














Looks like you mistyped the formula when entering into excel.



Also, you need to convert degrees to radians, because excel takes input for trigonometric functions as radians. At the end, need to convert the result of ATAN2 back to degrees.
Solution:



=DEGREES(ATAN2(COS(RADIANS(latA))*SIN(RADIANS(latB))-SIN(RADIANS(latA))*COS(RADIANS(latB))*COS(RADIANS(lonB-lonA)),SIN(RADIANS(lonB-lonA))*COS(RADIANS(latB))))


Source for formula: http://www.movable-type.co.uk/scripts/latlong.html






share|improve this answer



















  • 1





    Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

    – Jeff
    Jun 10 '16 at 16:36













  • that's right, glad I could help

    – JollyMort
    Jun 10 '16 at 16:54



















0














Calculating Azimuth referenced to North (0 degrees) between two x,y locations using UTM Easting and Northing coordinates in metres, I use the following formula:
Azimuth=
=IF(AND(x>=0,y>=0),90-MOD(360+DEGREES(ATAN2(x,y)),360),450-MOD(360+DEGREES(ATAN2(x,y)),360))



Cell name 'x' = distance (difference) between eastings in metres (target minus source)

Cell name 'y' = distance (difference) between northings in metres (target minus source)






share|improve this answer


























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1087449%2fhow-to-calculate-bearings-between-two-points-in-decimal-degrees-using-excel%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    Looks like you mistyped the formula when entering into excel.



    Also, you need to convert degrees to radians, because excel takes input for trigonometric functions as radians. At the end, need to convert the result of ATAN2 back to degrees.
    Solution:



    =DEGREES(ATAN2(COS(RADIANS(latA))*SIN(RADIANS(latB))-SIN(RADIANS(latA))*COS(RADIANS(latB))*COS(RADIANS(lonB-lonA)),SIN(RADIANS(lonB-lonA))*COS(RADIANS(latB))))


    Source for formula: http://www.movable-type.co.uk/scripts/latlong.html






    share|improve this answer



















    • 1





      Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

      – Jeff
      Jun 10 '16 at 16:36













    • that's right, glad I could help

      – JollyMort
      Jun 10 '16 at 16:54
















    4














    Looks like you mistyped the formula when entering into excel.



    Also, you need to convert degrees to radians, because excel takes input for trigonometric functions as radians. At the end, need to convert the result of ATAN2 back to degrees.
    Solution:



    =DEGREES(ATAN2(COS(RADIANS(latA))*SIN(RADIANS(latB))-SIN(RADIANS(latA))*COS(RADIANS(latB))*COS(RADIANS(lonB-lonA)),SIN(RADIANS(lonB-lonA))*COS(RADIANS(latB))))


    Source for formula: http://www.movable-type.co.uk/scripts/latlong.html






    share|improve this answer



















    • 1





      Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

      – Jeff
      Jun 10 '16 at 16:36













    • that's right, glad I could help

      – JollyMort
      Jun 10 '16 at 16:54














    4












    4








    4







    Looks like you mistyped the formula when entering into excel.



    Also, you need to convert degrees to radians, because excel takes input for trigonometric functions as radians. At the end, need to convert the result of ATAN2 back to degrees.
    Solution:



    =DEGREES(ATAN2(COS(RADIANS(latA))*SIN(RADIANS(latB))-SIN(RADIANS(latA))*COS(RADIANS(latB))*COS(RADIANS(lonB-lonA)),SIN(RADIANS(lonB-lonA))*COS(RADIANS(latB))))


    Source for formula: http://www.movable-type.co.uk/scripts/latlong.html






    share|improve this answer













    Looks like you mistyped the formula when entering into excel.



    Also, you need to convert degrees to radians, because excel takes input for trigonometric functions as radians. At the end, need to convert the result of ATAN2 back to degrees.
    Solution:



    =DEGREES(ATAN2(COS(RADIANS(latA))*SIN(RADIANS(latB))-SIN(RADIANS(latA))*COS(RADIANS(latB))*COS(RADIANS(lonB-lonA)),SIN(RADIANS(lonB-lonA))*COS(RADIANS(latB))))


    Source for formula: http://www.movable-type.co.uk/scripts/latlong.html







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 10 '16 at 6:20









    JollyMortJollyMort

    349110




    349110








    • 1





      Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

      – Jeff
      Jun 10 '16 at 16:36













    • that's right, glad I could help

      – JollyMort
      Jun 10 '16 at 16:54














    • 1





      Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

      – Jeff
      Jun 10 '16 at 16:36













    • that's right, glad I could help

      – JollyMort
      Jun 10 '16 at 16:54








    1




    1





    Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

    – Jeff
    Jun 10 '16 at 16:36







    Jolly Thank you. I should have known that. Works and if I add =MOD(<expression>,360) I get the degrees from North.

    – Jeff
    Jun 10 '16 at 16:36















    that's right, glad I could help

    – JollyMort
    Jun 10 '16 at 16:54





    that's right, glad I could help

    – JollyMort
    Jun 10 '16 at 16:54













    0














    Calculating Azimuth referenced to North (0 degrees) between two x,y locations using UTM Easting and Northing coordinates in metres, I use the following formula:
    Azimuth=
    =IF(AND(x>=0,y>=0),90-MOD(360+DEGREES(ATAN2(x,y)),360),450-MOD(360+DEGREES(ATAN2(x,y)),360))



    Cell name 'x' = distance (difference) between eastings in metres (target minus source)

    Cell name 'y' = distance (difference) between northings in metres (target minus source)






    share|improve this answer






























      0














      Calculating Azimuth referenced to North (0 degrees) between two x,y locations using UTM Easting and Northing coordinates in metres, I use the following formula:
      Azimuth=
      =IF(AND(x>=0,y>=0),90-MOD(360+DEGREES(ATAN2(x,y)),360),450-MOD(360+DEGREES(ATAN2(x,y)),360))



      Cell name 'x' = distance (difference) between eastings in metres (target minus source)

      Cell name 'y' = distance (difference) between northings in metres (target minus source)






      share|improve this answer




























        0












        0








        0







        Calculating Azimuth referenced to North (0 degrees) between two x,y locations using UTM Easting and Northing coordinates in metres, I use the following formula:
        Azimuth=
        =IF(AND(x>=0,y>=0),90-MOD(360+DEGREES(ATAN2(x,y)),360),450-MOD(360+DEGREES(ATAN2(x,y)),360))



        Cell name 'x' = distance (difference) between eastings in metres (target minus source)

        Cell name 'y' = distance (difference) between northings in metres (target minus source)






        share|improve this answer















        Calculating Azimuth referenced to North (0 degrees) between two x,y locations using UTM Easting and Northing coordinates in metres, I use the following formula:
        Azimuth=
        =IF(AND(x>=0,y>=0),90-MOD(360+DEGREES(ATAN2(x,y)),360),450-MOD(360+DEGREES(ATAN2(x,y)),360))



        Cell name 'x' = distance (difference) between eastings in metres (target minus source)

        Cell name 'y' = distance (difference) between northings in metres (target minus source)







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 8 at 4:22









        Scott

        16.2k113990




        16.2k113990










        answered Mar 8 at 3:55









        SFR56SFR56

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1087449%2fhow-to-calculate-bearings-between-two-points-in-decimal-degrees-using-excel%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How do I know what Microsoft account the skydrive app is syncing to?

            Grease: Live!

            When does type information flow backwards in C++?