7 ms·
Show HN: Galactic Compass – an app that points to the galactic center
I made a single-serving iPhone app with a floating green arrow that always points to the center of the Milky Way, 26,000 lights years away. It’s weirdly grounding. I’ve never made an app before, so here’s how it worked with ChatGPT.
- amarant 3y agoThis is pretty cool! Also happy to see you were able to make such an original app using chatgpt! It's a great counter example to some of the weirder arguments I've seen on here against generative ai's! Now, if you could make this again, but for Android, I might be able to hitch a ride home to Betelgeuse V!
- kej 3y agoIt's not quite the same thing, but on Android you can use Sky Map [1] and search for "M6". (The actual center is just off from the star in Sagittarius that is closest to M6 (γ2 Sagittarii), but I don't believe Sky Map will let you search for it directly.) [1] https://play.google.com/store/apps/details?id=com.google.android.stardroid https://play.google.com/store/apps/details?id=com.google.and...
- jwitchel 3y agoFlat Earthers rejoice!
- hollander 3y agoWhen i hold it upwards isFlat becomes false, but when i hold the phone upwards in landscape mode isFlat stays true. Why do i need to keep the phone flat? Doesn't that depend on the rotation of the earth?
- LoganDark 3y agoPure speculation: Because the iPhone only has an Earth compass, the app has to calculate which direction to point based on the position of the Earth (relative to the Milky Way), the iPhone's built-in compass, and world position. Which means the phone has to be perfectly flat or else the calculation will be off. I think there are ways to use the other sensors to more accurately estimate the phone's orientation even when it's not perfectly flat, but maybe this developer just didn't get around to it.
- tocs3 3y agoI would think an iPhone would have a 3 axis magnetometer and 3 axis accelerometer to sense the phones orientation (and 3 axis gyro). The magnetometer would be where the compass functions would come from.
- LoganDark 3y agoYes, it almost definitely does. Which is why I added that the developer probably just hadn't found a way to use those sensors for this purpose yet.
- genmon 3y agoGood guess! I can only find deviceHeading as is a projection of the north vector onto the long axis of the device. When the phone is orthogonal to north, that becomes unreliable. What I really need is the north vector, real-time updated, relative to the device itself, no projection. I might be missing this? The iOS SDK is big and this is my first app, so pointers very welcome.
- elevaet 3y agoThis is very awesome! I've had a fantasy for a couple of years of building a physical device that would do this. I imagine a sphere that uses a pair of rings on axis supporting an inward arrow that can rotate in all directions within the sphere - similar to how a dual axis globe works. Your software version is much simpler to execute :)
- mncharity 3y agoI years ago did an exploratory prototype riffing on those town-center poles festooned with directional arrows. The base was a big fixed globe lat-lon frame, oriented to match the geographic location. Filled with arrows from the location (top of the globe) down towards assorted Earth highlights, with lengths obviously to scale. Then a (manually) despun unit with an ecliptic plate's scale planet arrows, and a set of non-scale arrows for other features (core, spinward, galactic orbital vector, great attractor, etc). A smaller second globe, similarly fixed, was solid to more easily see the Sun's shadow, which matches that on the Earth. And to have two similarly-oriented globes in hand, to hopefully make it easier to relate to the less visible third one, Earth. Doing a VR version is somewhere on my infinite todo list. :)
- dmje 3y agoSome years ago (it may still be there today but my GoogleFoo is failing) there was an amazing exhibit outside @Bristol (a science centre in Bristol UK, now called We The Curious) - you input the name of a planet and a big physical pointer just like those village signs would swing round and point in a direction. On the side of the pointer it’d say the number of miles to the planet. It was a super cool juxtaposition of screen / digital / real and very thought provoking. The counter intuitive nature always got me and my kids: pointing down through the floor to Jupiter or whatever when one’s intuition is always that everything in the sky is “above you”. I wish I could find details of it on the web!
- dmje 3y agoWell it’s still there! See https://maps.app.goo.gl/QAxCc2vKNrgAZH2QA?g_st=ic https://maps.app.goo.gl/QAxCc2vKNrgAZH2QA?g_st=ic
- jantissler 3y agoI like that it’s in the category “Travel”
- rc_mob 3y agotechnically the truth
- jnk345u8dfg9hjk 3y agothe best kind of truth
- thom 3y agoThat's the folder I keep my stargazing apps in. I like to keep house hunting apps in 'shopping'.
- rc_mob 3y agothis is now the coolest app i have on my phone.
- milkey_mouse 3y agoyour app and website are awesome, especially the cursor thing
- genmon 3y agoHaha thank you. Couple Easter eggs… open two browser windows to the same URL (on interconnected.org) so you can see cursors. Then… - select text — text highlights are shared in real-time - type “/“ — there’s built-in cursor chat! Both ephemeral with no data recorded. I like to hang out on pages if they have a moment of popularity and surprise people by talking to them I haven’t written this up! I probably should. But the code is open and it works even with entirely static sites: https://github.com/genmon/interconnected-cursor-party https://github.com/genmon/interconnected-cursor-party
- jacquesm 3y agoOnce upon a time I built a whole service around that concept. It basically used what we today call cross site scripting to frame all websites you visit in the browser and then to use the frame to populate it with everybody else visiting the web that way. So you can suddenly see the crowd that is visiting the websites that you are visiting. And sometimes you'd notice the same people in more than one place. Avatars would 'drop' down on the webpage and you'd be able to chat with others by moving your avatar close to theirs on the screen and then to type a message, which would result in a popup text balloon over your character on their screen. It worked pretty well except for the largest sites where it would get too crowded, for those I eventually limited the radius based on the bitmask of the IP address until it was small enough to handle. Cross site scripting protection in the browsers put an end to it but it was a fun project.
- nibsitaas 3y agoI have to admit that I had a little too much fun following another cursor until they started shaking theirs to signal me to stop.
- bhaney 3y ago
- geor9e 3y agoThis walkthrough, and ChatGPT, is probably going to inspire a lot of people who never made an app before to finally make that big step. If you're one of them, and manage to remake this as a website app that works on my Android, please comment it here, I want to try it :) Finding sagittarius in stellarium just doesn't hit the same.
- genmon 3y agoI feel like there is a knack to using ChatGPT for bigger tasks and it is non-obvious to most folks. That’s why I wanted to share. The problem is the hype around AI which is supposed to be all-powerful. So people ask it to do too much, and then it gets lost and now you’re both confused. Instead people need to see, well, it’s about the same “intelligence” (ugh) as you, so here’s how to pair effectively.
- UncleOxidant 3y ago"ChatGPT: convert this Galactic Compass app to work on Android"
- crazygringo 3y agoThree thoughts -- First, this is so simple and yet so original. I absolutely love it. It feels like a tiny little piece of Star Trek or of science fiction but that's real and lives on my phone. So creative. It puts such a smile on my face. Super kudos! Second, why does it need the phone to be flat? Depending on where the arrow's pointing, that's not always ideal. Would be great if there were a way to get around that. Third, for some reason I really want the distance to the galactic center to be something absurdly and therefore entertainingly precise. Not a hard-coded nice round number of 26,000 light years, but something actually calculated in real time. Maybe it hides the decimals unless you click on it, but then... it not only calculates the live distance of the earth right now, but uses your exact location. (And if you want to use the GPS/accelerometer to have it update in real-time, that would be *chef's kiss*.)
- genmon 3y agoSo kind, thank you! The reason for the phone being flat is perhaps a limitation in iOS or perhaps a limitation of mine — I don’t know which! Basically you can access deviceHeading which is a projection of the north vector onto the long axis of the device. When the phone is orthogonal to north, that becomes unreliable, so the floating arrow breaks. What I really need is the north vector, real-time updated, relative to the device itself, no projection. But it seems like that isn’t available.
- crazygringo 3y agoHuh, when I go into your debug tab the heading value always seems to stay accurate no matter if my phone is flat or vertical. It seems to work the same as the Compass app, which similarly stays accurate. However, I do see that the drawn arrow totally breaks down when the phone is held vertically. So I wonder if maybe it's a bug somewhere in the calculations or drawing?
- genmon 3y agoHm okay, thank you that’s a good observation. I need to find someone more familiar than I am with combining quaternions and reference frames to lend a hand!
- thom 3y agoSomeone here the other day was lamenting the death of the weird interesting internet of old, so I'd just like to highlight what an amazing place Matt's blog has been over the years (and other projects he's been involved with like https://upsideclown.com/ https://upsideclown.com/).
- genmon 3y agoThat’s so kind! I love the web, it has been very good to me. The web of people making and sharing is out there and thriving! For whoever was lamenting the loss, the best way to find that scene is to start making and sharing yourself, you somehow get in touch.
- quantified 3y agoLess than two weeks ago I was on a midnight hike under the Milky Way and commented to my companions that I wish we had a way to track where the core was. Thanks for posting!
- genmon 3y agoI can't see the Milky Way here in London. I would love love love a pic of the Galactic Compass app pointing at the Milky Way hanging in the sky! I'm not sure whether it would be possible to balance the camera exposure to take a pic of both simultaneously, but if you're up for a challenge next time you're hiking, well please take this as a request!!
- Larrikin 3y agoAny timeline on an Android version?
- lettergram 3y agoHaha coolest part is seeing all the other people on the page
- savrajsingh 3y agoI once made an app like this that was similarly simple - but the app store blocked it saying it was "too simple" -- this was many years ago, and I think they've obviously relaxed those standards, but it was very, very frustrating. I even got someone on the phone to tell me that the app was too trivial to be on the app store. Geez.
- quinncom 3y agoI found most interesting the part of your story where you developed an intuitive sense of its location: > […] it’s a nice trick if you can do it, but it’s better when you can do it at any time, without an app. Which is what happened. > > First I got good at figuring out the ecliptic. That’s the flat disc of the Earth’s orbit (and the solar system). If you wave your arm along the path that the Sun makes across the sky, that’s the disc. > > Then I can’t remember how I would locate Sagittarius each day (it lies on the ecliptic) but I trained my intuition by checking the app each day. Over the weeks and months, I could follow how the position changed (at the same time each day as I caught the bus). First through the ground that way, then under the ground further that way, and so on. > > Eventually then I had this picture of myself, and the Earth, and the solar system, and the centre of the galaxy which had initially been whirling round me, and now it had flipped, I was turning around it. https://interconnected.org/home/2021/06/30/galaxy https://interconnected.org/home/2021/06/30/galaxy
- reportgunner 3y agoI don't mean to offend anyone but that sounds like a made up story to me.
- cryptoz 3y agoWhat makes you say that? After some months or years of finding Mars and Jupiter in the sky it became second nature to me. You can just judge the time, don’t need a clock, look up at the sky and spot things immediately. If you’ve been practicing every day for a long time why not? Yes they also move in the sky but you get that too. You’ll think, oh it’s April and 11pm, I know where mars is instinctively.
- reportgunner 3y agoThe sentence "Then I can’t remember how I would locate Sagittarius each day" and also absence of any elaboration on how the galactic center is calculated. If you can't remember why even mention it ?
- lencastre 3y agoWOW,… to the experts in the room, how accurate, trustworthy is the positioning system on the iPhone, and are there some models which are better/worse?
- 7373737373 3y agoThe Kaaba for future interstellar religious humanity? Though pointing back to Earth will also be relevant and very meaningful for a long time I suppose.
- nicman23 3y agopraise the omnissiah
- RobotCaleb 3y agoSurely you don't need the phone's actual latitude and longitude. I can't imagine that the direction to a point infinitely (basically) far away will be different depending on where on this tiny planet you're standing. I'm sure just using the Earth's position (or any other position in our solar system?) would be sufficient to get a valid pointing vector.
- thrance 3y agoI think you still need to know where the phone is located on Earth to compute the normal vector (i.e. where is up ?)
- swyx 3y agoexactly this. GP hasn't internalized what it means to have a non-geocentric mental model of the galaxy. we are but a speck on an arm on a not-particularly significant little cluster of fireballs
- quickthrower2 3y agoAn analogy would be the centre circle of a soccer field. Walk around it but always face outwards. Now as you do that point to a city 100 miles away. Insignificant circle but…
- genmon 3y agoThat's it exactly. You need the lat/long, time+date, and device orientation in order to float the arrow
- itake 3y agoI found this oddly calming
- torbengee 3y agoLove it. One suggestion: it would be nice if one could choose the galaxy. I'm not from here, so ... ("Check your galactic privilege!") ;)