Hi
Iam developing an augmented reality browser on my ownn...........But
not able to get the screen cooridinates....
I will discuss my whole problem here.....as im not sure at which point
i stuck up...
I hav a set of latitude longitude values for different points.Taking
them Iam calculating x,y,z coordinates for each point.Using left
handed rule ie.x towards east y towards north and z upwards
values which i get are:-
x=(a+altitude)*(Math.cos(latitude)*Math.sin(longitude));//x
y=(a+altitude)*Math.sin(latitude);//y
z=(a+altitude)*(Math.cos(latitude)*Math.cos(longitude));//z
where a=app 80m i have taken radius of earth.The origin is defined to
be at centre of earth(ECEF)
SensorManager.getRotationMatrix(RTmp, I, grav, mag);
SensorManager.remapCoordinateSystem(RTmp, SensorManager.AXIS_X,
SensorManager.AXIS_Z, R);
SensorManager.getOrientation(R, values);
azimuth = (float)((values[0])*(180/Math.PI)); //in degree
pitch = (float)((values[1])*(180/Math.PI)); //in degree
roll = (float)((values[2])*(180/Math.PI)); //in degree
Then using perspective projection Iam calculating screen coordinates.
Iam refering below link for perspective projection:--
http://en.wikipedia.org/wiki/3D_projection#Perspective_projection
In the above link Iam replacing thetax with pitch,thetay with
roll,thetaz with azimuth.
Watever screen coordinates i got from above calculations Iam plotting
a circle using canvas.But Iam unable to see anything.
Pleae help as Iam stuck up with this for the past 3 dayzzz :( :(
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en