Angle of panormaic images

  • Hi,

    I have a lot of panoramic images which are assigned to coordinates, do you have any suggestion/advise how can i calculate the arrow direction to enable to go the next panorama?

    Thanks in advance!

    Edited 2 times, last by Gulsun (March 15, 2011 at 8:12 AM).

  • Hi,

    Thanks for answer! I have also tried some ways (postgis, bearing calculation) but i dont know how can i show this result as arrow in krpano (ath/atv or rotate)?

    best regards
    Gülsün

  • Hi.

    I have KRpano plugin who automatically calculates the distance between two markers.

    example no javascript *cool*

    The result given in kilometers in miles.

    pietero

    edit:

    I used this formula.
    ACOS(SIN(lat1)*SIN(lat2)+COS(lat1)*COS(lat2)*COS(lon2-lon1))*6371

  • Hi spacerywirtualne,

    Your plugin is not for download or? Anyway i need a solution to show my arrow direction in krpano automatically. Is there any way to draw a line between two lat/lon(maybe it is a solution)? Or bearing is really for me a solution?

    Is there nobody who really worked with lat/lon?

    Thanks in advance!

  • Hi Zephyr,

    Thanks for answer! What do you exactly mean with (north being at 0)?

    My Problem is;

    if my way horizantal like this bearing from X to x2 => 90 and from X to x3 => 270. I see my arrow in left and right not in front of my car. (my arrow in the wrong place)

    --------------------------------------------
    x1 X x2
    --------------------------------------------

    if my way; X to X1 => 0 and X to X2 => 180. And my arrow in the right place, in front or back of my car.

    | x1 |
    | |
    | X |
    | |
    | x2 |
    | |

    Do you have any advice? Thanks a lot!

    Gülsün


    My code calculating bearing in java
    double dLon = Math.toRadians(Double.valueOf(point2.getLon())-Double.valueOf(point1.getLon()));

    double y = Math.sin(dLon) * Math.cos(Double.valueOf(point2.getLat()));
    double x = Math.cos(Double.valueOf(point1.getLat()))*Math.sin(Double.valueOf(point2.getLat())) -
    Math.sin(Double.valueOf(point1.getLat()))*Math.cos(Double.valueOf(point2.getLat()))*Math.cos(Double.valueOf(dLon));
    double brng = Math.atan2(y, x);
    return (Math.toDegrees(brng));

  • Hi Zephyr,

    Firstly thanks for answer but i cannot understand exactly, what do you mean?

    I have to change my latitude and longitude for aliging to north 0? Because i tried your formula but it does not work for me. Or i have to calculate bearing of my lat/lon to north.

    best regards
    Gülsün

  • with north = 0, I mean that you should align your panorama so, that the center of the image is your north bearing (so in krpano ath = 0 = north)

    Hello, I have the problem of having two panoramas wich are not align to same 'north', meaning, the ath = 0 is looking at different directions in both panos. this is a problem when going from one pano to the next, since they are no aligned to eacht other.

    how can i correct this? some correction factor, so ath=0 is lookint at the real north in both panoramas.

    thanks

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!