thkruz / keeptrack.space

🌎📡 TypeScript Astrodynamics Software for Non-Engineers. 3D Visualization of satellite data and the sensors that track them.
http://keeptrack.space
GNU Affero General Public License v3.0
249 stars 36 forks source link

adding ArcGIS JS API to the app..? #661

Closed Deasus closed 1 year ago

Deasus commented 1 year ago

Im really impressed with the work youve done with KeepTrack! -awesome job. I had a quick question: would it be possible to add the ArcGIS Javascript API to the app to leverage a mapped globe instead of the current image of the earth being used..? Im asking because you could add layers to the globe for ground-based map layers etc. 

I assume the process could be similar to: https://developers.arcgis.com/javascript/latest/sample-code/satellites-3d/

thkruz commented 1 year ago

Sorry for the delay getting back to you (saw your email).

Are you asking if it is technically feasible or if I will personally implement it?

From a technical standpoint, the earth.ts file has a draw loop that puts out the earth object. It should be as simple as replacing that with the arcgis code like you suggested. The one issue you will run into is getting the earth to point in the right direction. KeepTrack draws everything in ECI, so as the earth rotates, the earth object has to be rotated. Many other tools treat the world as ECF so that the earth doesn't have to rotate and the satellites can just be adjusted instead. I am not sure how the arcgis code works.

In terms of me personally implementing it - I won't say no, but I will say it is a low priority. If I am not mistaken, pulling the layers for that will require an internet connection. KeepTrack is designed to be able to be run completely offline. I am open to exploring the idea and maybe implementing it with a flag in the settings so that you can choose to use it when online.

Deasus commented 1 year ago

Thanks for the response Theo! ArcGIS has been approved for quite some time in AFRL and USSF (as they brought over practices from the USAF). As a result they have quite a few earth layers for their “arc scenes”. This includes real time locations of ships, aircraft and launches. It would be interesting to see it Implemented. I’ve seen a number of people that have done so at a very high level… but not in as much detail as what you’ve done (awesome job by the way)! Additionally, the ArcGIS JS Api makes use of the Satellite.js library and as a result/need after load time, can work off line. It also can be configured to cache and work offline too. Let me know where the rath look is and I can try toReplace it to see what happens… also I could set the rotation of the globe if it doesn’t auto adjust.Let me know your thoughts, Deepinder

NOTE: Edited to remove my response which is already listed above.

thkruz commented 1 year ago

Few clarifications. ArcGIS Api does not make use of satellite.js. Their example simply imports it. Since I am one of the main maintainers on that library, I would highly recommend that you ensure you are using the latest version - I recently corrected some math errors that impacted a small subset of the catalog. Alternatively, I have put out ootk which is an expanded version of satellite.js in TypeScript.

While I am aware that it can run offline once it is done downloading, for me to replace the earth with ArcGIS, I need a layer that can be hosted locally versus pulling from an intranet (SIPR, etc).

Earth is located here: https://github.com/thkruz/keeptrack.space/blob/develop/src/js/drawManager/sceneManager/earth.ts

I am taking a look at it right now.

thkruz commented 1 year ago

Turns out this is a non-trivial project. I don't see a way to add an ArcGIS object into another canvas. Someone would need to migrate all of the non-earth objects of KeepTrack into the ArcGIS SceneView. That also means you would lose control over a lot of the drawing loop which is how I have optimized it to handle such a large number of objects at once.

Happy to answer specific questions if you go after this, but I am going to mark this as closed because I am not going to go after this one. If you have any specific use case you are trying solve, let me know and I will see if there is a compromise that will work.

Deasus commented 1 year ago

Good morning Theo- Couldn’t the Arc Scene be brought into your canvas as a portal item? I agree you may lose some control over the non-earth objects… but wouldn’t worker/ renderer.js help with that, for instance: https://github.com/ajmas/ThingsInSpaceAs for the use case(s): track ships (contributing to ocean launch efforts (leveraging a prebuilt ArcGIS layer), overlay SAR for lost tracking (when AIS isn’t picking things up) [another ArcGIS layer], but also have visual of non-earth objects. Another use case is specific to small teams- local elements use ArcGIS layers to provide them visibility of the battlespace. It would be meaningful for them to be able to understand what ISR platform is overhead or can be leveraged ad hoc, without having to keep a live connection to a FOB, or ECP (think disconnected state). Finally, I have a project associated with the moon rover. Using LiDAR and imagery analysis we have an Arc Scene of the moon. It would be good to have visibility of non-earth objects for communication etc. Hope that helps, Deepinder ps- your application is beyond amazing brother! On Apr 2, 2023, at 4:49 PM, Theodore Kruczek @.***> wrote: Turns out this is a non-trivial project. I don't see a way to add an ArcGIS object into another canvas. Someone would need to migrate all of the non-earth objects of KeepTrack into the ArcGIS SceneView. That also means you would lose control over a lot of the drawing loop which is how I have optimized it to handle such a large number of objects at once. Happy to answer specific questions if you go after this, but I am going to mark this as closed because I am not going to go after this one. If you have any specific use case you are trying solve, let me know and I will see if there is a compromise that will work.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>