Sie sind nicht angemeldet.

1

Montag, 14. März 2011, 22:22

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!

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Gulsun« (15. März 2011, 08:12)


Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Dienstag, 15. März 2011, 10:14

you need to know the y distans (long1 - long2) and the distance(lat1 - lat2) and then perform a tanges to know the angle between these points.

Alsoo this is a good site: http://www.movable-type.co.uk/scripts/latlong.html

search for bearing.

3

Dienstag, 15. März 2011, 10:33

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

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Dienstag, 15. März 2011, 10:50

plugin

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
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

5

Dienstag, 15. März 2011, 11:22

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!

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

6

Dienstag, 15. März 2011, 11:42

once you have the bearing, you can make a arrow hotspot pointing up, you then can use ath for the bearing (north being at 0)

7

Dienstag, 15. März 2011, 13:46

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));

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

8

Dienstag, 15. März 2011, 14:53

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)

see attachmebnt for image
»Zephyr« hat folgendes Bild angehängt:
  • Untitled-1.jpg

9

Dienstag, 15. März 2011, 16:59

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

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

10

Dienstag, 15. März 2011, 20:25

A panorama is just an image. YOU have to say, my car is north or northwest. Else you can just put your panorama upside down and make it black :P Only then you can start putting hotspots down on base of long/lat.

11

Mittwoch, 16. März 2011, 23:46

Thanks for answer :) i unterstand now :)

12

Mittwoch, 20. Juli 2011, 01:47

orienting panoramas

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

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

13

Mittwoch, 20. Juli 2011, 11:19

Best way is photoshop. But krpano provides a parameter to adjust the rotation:
http://krpano.com/docu/xml/#image.prealign