Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process dive logs and save in firestore #27

Open
sonyccd opened this issue Oct 5, 2018 · 8 comments
Open

Process dive logs and save in firestore #27

sonyccd opened this issue Oct 5, 2018 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@sonyccd
Copy link
Member

sonyccd commented Oct 5, 2018

Problem:
We need to process dive logs xml

Solution:
Create a cloud function to read the xml and load the struct into firestore

Alternatives:
We thought about creating an app engine system for this but that is taking to long. It also looks like a cloud function could do this just fine.

Notes:
Firestore schema

  • Dives (for each dive)
    • Created At
    • Updated At
    • User Id
    • File (what file in storage did this come from)
    • Duration
    • Date
    • Location
      • Lat
      • Long
    • Max Depth
    • Min Depth
    • Avg Depth (iff in file)
    • Computer
      • Type
      • SN
      • Manufacturer
      • Name
    • Max Temp
    • Min Temp
    • Avg Temp (iff in file)

Example MacDive file

@sonyccd sonyccd added the enhancement New feature or request label Oct 5, 2018
@sonyccd sonyccd added this to the MVP File Upload milestone Oct 5, 2018
@sonyccd
Copy link
Member Author

sonyccd commented Oct 6, 2018

Since we will have the reference to the original dives we can reprocess them

@sonyccd
Copy link
Member Author

sonyccd commented Oct 6, 2018

@JamWils does this schema make since for the format of the MacDive file?

@sonyccd
Copy link
Member Author

sonyccd commented Oct 6, 2018

We also need to make sure the @daltojohnso can get the dives from the UserId via a FireStore quarry.

@sonyccd
Copy link
Member Author

sonyccd commented Oct 6, 2018

https://www.npmjs.com/package/xml-js
This looks like a good library for reading the xml

@JamWils
Copy link
Contributor

JamWils commented Oct 8, 2018

That should work.

@sonyccd
Copy link
Member Author

sonyccd commented Oct 9, 2018

It looks like I have gotten this to work

@sonyccd
Copy link
Member Author

sonyccd commented Oct 14, 2018

At the moment we will only do the processing on mac dive file and not subsurface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants