File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
- import {
2
- accuracy as TAccuracy ,
3
- lat as TLat ,
4
- lng as TLng ,
5
- } from '@hello.nrfcloud.com/proto/hello'
6
1
import { Type , type Static } from '@sinclair/typebox'
7
2
import {
8
3
JSONPayload ,
9
4
type ValidationError ,
10
5
validatedFetch ,
11
6
} from './validatedFetch.js'
12
7
8
+ export const lat = Type . Number ( {
9
+ minimum : - 90 ,
10
+ maximum : 90 ,
11
+ description : 'Latitude in degrees' ,
12
+ } )
13
+ export const lng = Type . Number ( {
14
+ minimum : - 180 ,
15
+ maximum : 180 ,
16
+ description : 'Longitude in degrees' ,
17
+ } )
18
+ export const accuracy = Type . Number ( {
19
+ minimum : 0 ,
20
+ description : 'HPE (horizontal positioning error) in meters' ,
21
+ } )
22
+
13
23
/**
14
24
* @link https://api.nrfcloud.com/v1/#tag/Ground-Fix
15
25
*/
16
26
export const GroundFixType = Type . Object ( {
17
- lat : TLat , // 63.41999531
18
- lon : TLng , // 10.42999506
19
- uncertainty : TAccuracy , // 2420
27
+ lat, // 63.41999531
28
+ lon : lng , // 10.42999506
29
+ uncertainty : accuracy , // 2420
20
30
fulfilledWith : Type . Literal ( 'SCELL' ) ,
21
31
} )
22
32
You can’t perform that action at this time.
0 commit comments