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

Oasis API design #128

Closed
CodeBear801 opened this issue Jan 6, 2020 · 7 comments
Closed

Oasis API design #128

CodeBear801 opened this issue Jan 6, 2020 · 7 comments
Assignees
Labels
Design Documentation

Comments

@CodeBear801
Copy link

CodeBear801 commented Jan 6, 2020

Subtask of #120. API design for POC. For deployment information, could go to here.

Oasis API expect user input orig point, destination point and vehicle information, it will select needed charge station to achieve the trip and return them as waypoints.

Input

The input contains information related with user's vehicle status, where to go and specific settings.

  • Orig point
  • Dest point
  • Max charge range
  • Current electric range
  • Preferred charge buffer level
  • Safe charge level
  • Curve
Option Values Descriptions Comments
max_range float(meters) Max range if fully charged
curr_range float(meters) Distance represent current electric level
prefer_level float(meters) Preferred charge buffer level more info
safe_level float(meters) Safe charge level more info
curve string TBD
http:127.0.0.1:8090/oasis/v1/earliest/-82.058695,35.036645;-81.89309,34.97914?max_range=500000.0&curr_range=160000.0

The unit is alined with OSRM, distance's unit is meter, time's unit is second

Response

Response contains information for charge station needed to complete the route.

[
{
  "distance": 90.0,
  "duration": 300.0,
  "estimate_remaining_range":100000.0,
  "weight": 300.0,
  "weight_name": "duration",
  "charge_stations": [
    {
      "address" : [
               {
                      "geo_coordinates": {
                                "latitude": 37.78509,  
                                 "longitude": -122.41988
                       },
                      "nav_coordinates": [
                                  {
                                           "latitude": 37.78509,
                                           "longitude": -122.41988
                                  }
                       ]
               }
       ],
      "wait_time" : 30.0,
      "charge_time": 100.0,
      "charge_range": 100.0,
       "detail_url":"url from search component which could retrieve charge station's information"
    },
    {
      "address" : [
               {
                      "geo_coordinates": {
                                "latitude": 13.40677,  
                                 "longitude": 52.53333
                       },
                      "nav_coordinates": [
                                  {
                                           "latitude": 13.40677,
                                           "longitude": 52.53333
                                  }
                       ]
               }
       ],
      "wait_time": 100.0,
      "charge_time": 100.0,
      "charge_range": 100.0,
      "detail_url":"url from search component which could retrieve charge station's information"
    },
  ]
}

]

Reference

@CodeBear801
Copy link
Author

CodeBear801 commented Jan 6, 2020

Initial fake response:
For any input, will generate one way_points as

location = (orig + dest) / 2

and with fixed value for other parameters

@CodeBear801 CodeBear801 self-assigned this Jan 7, 2020
@wangyoucao577
Copy link

  • Suggset to unify names with http.md, i.e. way_points --> waypoints.
  • Does the curve means vehicle's energy consumption curve? You could take the HERE's energy consumption model as reference.

@wangyoucao577 wangyoucao577 added the Design Documentation label Jan 8, 2020
@CodeBear801
Copy link
Author

  • Suggset to unify names with http.md, i.e. way_points --> waypoints.
  • Does the curve means vehicle's energy consumption curve? You could take the HERE's energy consumption model as reference.

Yes, thanks for the suggestions :)

CodeBear801 added a commit that referenced this issue Jan 9, 2020
@CodeBear801
Copy link
Author

CodeBear801 commented Jan 9, 2020

[outdated]
image

CodeBear801 added a commit that referenced this issue Jan 10, 2020
@CodeBear801
Copy link
Author

CodeBear801 commented Jan 10, 2020

image

Adjust:

  • How to identify destination is chargeable
    • Destination might be user's home, and only user knows whether destination is chargeable
    • Besides the parameter of safe_level, need additional boolean value to identify this

@CodeBear801 CodeBear801 mentioned this issue Jan 10, 2020
2 tasks
CodeBear801 added a commit that referenced this issue Jan 10, 2020
CodeBear801 added a commit that referenced this issue Jan 13, 2020
wangyoucao577 pushed a commit that referenced this issue Jan 14, 2020
* feat: initial implementation for oasis api
issue: #128

* feat: Add unit test for oasis api
issue: #128

* fix: Modify output json keyword
issue: #128

* fix: add comments for const definition
issue: #128
@CodeBear801
Copy link
Author

CodeBear801 commented Jan 17, 2020

Update

Due to new information found in:#132 (comment)
Modify Oasis API

  • Remove
Location

  • Add
ChargeStation   [
{
          Address {
                     geo_coordinates {
                                lat
                                lon
                     }
                     nav_coordinates[
                              {
                                     lat,
                                     lon
                              }
                     ]
          }
          "detail_url": "xxxxx"
}]
- Add
Estimate remaining range

image

CodeBear801 added a commit that referenced this issue Jan 17, 2020
     - Remove "Location field", add "Address" field which contains geo_coordinates + a list of nav_coordinates
     - Add field of detail_url, external user could retrieve all information related with specific charge station
     - Add field of estimate remaining range for each solution
issue: #132 (comment)
       #128
@CodeBear801 CodeBear801 mentioned this issue Jan 17, 2020
2 tasks
CodeBear801 added a commit that referenced this issue Jan 21, 2020
wangyoucao577 pushed a commit that referenced this issue Jan 22, 2020
* feat: Implement initial connector with telenav search
      Only support nearest charge station search for now.
issues: #132

* fix: update oasis api
     - Remove "Location field", add "Address" field which contains geo_coordinates + a list of nav_coordinates
     - Add field of detail_url, external user could retrieve all information related with specific charge station
     - Add field of estimate remaining range for each solution
issue: #132 (comment)
       #128

* fix: resolve conflict
issue: #128
@CodeBear801
Copy link
Author

CodeBear801 commented Jan 28, 2020

To do:

  • Add detour_time for charge stations.
  • Flag to identify destination is chargeable (need to confirm with PM)

CodeBear801 added a commit that referenced this issue Mar 13, 2020
@CodeBear801 CodeBear801 mentioned this issue Mar 13, 2020
2 tasks
CodeBear801 added a commit that referenced this issue Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Documentation
Projects
None yet
Development

No branches or pull requests

2 participants