-
Notifications
You must be signed in to change notification settings - Fork 0
Test Guide
-
Power on the board, wait for 50 seconds.
-
Join the Wi-Fi named "test" with your notebook or phone.
-
Open the browser, target it to the following URI to get something.
| URI | Description |
|---|---|
| http://192.168.0.1/a/sensors | Data of sensors |
| http://192.168.0.1/a/gps | GPS data |
| http://192.168.0.1/a/cam/start | Start to capture images |
| http://192.168.0.1/a/cam/stop | Stop capturing |
| http://192.168.0.1/tele/image.jpg | Get the image |
| http://192.168.0.1/test | Continuously refresh the image in browser |
Web Interface is summarized as following.
| METHOD | ENDPOINT | USAGE | RETURNS |
|---|---|---|---|
| GET | /a/sensors | Get sensors data | sensors data |
| GET | /a/gps | Get GPS information | GPS data |
| PUT | /a/cam/set | Set image size | image size |
| GET | /a/cam/start | Start camera capturing | command status |
| GET | /a/cam/stop | Stop camera capturing | command status |
| GET | /tele/image.jpg | Get the image | the image |
Get data of sensors.
GET http://192.168.0.1/a/sensors
This method returns a response body struture:
{
"temperature": number,
"humidity": number,
"acceleration":number
}| Property name | Value | Description | Notes |
|---|---|---|---|
| temperature | number | temperature in Celsius |
null if no value |
| humidity | number | humidity |
null if no value |
| acceleration | number | In unit of "g" |
Get GPS data.
GET http://192.168.0.1/a/gps
This method returns a response body struture only if the posion is fixed. Here's an example:
{"class":"TPV","device":"/dev/pts/1",
"time":"2005-06-08T10:34:48.283Z","ept":0.005,
"lat":46.498293369,"lon":7.567411672,"alt":1343.127,
"eph":36.000,"epv":32.321,
"track":10.3788,"speed":0.091,"climb":-0.085,"mode":3}If unsuccessful, {} is returned.
| Property name | Always? | Type | Description |
|---|---|---|---|
| class | Yes | string | Fixed: "TPV" |
| device | No | string | Name of originating device. |
| mode | Yes | numeric | NMEA mode |
| time | No | string | Time/date stamp in ISO8601 format, UTC. |
| ept | No | numeric | Estimated timestamp error |
| lat | No | numeric | Latitude in degrees |
| lon | No | numeric | Longitude in degrees |
| alt | No | numeric | Altitude in meters. |
| epx | No | numeric | Longitude error estimate in meters |
| epy | No | numeric | Latitude error estimate in meters |
| epv | No | numeric | Estimated vertical error in meters |
| track | No | numeric | Course over ground, degrees from true north. |
| speed | No | numeric | Speed over ground, meters per second. |
| climb | No | numeric | Climb or sink rate, meters per second. |
| epd | No | numeric | Direction error estimate in degrees |
| eps | No | numeric | Speed error estinmate in meters/sec |
| epc | No | numeric | Climb/sink error estimate in meters/sec |
Ref: http://www.catb.org/gpsd/gpsd_json.html
Set camera/image properties.
PUT http://192.168.0.1/a/cam/set?size=index
| Parameter name | Value | Description |
|---|---|---|
| index | integer | The size index. Acceptable values are: 0: set to full size "2560x1920" 1: set to "1264x948" 2: set to "624x468" (default) |
Do not supply a request body with this method.
This method returns a response body struture indicates the actual image size:
{
"size": sizestring
}| Property name | Value | Description | Notes |
|---|---|---|---|
| size | string | Actual image size |
Example:
{
"size": "624x468"
}Start capturing images.
GET http://192.168.0.1/a/cam/start
If successful, this method returns a response body struture:
{
"status": "success"
}Stop capturing images.
GET http://192.168.0.1/a/cam/stop
If successful, this method returns a response body struture:
{
"status": "success"
}Get the captured image.
GET http://192.168.0.1/tele/image.jpg
If successful, this method returns the image.