Great circle distance formula

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11109 Score: 0
    Jacob Sagrans
    Participant

    Can anyone help me figure out why in this CODAP document, the great circle distance formula for the monthly distance traveled attribute shows a value other than zero for the first case/row in the table? https://codap.concord.org/app/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2F3OyXAyVgp6gZdAD6D6Lm%2Ffile.json

    And also, why is this the formula (first image below) that seems to work (with prev(Lat, Lon) specified twice), rather than just having it once, as the help page on formulas specifies? (second image below). Thanks!

    #11110
    Jacob Sagrans
    Participant

    Oh I think maybe this is what I want, although how would I alter it so the first row shows “0” for mileage?

    #11111
    Jacob Sagrans
    Participant

    Ah I think I figured it out! Wow that’s a lot of Latitudes and Longitudes to keep straight.

    #11114
    Bill Finzer
    Keymaster

    Hi Jacob,

    Yes, that works because by saying prev(Latitude, Latitude) you’re saying, if there’s no previous value of Latitude, use the current value. And the current value minus the current value is zero.

    Nice job figuring this out!

    Bill

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.