mirror of
https://github.com/ANG13T/SatIntel.git
synced 2025-12-12 07:40:38 -08:00
feat: continue formatting
This commit is contained in:
32
osint/orbitalelement.go
Normal file
32
osint/orbitalelement.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package osint
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"fmt"
|
||||
"github.com/iskaa02/qalam/gradient"
|
||||
)
|
||||
|
||||
func OrbitalElement() {
|
||||
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
|
||||
opt,_:=gradient.NewGradient("#1179ef", "cyan")
|
||||
opt.Print("\n" + string(options))
|
||||
var selection int = Option(0, 3)
|
||||
|
||||
if (selection == 1) {
|
||||
result := SelectSatellite()
|
||||
|
||||
if (result == "") {
|
||||
return
|
||||
}
|
||||
|
||||
PrintNORADInfo(extractNorad(result), result)
|
||||
|
||||
} else if (selection == 2) {
|
||||
fmt.Print("\n ENTER NORAD ID > ")
|
||||
var norad string
|
||||
fmt.Scanln(&norad)
|
||||
PrintNORADInfo(norad, "UNSPECIFIED")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"github.com/TwiN/go-color"
|
||||
"github.com/iskaa02/qalam/gradient"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -19,31 +18,6 @@ type orderBy string
|
||||
const authURL = "https://www.space-track.org/ajaxauth/login"
|
||||
const baseurl = "https://www.space-track.org/basicspacedata/query/class"
|
||||
|
||||
// Orbital Element Data Display Code
|
||||
func OrbitalElement() {
|
||||
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
|
||||
opt,_:=gradient.NewGradient("#1179ef", "cyan")
|
||||
opt.Print("\n" + string(options))
|
||||
var selection int = Option(0, 3)
|
||||
|
||||
if (selection == 1) {
|
||||
result := SelectSatellite()
|
||||
|
||||
if (result == "") {
|
||||
return
|
||||
}
|
||||
|
||||
PrintNORADInfo(extractNorad(result), result)
|
||||
|
||||
} else if (selection == 2) {
|
||||
fmt.Print("\n ENTER NORAD ID > ")
|
||||
var norad string
|
||||
fmt.Scanln(&norad)
|
||||
PrintNORADInfo(norad, "UNSPECIFIED")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func extractNorad(str string) string {
|
||||
start := strings.Index(str, "(")
|
||||
@@ -133,32 +107,6 @@ func SelectSatellite() string {
|
||||
return result
|
||||
}
|
||||
|
||||
// Satellite Position Visualization Code
|
||||
func SatellitePositionVisualization() {
|
||||
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
|
||||
opt,_:=gradient.NewGradient("#1179ef", "cyan")
|
||||
opt.Print("\n" + string(options))
|
||||
var selection int = Option(0, 3)
|
||||
|
||||
if (selection == 1) {
|
||||
result := SelectSatellite()
|
||||
|
||||
if (result == "") {
|
||||
return
|
||||
}
|
||||
|
||||
PrintNORADInfo(extractNorad(result), result)
|
||||
|
||||
} else if (selection == 2) {
|
||||
fmt.Print("\n ENTER NORAD ID > ")
|
||||
var norad string
|
||||
fmt.Scanln(&norad)
|
||||
PrintNORADInfo(norad, "UNSPECIFIED")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GenRowString(intro string, input string) string{
|
||||
var totalCount int = 4 + len(intro) + len(input) + 2
|
||||
var useCount = 63 - totalCount
|
||||
|
||||
33
osint/satelliteposition.go
Normal file
33
osint/satelliteposition.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package osint
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"fmt"
|
||||
"github.com/iskaa02/qalam/gradient"
|
||||
)
|
||||
|
||||
// Satellite Position Visualization Code
|
||||
func SatellitePositionVisualization() {
|
||||
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
|
||||
opt,_:=gradient.NewGradient("#1179ef", "cyan")
|
||||
opt.Print("\n" + string(options))
|
||||
var selection int = Option(0, 3)
|
||||
|
||||
if (selection == 1) {
|
||||
result := SelectSatellite()
|
||||
|
||||
if (result == "") {
|
||||
return
|
||||
}
|
||||
|
||||
PrintNORADInfo(extractNorad(result), result)
|
||||
|
||||
} else if (selection == 2) {
|
||||
fmt.Print("\n ENTER NORAD ID > ")
|
||||
var norad string
|
||||
fmt.Scanln(&norad)
|
||||
PrintNORADInfo(norad, "UNSPECIFIED")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user