Comments (10)
We never did implement a feature that would identify objects from a click. I do
have a test build somewhere that did something like that, though. I'll see if I
can find it.
Original comment by [email protected]
on 23 Jan 2012 at 3:36
from stardroid.
that would be really really great.
i'm really lost right now. I can catch the MotionEvent without a problem, also
getting the AstronomerModel and the Pointing (which includes the line of sight)
is not a problem.
But from here i'm lost. How to convert the screen coordinates of the
MotionEvent to GeocentricCoordinates? And when i have those, how to find the
object that is at that location?
Greets
Original comment by [email protected]
on 23 Jan 2012 at 3:44
from stardroid.
I must have deleted the code because I couldn't find it.
For converting screen coordinates, I think I basically did linear
interpolation. If you know the coordinates of the four corners of the screen,
you can interpolate the location of the event. Note that this breaks down at
the corners. It is also a pretty bad assumption if you are zoomed way out. It
should be good enough for experiments, though.
For the search, I think you can do a linear search. We should have all of the
coordinates of objects in memory. I would simply compare the coordinates of the
event with the coordinates of each object and return the closest one. If you
follow the logic for searches, you should find the right data structures. I
realize that its inefficient, but again, it should be good enough for now.
Its been a while since I looked at that code, so I can't give you any concrete
references. I'll try to poke around in the code over the next couple of days
and send more concrete suggestions.
Original comment by [email protected]
on 24 Jan 2012 at 12:27
from stardroid.
You may also want to pop up a list of nearby objects if the area is crowded.
That's what I do in LunarMap for Android and AstroInfo for Palm.
Original comment by arpruss
on 24 Jan 2012 at 1:24
from stardroid.
The approach with the linear interpolation using the edges of the "visibly sky"
is a great idea.
But how do i get those four edges? Are there any helper functions present for
that?
Original comment by [email protected]
on 24 Jan 2012 at 2:05
from stardroid.
Kevin if you do happen to find that code or know of any good resources to get
other started on re-inventing it that would be appreciated.
As I mentioned elsewhere I'm trying to get something going to take advantage of
Starmap and Skywatcher's Panorama app both being open source, being able to
click on an object on screen to select the object for further action (such as
slewing a telescope to it) would be a very hand addition.
Bob
Original comment by [email protected]
on 22 Apr 2012 at 9:07
from stardroid.
Realised that I'd not done enough with google prior to that last question.
Sorry about that. I'll do some more homework and may then need to ask some more
questions.
Bob
Original comment by [email protected]
on 22 Apr 2012 at 11:24
from stardroid.
There's been any develop on this? I'm trying to do the same, but I'm completely
lost...
Original comment by [email protected]
on 2 Dec 2014 at 10:30
from stardroid.
[deleted comment]
from stardroid.
Ok, so here's what I've done.
I captured the labels Geocentric Positions and stored all of them in the
ApplicationConstants class. You can get them in the
ProtobufAstronomicalSource.getLabels(), except for the planets, wich you can
get on PlanetSource.initialize().
Then, when the user clicks, the method onSingleTapConfirmed is called in the
class com.google.android.stardroid.touch.GestureInterpreter. Inside this method
I get all the labels, convert the Geocentric Postions into screen position,
using this code attached.
I hope this helps.
Marcio Granzotto Rodrigues
Original comment by [email protected]
on 6 Jan 2015 at 8:14
Attachments:
from stardroid.
Related Issues (20)
- Use Gyroscope when available HOT 7
- Declare android:required="false" for android.hardware.location.gps feature HOT 1
- Inconsistent Certificates HOT 2
- Check position against horizon HOT 2
- Enhancement request: Fixing horizon during manual-mode time travel HOT 3
- Feature request: Telescope Interface HOT 2
- Wrong search direction when changing date
- View is not smooth (but shaking left and right) HOT 1
- Wrong search box size HOT 2
- Rigel in Centaurus should be Riger Kenttaurus HOT 1
- No class "com.google.android.stardroid.R" in current source ?
- Patch for /trunk/app/res/values-zh-rCN/strings.xml
- Assertion failed at testPositions (RaDecTest.java) HOT 2
- Add ISS to list of objects
- Feature request: add option for devices without compass
- Constants are being modified
- Can't find constellations using English names in translated versions of Sky Map
- Transition project to Git/Github
- Option to disable sensor-tracking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stardroid.