Hello,
Currently, I am working on a project to couple Matlab/Simulink with Google Earth for a quasi flight simulator. To communicate with Google Earth (GE), I use COM server with help from this function (http://www.mathworks.com/matlabcentral/fileexchange/20031-google-earth-com-api-example)
A Matlab function will control the camera movement in GE via COM server. The function control the GE camera by sending new coordinates (lat, long, alt, and camera position). To do this, I use for loop. The problem I am facing right now is, the output speed from MATLAB varies. At the beginning of the loop, the camera moves slow, then it becomes faster. Approaching the end of the loop, the camera speed is the fastest.
I tried to regulate the sending interval with help of the function timer, but I don't know how can I integrate for loop in a timer. Usage of global variables in timer function also gave me error message. Anyone has any idea?
There is a possibility to have function to write a KML script to display the motion. But the main objective is to have this coupling working in real time as possible.
Any help would be appreciated.
Thanks.
|
|
1
|
|
|
|
Reply
|
Wan
|
3/28/2011 12:21:04 PM |
|