ajayagarwal1567 / earth-api-samples

Automatically exported from code.google.com/p/earth-api-samples
0 stars 0 forks source link

Model Update using propogation versus continually updating lat/long #565

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What should this feature enhancement do?

Currently in order to update the location of models using the Google Earth API 
the setLocation method must be continuously called for a KMLModel.  In cases 
were model objects are continuously moving it becomes very cumbersome to:
1. Feed the javascript client from services.
2. Very CPU intensive on the user computer running GE Plugin.
3. Makes display control choppy

In order to help the visualization of moving models a new method for KMLModel 
that supports Simplified Perturbations models, SGP4, would benefit users.  This 
would support periodic updates to models and allow the GE Plugin to internally 
control and update the model location.

SGP4 - http://en.wikipedia.org/wiki/Simplified_Perturbations_models

Attached you will find a VERY simplistic example, the model files were pulled 
form the Google 3D Warehouse.

Are there any known workarounds that produce the similar results?
None known.

Original issue reported on code.google.com by dan.c.be...@gmail.com on 22 Nov 2010 at 4:35

Attachments:

GoogleCodeExporter commented 9 years ago
It sounds like your use case would be solved with faster animation through the 
API.  Some tips -- I was able to make your example work smoothly using these 
workarounds:

1) use Firefox.  The overhead on calls into plugins is much lower than the 
webkit browsers, for whatever reason.

2) change updateRate to 16.  (With updateRate at 200, you will never get better 
than 5 frames per second.)

3) it helps to minimize API calls inside your turkeyTimer() routine.  One way 
to do this is to keep a locationsArray for the model location object, and keep 
Javascript arrays for the current lat and lon, instead of calling 
location.getLatitude()/getLongitude().  Finally, the call to 
modelArray[i].setLocation(location) is not necessary.

Original comment by tulr...@google.com on 23 Dec 2010 at 3:30