Satellite tracking TUI using ratatui

mild variable name changes + change of reqwest to ureq

Changed files
+182 -674
src
+163 -660
Cargo.lock
···
]
[[package]]
-
name = "atomic-waker"
-
version = "1.1.2"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
-
-
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
"miniz_oxide",
"object",
"rustc-demangle",
-
"windows-targets 0.52.6",
+
"windows-targets",
]
[[package]]
···
]
[[package]]
-
name = "core-foundation"
-
version = "0.9.4"
+
name = "cookie"
+
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+
checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
dependencies = [
-
"core-foundation-sys",
-
"libc",
+
"percent-encoding",
+
"time",
+
"version_check",
+
]
+
+
[[package]]
+
name = "cookie_store"
+
version = "0.21.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9"
+
dependencies = [
+
"cookie",
+
"document-features",
+
"idna",
+
"indexmap",
+
"log",
+
"serde",
+
"serde_derive",
+
"serde_json",
+
"time",
+
"url",
]
[[package]]
···
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
+
name = "crc32fast"
+
version = "1.4.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+
dependencies = [
+
"cfg-if",
+
]
+
+
[[package]]
name = "crossterm"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
"crossterm_winapi",
"mio",
"parking_lot",
-
"rustix 0.38.44",
+
"rustix",
"signal-hook",
"signal-hook-mio",
"winapi",
···
]
[[package]]
+
name = "deranged"
+
version = "0.4.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
+
dependencies = [
+
"powerfmt",
+
]
+
+
[[package]]
name = "displaydoc"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
]
[[package]]
-
name = "either"
-
version = "1.15.0"
+
name = "document-features"
+
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+
checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d"
+
dependencies = [
+
"litrs",
+
]
[[package]]
-
name = "encoding_rs"
-
version = "0.8.35"
+
name = "either"
+
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
-
dependencies = [
-
"cfg-if",
-
]
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "equivalent"
···
]
[[package]]
-
name = "fastrand"
-
version = "2.3.0"
+
name = "flate2"
+
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
+
checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"
+
dependencies = [
+
"crc32fast",
+
"miniz_oxide",
+
]
[[package]]
name = "fnv"
···
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
[[package]]
-
name = "foreign-types"
-
version = "0.3.2"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
-
dependencies = [
-
"foreign-types-shared",
-
]
-
-
[[package]]
-
name = "foreign-types-shared"
-
version = "0.1.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
-
-
[[package]]
name = "form_urlencoded"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
]
[[package]]
-
name = "futures-channel"
-
version = "0.3.31"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
-
dependencies = [
-
"futures-core",
-
]
-
-
[[package]]
-
name = "futures-core"
-
version = "0.3.31"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
-
-
[[package]]
-
name = "futures-sink"
-
version = "0.3.31"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
-
-
[[package]]
-
name = "futures-task"
-
version = "0.3.31"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
-
-
[[package]]
-
name = "futures-util"
-
version = "0.3.31"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
-
dependencies = [
-
"futures-core",
-
"futures-task",
-
"pin-project-lite",
-
"pin-utils",
-
]
-
-
[[package]]
name = "getrandom"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
dependencies = [
"cfg-if",
"libc",
-
"wasi 0.11.0+wasi-snapshot-preview1",
-
]
-
-
[[package]]
-
name = "getrandom"
-
version = "0.3.2"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
-
dependencies = [
-
"cfg-if",
-
"libc",
-
"r-efi",
-
"wasi 0.14.2+wasi-0.2.4",
+
"wasi",
]
[[package]]
···
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]]
-
name = "h2"
-
version = "0.4.9"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633"
-
dependencies = [
-
"atomic-waker",
-
"bytes",
-
"fnv",
-
"futures-core",
-
"futures-sink",
-
"http",
-
"indexmap",
-
"slab",
-
"tokio",
-
"tokio-util",
-
"tracing",
-
]
-
-
[[package]]
name = "hashbrown"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
]
[[package]]
-
name = "http-body"
-
version = "1.0.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
-
dependencies = [
-
"bytes",
-
"http",
-
]
-
-
[[package]]
-
name = "http-body-util"
-
version = "0.1.3"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
-
dependencies = [
-
"bytes",
-
"futures-core",
-
"http",
-
"http-body",
-
"pin-project-lite",
-
]
-
-
[[package]]
name = "httparse"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
[[package]]
-
name = "hyper"
-
version = "1.6.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
-
dependencies = [
-
"bytes",
-
"futures-channel",
-
"futures-util",
-
"h2",
-
"http",
-
"http-body",
-
"httparse",
-
"itoa",
-
"pin-project-lite",
-
"smallvec",
-
"tokio",
-
"want",
-
]
-
-
[[package]]
-
name = "hyper-rustls"
-
version = "0.27.5"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2"
-
dependencies = [
-
"futures-util",
-
"http",
-
"hyper",
-
"hyper-util",
-
"rustls",
-
"rustls-pki-types",
-
"tokio",
-
"tokio-rustls",
-
"tower-service",
-
]
-
-
[[package]]
-
name = "hyper-tls"
-
version = "0.6.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
-
dependencies = [
-
"bytes",
-
"http-body-util",
-
"hyper",
-
"hyper-util",
-
"native-tls",
-
"tokio",
-
"tokio-native-tls",
-
"tower-service",
-
]
-
-
[[package]]
-
name = "hyper-util"
-
version = "0.1.11"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2"
-
dependencies = [
-
"bytes",
-
"futures-channel",
-
"futures-util",
-
"http",
-
"http-body",
-
"hyper",
-
"libc",
-
"pin-project-lite",
-
"socket2",
-
"tokio",
-
"tower-service",
-
"tracing",
-
]
-
-
[[package]]
name = "iana-time-zone"
version = "0.1.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
]
[[package]]
-
name = "ipnet"
-
version = "2.11.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
-
-
[[package]]
name = "itertools"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
-
name = "linux-raw-sys"
-
version = "0.9.4"
+
name = "litemap"
+
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
+
checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]]
-
name = "litemap"
-
version = "0.7.5"
+
name = "litrs"
+
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
+
checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
[[package]]
name = "lock_api"
···
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
-
name = "mime"
-
version = "0.3.17"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
-
-
[[package]]
name = "miniz_oxide"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
dependencies = [
"libc",
"log",
-
"wasi 0.11.0+wasi-snapshot-preview1",
+
"wasi",
"windows-sys 0.52.0",
]
[[package]]
-
name = "native-tls"
-
version = "0.2.14"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
-
dependencies = [
-
"libc",
-
"log",
-
"openssl",
-
"openssl-probe",
-
"openssl-sys",
-
"schannel",
-
"security-framework",
-
"security-framework-sys",
-
"tempfile",
-
]
-
-
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
"overload",
"winapi",
]
+
+
[[package]]
+
name = "num-conv"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-traits"
···
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
-
-
[[package]]
-
name = "openssl"
-
version = "0.10.72"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da"
-
dependencies = [
-
"bitflags",
-
"cfg-if",
-
"foreign-types",
-
"libc",
-
"once_cell",
-
"openssl-macros",
-
"openssl-sys",
-
]
-
-
[[package]]
-
name = "openssl-macros"
-
version = "0.1.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
-
dependencies = [
-
"proc-macro2",
-
"quote",
-
"syn",
-
]
-
-
[[package]]
-
name = "openssl-probe"
-
version = "0.1.6"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
-
-
[[package]]
-
name = "openssl-sys"
-
version = "0.9.107"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07"
-
dependencies = [
-
"cc",
-
"libc",
-
"pkg-config",
-
"vcpkg",
-
]
[[package]]
name = "overload"
···
"libc",
"redox_syscall",
"smallvec",
-
"windows-targets 0.52.6",
+
"windows-targets",
]
[[package]]
···
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
[[package]]
-
name = "pin-utils"
-
version = "0.1.0"
+
name = "powerfmt"
+
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
-
-
[[package]]
-
name = "pkg-config"
-
version = "0.3.32"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
+
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "proc-macro2"
···
dependencies = [
"proc-macro2",
]
-
-
[[package]]
-
name = "r-efi"
-
version = "5.2.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "ratatui"
···
]
[[package]]
-
name = "reqwest"
-
version = "0.12.15"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb"
-
dependencies = [
-
"base64",
-
"bytes",
-
"encoding_rs",
-
"futures-core",
-
"futures-util",
-
"h2",
-
"http",
-
"http-body",
-
"http-body-util",
-
"hyper",
-
"hyper-rustls",
-
"hyper-tls",
-
"hyper-util",
-
"ipnet",
-
"js-sys",
-
"log",
-
"mime",
-
"native-tls",
-
"once_cell",
-
"percent-encoding",
-
"pin-project-lite",
-
"rustls-pemfile",
-
"serde",
-
"serde_json",
-
"serde_urlencoded",
-
"sync_wrapper",
-
"system-configuration",
-
"tokio",
-
"tokio-native-tls",
-
"tower",
-
"tower-service",
-
"url",
-
"wasm-bindgen",
-
"wasm-bindgen-futures",
-
"web-sys",
-
"windows-registry",
-
]
-
-
[[package]]
name = "ring"
version = "0.17.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
dependencies = [
"cc",
"cfg-if",
-
"getrandom 0.2.16",
+
"getrandom",
"libc",
"untrusted",
"windows-sys 0.52.0",
···
"bitflags",
"errno",
"libc",
-
"linux-raw-sys 0.4.15",
-
"windows-sys 0.59.0",
-
]
-
-
[[package]]
-
name = "rustix"
-
version = "1.0.5"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf"
-
dependencies = [
-
"bitflags",
-
"errno",
-
"libc",
-
"linux-raw-sys 0.9.4",
+
"linux-raw-sys",
"windows-sys 0.59.0",
]
···
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0"
dependencies = [
+
"log",
"once_cell",
+
"ring",
"rustls-pki-types",
"rustls-webpki",
"subtle",
···
dependencies = [
"chrono",
"ratatui",
-
"reqwest",
"serde",
"sgp4",
"tokio",
"tracing",
"tracing-error",
"tracing-subscriber",
-
]
-
-
[[package]]
-
name = "schannel"
-
version = "0.1.27"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
-
dependencies = [
-
"windows-sys 0.59.0",
+
"ureq",
]
[[package]]
···
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
-
name = "security-framework"
-
version = "2.11.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
-
dependencies = [
-
"bitflags",
-
"core-foundation",
-
"core-foundation-sys",
-
"libc",
-
"security-framework-sys",
-
]
-
-
[[package]]
-
name = "security-framework-sys"
-
version = "2.14.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32"
-
dependencies = [
-
"core-foundation-sys",
-
"libc",
-
]
-
-
[[package]]
name = "serde"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
dependencies = [
"itoa",
"memchr",
-
"ryu",
-
"serde",
-
]
-
-
[[package]]
-
name = "serde_urlencoded"
-
version = "0.7.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
-
dependencies = [
-
"form_urlencoded",
-
"itoa",
"ryu",
"serde",
]
···
[[package]]
-
name = "slab"
-
version = "0.4.9"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
-
dependencies = [
-
"autocfg",
-
]
-
-
[[package]]
name = "smallvec"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
-
name = "sync_wrapper"
-
version = "1.0.2"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
-
dependencies = [
-
"futures-core",
-
]
-
-
[[package]]
name = "synstructure"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
-
name = "system-configuration"
-
version = "0.6.1"
+
name = "thread_local"
+
version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
+
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
-
"bitflags",
-
"core-foundation",
-
"system-configuration-sys",
+
"cfg-if",
+
"once_cell",
[[package]]
-
name = "system-configuration-sys"
-
version = "0.6.0"
+
name = "time"
+
version = "0.3.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
+
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
dependencies = [
-
"core-foundation-sys",
-
"libc",
+
"deranged",
+
"itoa",
+
"num-conv",
+
"powerfmt",
+
"serde",
+
"time-core",
+
"time-macros",
[[package]]
-
name = "tempfile"
-
version = "3.19.1"
+
name = "time-core"
+
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
-
dependencies = [
-
"fastrand",
-
"getrandom 0.3.2",
-
"once_cell",
-
"rustix 1.0.5",
-
"windows-sys 0.59.0",
-
]
+
checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
[[package]]
-
name = "thread_local"
-
version = "1.1.8"
+
name = "time-macros"
+
version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+
checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
dependencies = [
-
"cfg-if",
-
"once_cell",
+
"num-conv",
+
"time-core",
[[package]]
···
[[package]]
-
name = "tokio-native-tls"
-
version = "0.3.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
-
dependencies = [
-
"native-tls",
-
"tokio",
-
]
-
-
[[package]]
-
name = "tokio-rustls"
-
version = "0.26.2"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
-
dependencies = [
-
"rustls",
-
"tokio",
-
]
-
-
[[package]]
-
name = "tokio-util"
-
version = "0.7.15"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df"
-
dependencies = [
-
"bytes",
-
"futures-core",
-
"futures-sink",
-
"pin-project-lite",
-
"tokio",
-
]
-
-
[[package]]
-
name = "tower"
-
version = "0.5.2"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
-
dependencies = [
-
"futures-core",
-
"futures-util",
-
"pin-project-lite",
-
"sync_wrapper",
-
"tokio",
-
"tower-layer",
-
"tower-service",
-
]
-
-
[[package]]
-
name = "tower-layer"
-
version = "0.3.3"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
-
-
[[package]]
-
name = "tower-service"
-
version = "0.3.3"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
-
-
[[package]]
name = "tracing"
version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
-
name = "try-lock"
-
version = "0.2.5"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
-
-
[[package]]
name = "unicode-ident"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
+
name = "ureq"
+
version = "3.0.11"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b7a3e9af6113ecd57b8c63d3cd76a385b2e3881365f1f489e54f49801d0c83ea"
+
dependencies = [
+
"base64",
+
"cookie_store",
+
"flate2",
+
"log",
+
"percent-encoding",
+
"rustls",
+
"rustls-pemfile",
+
"rustls-pki-types",
+
"serde",
+
"serde_json",
+
"ureq-proto",
+
"utf-8",
+
"webpki-roots",
+
]
+
+
[[package]]
+
name = "ureq-proto"
+
version = "0.4.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "fadf18427d33828c311234884b7ba2afb57143e6e7e69fda7ee883b624661e36"
+
dependencies = [
+
"base64",
+
"http",
+
"httparse",
+
"log",
+
]
+
+
[[package]]
name = "url"
version = "2.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
+
name = "utf-8"
+
version = "0.7.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+
[[package]]
name = "utf16_iter"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
-
name = "vcpkg"
-
version = "0.2.15"
+
name = "version_check"
+
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
-
-
[[package]]
-
name = "want"
-
version = "0.3.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
-
dependencies = [
-
"try-lock",
-
]
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
···
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
-
name = "wasi"
-
version = "0.14.2+wasi-0.2.4"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
-
dependencies = [
-
"wit-bindgen-rt",
-
]
-
-
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
-
name = "wasm-bindgen-futures"
-
version = "0.4.50"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
-
dependencies = [
-
"cfg-if",
-
"js-sys",
-
"once_cell",
-
"wasm-bindgen",
-
"web-sys",
-
]
-
-
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
-
name = "web-sys"
-
version = "0.3.77"
+
name = "webpki-roots"
+
version = "0.26.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
+
checksum = "29aad86cec885cafd03e8305fd727c418e970a521322c91688414d5b8efba16b"
dependencies = [
-
"js-sys",
-
"wasm-bindgen",
+
"rustls-pki-types",
[[package]]
···
"windows-interface",
"windows-link",
"windows-result",
-
"windows-strings 0.4.0",
+
"windows-strings",
[[package]]
···
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
-
-
[[package]]
-
name = "windows-registry"
-
version = "0.4.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"
-
dependencies = [
-
"windows-result",
-
"windows-strings 0.3.1",
-
"windows-targets 0.53.0",
-
]
[[package]]
name = "windows-result"
···
[[package]]
name = "windows-strings"
-
version = "0.3.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
-
dependencies = [
-
"windows-link",
-
]
-
-
[[package]]
-
name = "windows-strings"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
···
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
-
"windows-targets 0.52.6",
+
"windows-targets",
[[package]]
···
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
-
"windows-targets 0.52.6",
+
"windows-targets",
[[package]]
···
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
-
"windows_aarch64_gnullvm 0.52.6",
-
"windows_aarch64_msvc 0.52.6",
-
"windows_i686_gnu 0.52.6",
-
"windows_i686_gnullvm 0.52.6",
-
"windows_i686_msvc 0.52.6",
-
"windows_x86_64_gnu 0.52.6",
-
"windows_x86_64_gnullvm 0.52.6",
-
"windows_x86_64_msvc 0.52.6",
-
]
-
-
[[package]]
-
name = "windows-targets"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
-
dependencies = [
-
"windows_aarch64_gnullvm 0.53.0",
-
"windows_aarch64_msvc 0.53.0",
-
"windows_i686_gnu 0.53.0",
-
"windows_i686_gnullvm 0.53.0",
-
"windows_i686_msvc 0.53.0",
-
"windows_x86_64_gnu 0.53.0",
-
"windows_x86_64_gnullvm 0.53.0",
-
"windows_x86_64_msvc 0.53.0",
+
"windows_aarch64_gnullvm",
+
"windows_aarch64_msvc",
+
"windows_i686_gnu",
+
"windows_i686_gnullvm",
+
"windows_i686_msvc",
+
"windows_x86_64_gnu",
+
"windows_x86_64_gnullvm",
+
"windows_x86_64_msvc",
[[package]]
···
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-
[[package]]
-
name = "windows_aarch64_gnullvm"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
[[package]]
name = "windows_aarch64_msvc"
···
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
-
name = "windows_aarch64_msvc"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
-
-
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
-
name = "windows_i686_gnu"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
-
-
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
-
name = "windows_i686_gnullvm"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
-
-
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
-
name = "windows_i686_msvc"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
-
-
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
-
name = "windows_x86_64_gnu"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
-
-
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
-
name = "windows_x86_64_gnullvm"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
-
-
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-
-
[[package]]
-
name = "windows_x86_64_msvc"
-
version = "0.53.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
-
-
[[package]]
-
name = "wit-bindgen-rt"
-
version = "0.39.0"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
-
dependencies = [
-
"bitflags",
-
]
[[package]]
name = "write16"
+1 -1
Cargo.toml
···
[dependencies]
chrono = "0.4.40"
ratatui = "0.29.0"
-
reqwest = { version = "0.12.15", features = ["json"] }
serde = { version = "1.0.219", features = ["derive"] }
sgp4 = "2.2.0"
tokio = { version = "1.44.2", features = ["full"] }
+
ureq = { version = "3.0.11", features = ["json"] }
tracing = {version = "0.1.41", optional = true}
tracing-error = {version="0.2.1",optional = true}
+3 -2
src/location.rs
···
//to be deleted dont think i need it much longer?
pub async fn get_celerak_data() -> (Option<sgp4::Constants>,Option<DateTime<Utc>>) {
-
let resp = reqwest::get("https://celestrak.org/NORAD/elements/gp.php?GROUP=stations&FORMAT=json").await.unwrap();
+
let mut resp = ureq::get("https://celestrak.org/NORAD/elements/gp.php?GROUP=stations&FORMAT=json").call().unwrap();
+
//blocking, and thats okey.
-
let element_vec:Vec<sgp4::Elements> = resp.json().await.unwrap();
+
let element_vec:Vec<sgp4::Elements> = resp.body_mut().read_json().unwrap();
let epoch = &element_vec[0].datetime.and_utc();
+15 -11
src/main.rs
···
#[tokio::main]
async fn main() -> Result<()> {
#[cfg(feature = "logging")]
-
let _ = logging::initialize_logging();
+
let _ = { logging::initialize_logging() };
enable_raw_mode()?;
let mut stderr = io::stderr(); // This is a special case. Normally using stdout is fine
execute!(stderr, EnterAlternateScreen, EnableMouseCapture)?;
···
// create app and run it
let app = Arc::new(Mutex::new(App::new()));
-
let location_shared_app = Arc::clone(&app);
-
let location_shared_app2 = Arc::clone(&app);
+
let constant_obtain_shared_app = Arc::clone(&app);
+
let location_update_shared_app = Arc::clone(&app);
let mut runtime_shared_app = Arc::clone(&app);
let get_constant = tokio::task::spawn(async move {
-
location_shared_app.lock().unwrap().getting_location = true;
+
constant_obtain_shared_app.lock().unwrap().getting_location = true;
let constant = location::get_celerak_data().await;
if let (Some(cons),Some(epoch)) = constant {
-
location_shared_app.lock().unwrap().iss_constant = Some(cons);
-
location_shared_app.lock().unwrap().iss_constant_epoch = Some(epoch);
+
constant_obtain_shared_app.lock().unwrap().iss_constant = Some(cons);
+
constant_obtain_shared_app.lock().unwrap().iss_constant_epoch = Some(epoch);
}
-
location_shared_app.lock().unwrap().getting_location = false;
+
constant_obtain_shared_app.lock().unwrap().getting_location = false;
});
let _ = get_constant;
+
+
+
+
let forever = tokio::task::spawn(async move {
let mut interval = tokio::time::interval(Duration::from_secs(2));
loop {
interval.tick().await;
-
if location_shared_app2.lock().unwrap().iss_constant.is_some() {
+
if location_update_shared_app.lock().unwrap().iss_constant.is_some() {
let now = Utc::now();
let d_since_j2000 = julian_years_since_j2000(&now.naive_utc()) * 365.25;
let rad_diff_earth_rotation = location::earth_rotation_angle(d_since_j2000);
-
let time_diff = now - location_shared_app2.lock().unwrap().iss_constant_epoch.unwrap();
-
let prediction = location_shared_app2.lock().unwrap().iss_constant.as_ref().unwrap()
+
let time_diff = now - location_update_shared_app.lock().unwrap().iss_constant_epoch.unwrap();
+
let prediction = location_update_shared_app.lock().unwrap().iss_constant.as_ref().unwrap()
.propagate(MinutesSinceEpoch(time_diff.num_seconds() as f64 / 60.0)).unwrap();
let pred_spherical = location::polar_loc_transformer(prediction.position);
···
} else {
pred_spherical[0]-(rad_diff_earth_rotation as f32)*180.0/PI
};
-
location_shared_app2.lock().unwrap().iss_location = Some(location::FLocation {
+
location_update_shared_app.lock().unwrap().iss_location = Some(location::FLocation {
latitude: pred_spherical[1],
longitude: long_value