-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23b15ce
commit 6cd449c
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"math" | ||
|
||
"github.com/GeoNet/delta/meta" | ||
) | ||
|
||
func (t *Tilde) Gnss(set *meta.Set) error { | ||
var stns []Station | ||
|
||
// all marks are GNSS stations | ||
for _, m := range set.Marks() { | ||
stns = append(stns, Station{ | ||
Code: m.Code, | ||
Description: m.Name, | ||
Start: toTimePtr(m.Start), | ||
End: toTimePtr(m.End), | ||
Latitude: toFloat(fmt.Sprintf("%0.4f", m.Latitude)), | ||
Longitude: toFloat(fmt.Sprintf("%0.4f", m.Longitude)), | ||
Elevation: toFloat(fmt.Sprintf("%0.0f", math.Round(m.Elevation))), | ||
}) | ||
} | ||
|
||
// update domains | ||
t.Domains = append(t.Domains, Domain{ | ||
Name: "gnss", | ||
Description: "Global Navigation Satellite System Sensors", | ||
Stations: stns, | ||
}) | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters