World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 11-14-2007, 03:33 AM   #1
haddazi
Junior Member
 
Join Date: Oct 2007
Posts: 1
haddazi is on a distinguished road
Default zoom and latitude change

I have a property change event listener added to the view. Using the mouse wheel to zoom in (out) about 2000 event are generated however most the values are identical except for a small difference in latitude value of the view. This is not a performance issue however I catch the event to drive another client. Even after the zoom value level off more events are generated with a small change in the latitude value. Following is the debug statement from 2 consecutive property change events. Is it expected to see a latitude change when the zoom is changing (all other values do not change only the latitude change).

=================state change=============
old state:
com.ngc.worldwind.WorldWindViewState Object {
latitude: 38.07266971910206
longitude: -119.99999999999999
zoom: 9989025.468867224
pitch: 1.288632668786364E-4
heading: 0.0
}
new State:
com.ngc.worldwind.WorldWindViewState Object {
latitude: 38.0726695046073
longitude: -119.99999999999999
zoom: 9989073.737495907
pitch: 1.288632668786364E-4
heading: 0.0
}
haddazi is offline   Reply With Quote
Old 11-14-2007, 04:04 AM   #2
dcollins
WWJ Dev. Team
 
Join Date: May 2007
Posts: 449
dcollins is on a distinguished road
Default

In this case very small changes to latitude or longitude are expected (we're talking 7th decimal place to the right here).

We work with viewing transforms in Cartesian space, then translate back to geodetic. In Cartesian space the values are very large, occasionally resulting in floating point rounding "errors". You see this as latitude changing when you didn't ask it to.

If this problem becomes significant, there is hope. We may eventually define a way to work with view transforms that doesn't suffer from this problem.
dcollins is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom to extent Unregistered Development Help 7 12-20-2007 07:26 PM


All times are GMT +1. The time now is 05:19 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.