mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
added altitude handling in extensions
This commit is contained in:
@@ -51,7 +51,7 @@ func armatak_service_post_marker(args []string) (string, error) {
|
||||
return "", markerError
|
||||
}
|
||||
|
||||
response, responseError := postRequest(args[7]+"/api/markers?auth_token="+args[8], marker)
|
||||
response, responseError := postRequest(args[8]+"/api/markers?auth_token="+args[9], marker)
|
||||
|
||||
if responseError != nil {
|
||||
return "", responseError
|
||||
|
||||
@@ -48,6 +48,12 @@ func parseMarkerArgs(args []string) (Marker, error) {
|
||||
bearing = 0
|
||||
}
|
||||
|
||||
altitude, altitudeError := strconv.ParseFloat(args[7], 32)
|
||||
|
||||
if altitudeError != nil {
|
||||
altitude = 0
|
||||
}
|
||||
|
||||
marker := Marker{
|
||||
UID: args[0],
|
||||
Latitude: latitude,
|
||||
@@ -56,6 +62,7 @@ func parseMarkerArgs(args []string) (Marker, error) {
|
||||
Azimuth: int(bearing),
|
||||
Type: args[5],
|
||||
Name: args[6],
|
||||
HAE: int(altitude),
|
||||
}
|
||||
|
||||
return marker, nil
|
||||
|
||||
Reference in New Issue
Block a user