PIC Vietnam

Go Back   PIC Vietnam > Microchip PIC > English forum on PICs

Tài trợ cho PIC Vietnam
Trang chủ Đăng Kí Hỏi/Ðáp Thành Viên Lịch Bài Trong Ngày Vi điều khiển

English forum on PICs Forum for foreigners -only English in this forum - Do not need to register or login

 
 
Ðiều Chỉnh Xếp Bài
Prev Previous Post   Next Post Next
Old 14-02-2011, 08:37 AM   #21
vietnamtour
Nhập môn đệ tử
 
Tham gia ngày: Feb 2011
Bài gửi: 5
:
Hi Everybody,

I'm not sure if this is the right forum, but as you all have some knowledge about google maps, maybe you can help me. So here is what I want to do:

I have a database table with users and I have the google geocoordinates of them. I also have a table with places and the geo-codes of them.

Users can visit places. What I want to do now is calculate the distance a user has traveled from one place to another. But only the direct distance, not the actual distance of the route.

By using some trigonometry it's quite simple:
(latA-latB)^2 + (lonA-lonB)^2=distance^2

But the geocodes are signed... And what is a difference of 5.0 geocoords in kilometers? It's not necessary for me to have the spheric shape of earth in my calculation. And I don't want to use the google maps api to caluclate it, as i have to calculate a huge amount of distances for every user. I would like to do it in a way similar to the one I showed above, with trigonometry.

Maybe you can help me. I would really appreciate that.

Thanks in advance

Spackbirne
vietnamtour vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn
 


Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt

Chuyển đến

Similar Threads
Ðề tài Người gửi Chuyên mục Trả lời Bài mới
Link download của tất cả tài liệu trong forum plz! vaiduakhu Đóng góp ý kiến 1 23-05-2006 09:58 AM
forum falleaf Đóng góp ý kiến 2 05-12-2005 09:26 PM
Chúc mừng sự thành lập của Forum PICVietnam trung Đóng góp ý kiến 1 12-06-2005 07:11 PM


Múi giờ GMT. Hiện tại là 11:19 AM.


Được sáng lập bởi Đoàn Hiệp
Powered by vBulletin®
Page copy protected against web site content infringement by Copyscape
Copyright © PIC Vietnam