diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index e3a924f..cde0c3f 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-10T17:04:49","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-24T21:20:48","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/assets/documenter.js b/dev/assets/documenter.js index f531160..c6562b5 100644 --- a/dev/assets/documenter.js +++ b/dev/assets/documenter.js @@ -4,7 +4,6 @@ requirejs.config({ 'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/julia.min', 'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/headroom.min', 'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min', - 'minisearch': 'https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min', 'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min', 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min', 'headroom-jquery': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/jQuery.headroom.min', @@ -103,9 +102,10 @@ $(document).on("click", ".docstring header", function () { }); }); -$(document).on("click", ".docs-article-toggle-button", function () { +$(document).on("click", ".docs-article-toggle-button", function (event) { let articleToggleTitle = "Expand docstring"; let navArticleToggleTitle = "Expand all docstrings"; + let animationSpeed = event.noToggleAnimation ? 0 : 400; debounce(() => { if (isExpanded) { @@ -116,7 +116,7 @@ $(document).on("click", ".docs-article-toggle-button", function () { isExpanded = false; - $(".docstring section").slideUp(); + $(".docstring section").slideUp(animationSpeed); } else { $(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"); $(".docstring-article-toggle-button") @@ -127,7 +127,7 @@ $(document).on("click", ".docs-article-toggle-button", function () { articleToggleTitle = "Collapse docstring"; navArticleToggleTitle = "Collapse all docstrings"; - $(".docstring section").slideDown(); + $(".docstring section").slideDown(animationSpeed); } $(this).prop("title", navArticleToggleTitle); @@ -224,224 +224,465 @@ $(document).ready(function () { }) //////////////////////////////////////////////////////////////////////////////// -require(['jquery', 'minisearch'], function($, minisearch) { - -// In general, most search related things will have "search" as a prefix. -// To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc +require(['jquery'], function($) { -let results = []; -let timer = undefined; +$(document).ready(function () { + let meta = $("div[data-docstringscollapsed]").data(); -let data = documenterSearchIndex["docs"].map((x, key) => { - x["id"] = key; // minisearch requires a unique for each object - return x; + if (meta?.docstringscollapsed) { + $("#documenter-article-toggle-button").trigger({ + type: "click", + noToggleAnimation: true, + }); + } }); -// list below is the lunr 2.1.3 list minus the intersect with names(Base) -// (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with) -// ideally we'd just filter the original list but it's not available as a variable -const stopWords = new Set([ - "a", - "able", - "about", - "across", - "after", - "almost", - "also", - "am", - "among", - "an", - "and", - "are", - "as", - "at", - "be", - "because", - "been", - "but", - "by", - "can", - "cannot", - "could", - "dear", - "did", - "does", - "either", - "ever", - "every", - "from", - "got", - "had", - "has", - "have", - "he", - "her", - "hers", - "him", - "his", - "how", - "however", - "i", - "if", - "into", - "it", - "its", - "just", - "least", - "like", - "likely", - "may", - "me", - "might", - "most", - "must", - "my", - "neither", - "no", - "nor", - "not", - "of", - "off", - "often", - "on", - "or", - "other", - "our", - "own", - "rather", - "said", - "say", - "says", - "she", - "should", - "since", - "so", - "some", - "than", - "that", - "the", - "their", - "them", - "then", - "there", - "these", - "they", - "this", - "tis", - "to", - "too", - "twas", - "us", - "wants", - "was", - "we", - "were", - "what", - "when", - "who", - "whom", - "why", - "will", - "would", - "yet", - "you", - "your", -]); - -let index = new minisearch({ - fields: ["title", "text"], // fields to index for full-text search - storeFields: ["location", "title", "text", "category", "page"], // fields to return with search results - processTerm: (term) => { - let word = stopWords.has(term) ? null : term; - if (word) { - // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names - word = word - .replace(/^[^a-zA-Z0-9@!]+/, "") - .replace(/[^a-zA-Z0-9@!]+$/, ""); - } +}) +//////////////////////////////////////////////////////////////////////////////// +require(['jquery'], function($) { - return word ?? null; - }, - // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not find anything if searching for "add!", only for the entire qualification - tokenize: (string) => string.split(/[\s\-\.]+/), - // options which will be applied during the search - searchOptions: { - boost: { title: 100 }, - fuzzy: 2, +/* +To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc + +PSEUDOCODE: + +Searching happens automatically as the user types or adjusts the selected filters. +To preserve responsiveness, as much as possible of the slow parts of the search are done +in a web worker. Searching and result generation are done in the worker, and filtering and +DOM updates are done in the main thread. The filters are in the main thread as they should +be very quick to apply. This lets filters be changed without re-searching with minisearch +(which is possible even if filtering is on the worker thread) and also lets filters be +changed _while_ the worker is searching and without message passing (neither of which are +possible if filtering is on the worker thread) + +SEARCH WORKER: + +Import minisearch + +Build index + +On message from main thread + run search + find the first 200 unique results from each category, and compute their divs for display + note that this is necessary and sufficient information for the main thread to find the + first 200 unique results from any given filter set + post results to main thread + +MAIN: + +Launch worker + +Declare nonconstant globals (worker_is_running, last_search_text, unfiltered_results) + +On text update + if worker is not running, launch_search() + +launch_search + set worker_is_running to true, set last_search_text to the search text + post the search query to worker + +on message from worker + if last_search_text is not the same as the text in the search field, + the latest search result is not reflective of the latest search query, so update again + launch_search() + otherwise + set worker_is_running to false + + regardless, display the new search results to the user + save the unfiltered_results as a global + update_search() + +on filter click + adjust the filter selection + update_search() + +update_search + apply search filters by looping through the unfiltered_results and finding the first 200 + unique results that match the filters + + Update the DOM +*/ + +/////// SEARCH WORKER /////// + +function worker_function(documenterSearchIndex, documenterBaseURL, filters) { + importScripts( + "https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min.js" + ); + + let data = documenterSearchIndex.map((x, key) => { + x["id"] = key; // minisearch requires a unique for each object + return x; + }); + + // list below is the lunr 2.1.3 list minus the intersect with names(Base) + // (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with) + // ideally we'd just filter the original list but it's not available as a variable + const stopWords = new Set([ + "a", + "able", + "about", + "across", + "after", + "almost", + "also", + "am", + "among", + "an", + "and", + "are", + "as", + "at", + "be", + "because", + "been", + "but", + "by", + "can", + "cannot", + "could", + "dear", + "did", + "does", + "either", + "ever", + "every", + "from", + "got", + "had", + "has", + "have", + "he", + "her", + "hers", + "him", + "his", + "how", + "however", + "i", + "if", + "into", + "it", + "its", + "just", + "least", + "like", + "likely", + "may", + "me", + "might", + "most", + "must", + "my", + "neither", + "no", + "nor", + "not", + "of", + "off", + "often", + "on", + "or", + "other", + "our", + "own", + "rather", + "said", + "say", + "says", + "she", + "should", + "since", + "so", + "some", + "than", + "that", + "the", + "their", + "them", + "then", + "there", + "these", + "they", + "this", + "tis", + "to", + "too", + "twas", + "us", + "wants", + "was", + "we", + "were", + "what", + "when", + "who", + "whom", + "why", + "will", + "would", + "yet", + "you", + "your", + ]); + + let index = new MiniSearch({ + fields: ["title", "text"], // fields to index for full-text search + storeFields: ["location", "title", "text", "category", "page"], // fields to return with results processTerm: (term) => { let word = stopWords.has(term) ? null : term; if (word) { + // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names word = word .replace(/^[^a-zA-Z0-9@!]+/, "") .replace(/[^a-zA-Z0-9@!]+$/, ""); + + word = word.toLowerCase(); } return word ?? null; }, + // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not + // find anything if searching for "add!", only for the entire qualification tokenize: (string) => string.split(/[\s\-\.]+/), - }, -}); + // options which will be applied during the search + searchOptions: { + prefix: true, + boost: { title: 100 }, + fuzzy: 2, + }, + }); -index.addAll(data); + index.addAll(data); + + /** + * Used to map characters to HTML entities. + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + const htmlEscapes = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + }; + + /** + * Used to match HTML entities and HTML characters. + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + const reUnescapedHtml = /[&<>"']/g; + const reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** + * Escape function from lodash + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + function escape(string) { + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, (chr) => htmlEscapes[chr]) + : string || ""; + } -let filters = [...new Set(data.map((x) => x.category))]; -var modal_filters = make_modal_body_filters(filters); -var filter_results = []; + /** + * Make the result component given a minisearch result data object and the value + * of the search input as queryString. To view the result object structure, refer: + * https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult + * + * @param {object} result + * @param {string} querystring + * @returns string + */ + function make_search_result(result, querystring) { + let search_divider = `
`; + let display_link = + result.location.slice(Math.max(0), Math.min(50, result.location.length)) + + (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div + + if (result.page !== "") { + display_link += ` (${result.page})`; + } -$(document).on("keyup", ".documenter-search-input", function (event) { - // Adding a debounce to prevent disruptions from super-speed typing! - debounce(() => update_search(filter_results), 300); + let textindex = new RegExp(`${querystring}`, "i").exec(result.text); + let text = + textindex !== null + ? result.text.slice( + Math.max(textindex.index - 100, 0), + Math.min( + textindex.index + querystring.length + 100, + result.text.length + ) + ) + : ""; // cut-off text before and after from the match + + text = text.length ? escape(text) : ""; + + let display_result = text.length + ? "..." + + text.replace( + new RegExp(`${escape(querystring)}`, "i"), // For first occurrence + '$&' + ) + + "..." + : ""; // highlights the match + + let in_code = false; + if (!["page", "section"].includes(result.category.toLowerCase())) { + in_code = true; + } + + // We encode the full url to escape some special characters which can lead to broken links + let result_div = ` + +
+
${escape(result.title)}
+
${result.category}
+
+

+ ${display_result} +

+
+ ${display_link} +
+
+ ${search_divider} + `; + + return result_div; + } + + self.onmessage = function (e) { + let query = e.data; + let results = index.search(query, { + filter: (result) => { + // Only return relevant results + return result.score >= 1; + }, + }); + + // Pre-filter to deduplicate and limit to 200 per category to the extent + // possible without knowing what the filters are. + let filtered_results = []; + let counts = {}; + for (let filter of filters) { + counts[filter] = 0; + } + let present = {}; + + for (let result of results) { + cat = result.category; + cnt = counts[cat]; + if (cnt < 200) { + id = cat + "---" + result.location; + if (present[id]) { + continue; + } + present[id] = true; + filtered_results.push({ + location: result.location, + category: cat, + div: make_search_result(result, query), + }); + } + } + + postMessage(filtered_results); + }; +} + +// `worker = Threads.@spawn worker_function(documenterSearchIndex)`, but in JavaScript! +const filters = [ + ...new Set(documenterSearchIndex["docs"].map((x) => x.category)), +]; +const worker_str = + "(" + + worker_function.toString() + + ")(" + + JSON.stringify(documenterSearchIndex["docs"]) + + "," + + JSON.stringify(documenterBaseURL) + + "," + + JSON.stringify(filters) + + ")"; +const worker_blob = new Blob([worker_str], { type: "text/javascript" }); +const worker = new Worker(URL.createObjectURL(worker_blob)); + +/////// SEARCH MAIN /////// + +// Whether the worker is currently handling a search. This is a boolean +// as the worker only ever handles 1 or 0 searches at a time. +var worker_is_running = false; + +// The last search text that was sent to the worker. This is used to determine +// if the worker should be launched again when it reports back results. +var last_search_text = ""; + +// The results of the last search. This, in combination with the state of the filters +// in the DOM, is used compute the results to display on calls to update_search. +var unfiltered_results = []; + +// Which filter is currently selected +var selected_filter = ""; + +$(document).on("input", ".documenter-search-input", function (event) { + if (!worker_is_running) { + launch_search(); + } }); +function launch_search() { + worker_is_running = true; + last_search_text = $(".documenter-search-input").val(); + worker.postMessage(last_search_text); +} + +worker.onmessage = function (e) { + if (last_search_text !== $(".documenter-search-input").val()) { + launch_search(); + } else { + worker_is_running = false; + } + + unfiltered_results = e.data; + update_search(); +}; + $(document).on("click", ".search-filter", function () { if ($(this).hasClass("search-filter-selected")) { - $(this).removeClass("search-filter-selected"); + selected_filter = ""; } else { - $(this).addClass("search-filter-selected"); + selected_filter = $(this).text().toLowerCase(); } - // Adding a debounce to prevent disruptions from crazy clicking! - debounce(() => get_filters(), 300); + // This updates search results and toggles classes for UI: + update_search(); }); -/** - * A debounce function, takes a function and an optional timeout in milliseconds - * - * @function callback - * @param {number} timeout - */ -function debounce(callback, timeout = 300) { - clearTimeout(timer); - timer = setTimeout(callback, timeout); -} - /** * Make/Update the search component - * - * @param {string[]} selected_filters */ -function update_search(selected_filters = []) { - let initial_search_body = ` -
Type something to get started!
- `; - +function update_search() { let querystring = $(".documenter-search-input").val(); if (querystring.trim()) { - results = index.search(querystring, { - filter: (result) => { - // Filtering results - if (selected_filters.length === 0) { - return result.score >= 1; - } else { - return ( - result.score >= 1 && selected_filters.includes(result.category) - ); - } - }, - }); + if (selected_filter == "") { + results = unfiltered_results; + } else { + results = unfiltered_results.filter((result) => { + return selected_filter == result.category.toLowerCase(); + }); + } let search_result_container = ``; + let modal_filters = make_modal_body_filters(); let search_divider = `
`; if (results.length) { @@ -449,19 +690,23 @@ function update_search(selected_filters = []) { let count = 0; let search_results = ""; - results.forEach(function (result) { - if (result.location) { - // Checking for duplication of results for the same page - if (!links.includes(result.location)) { - search_results += make_search_result(result, querystring); - count++; - } - + for (var i = 0, n = results.length; i < n && count < 200; ++i) { + let result = results[i]; + if (result.location && !links.includes(result.location)) { + search_results += result.div; + count++; links.push(result.location); } - }); + } - let result_count = `
${count} result(s)
`; + if (count == 1) { + count_str = "1 result"; + } else if (count == 200) { + count_str = "200+ results"; + } else { + count_str = count + " results"; + } + let result_count = `
${count_str}
`; search_result_container = `
@@ -490,125 +735,37 @@ function update_search(selected_filters = []) { $(".search-modal-card-body").html(search_result_container); } else { - filter_results = []; - modal_filters = make_modal_body_filters(filters, filter_results); - if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) { $(".search-modal-card-body").addClass("is-justify-content-center"); } - $(".search-modal-card-body").html(initial_search_body); + $(".search-modal-card-body").html(` +
Type something to get started!
+ `); } } /** * Make the modal filter html * - * @param {string[]} filters - * @param {string[]} selected_filters * @returns string */ -function make_modal_body_filters(filters, selected_filters = []) { - let str = ``; - - filters.forEach((val) => { - if (selected_filters.includes(val)) { - str += `${val}`; - } else { - str += `${val}`; - } - }); +function make_modal_body_filters() { + let str = filters + .map((val) => { + if (selected_filter == val.toLowerCase()) { + return `${val}`; + } else { + return `${val}`; + } + }) + .join(""); - let filter_html = ` + return `
Filters: ${str} -
- `; - - return filter_html; -} - -/** - * Make the result component given a minisearch result data object and the value of the search input as queryString. - * To view the result object structure, refer: https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult - * - * @param {object} result - * @param {string} querystring - * @returns string - */ -function make_search_result(result, querystring) { - let search_divider = `
`; - let display_link = - result.location.slice(Math.max(0), Math.min(50, result.location.length)) + - (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div - - if (result.page !== "") { - display_link += ` (${result.page})`; - } - - let textindex = new RegExp(`\\b${querystring}\\b`, "i").exec(result.text); - let text = - textindex !== null - ? result.text.slice( - Math.max(textindex.index - 100, 0), - Math.min( - textindex.index + querystring.length + 100, - result.text.length - ) - ) - : ""; // cut-off text before and after from the match - - let display_result = text.length - ? "..." + - text.replace( - new RegExp(`\\b${querystring}\\b`, "i"), // For first occurrence - '$&' - ) + - "..." - : ""; // highlights the match - - let in_code = false; - if (!["page", "section"].includes(result.category.toLowerCase())) { - in_code = true; - } - - // We encode the full url to escape some special characters which can lead to broken links - let result_div = ` - -
-
${result.title}
-
${result.category}
-
-

- ${display_result} -

-
- ${display_link} -
-
- ${search_divider} - `; - - return result_div; -} - -/** - * Get selected filters, remake the filter html and lastly update the search modal - */ -function get_filters() { - let ele = $(".search-filters .search-filter-selected").get(); - filter_results = ele.map((x) => $(x).text().toLowerCase()); - modal_filters = make_modal_body_filters(filters, filter_results); - update_search(filter_results); +
`; } }) @@ -635,103 +792,107 @@ $(document).ready(function () { //////////////////////////////////////////////////////////////////////////////// require(['jquery'], function($) { -let search_modal_header = ` - -`; - -let initial_search_body = ` -
Type something to get started!
-`; - -let search_modal_footer = ` - -`; - -$(document.body).append( - ` - diff --git a/dev/lib/library/index.html b/dev/lib/library/index.html index 9e4f722..079d1a3 100644 --- a/dev/lib/library/index.html +++ b/dev/lib/library/index.html @@ -1,9 +1,9 @@ -Library · SatelliteToolboxAtmosphericModels.jl

Library

Documentation for SatelliteToolboxAtmosphericModels.jl.

SatelliteToolboxAtmosphericModels.AtmosphericModels.JB2008OutputType
struct JB2008Output{T<:Number}

Output of the atmospheric model Jacchia-Bowman 2008.

Fields

  • total_density::T: Total atmospheric density [1 / m³].
  • temperature::T: Temperature at the selected position [K].
  • exospheric_temperature::T: Exospheric temperature [K].
  • N2_number_density::T: Number density of N₂ [1 / m³].
  • O2_number_density::T: Number density of O₂ [1 / m³].
  • O_number_density::T: Number density of O [1 / m³].
  • Ar_number_density::T: Number density of Ar [1 / m³].
  • He_number_density::T: Number density of He [1 / m³].
  • H_number_density::T: Number density of H [1 / m³].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.JR1971OutputType
struct JR1971Output{T<:Number}

Output of the atmospheric model Jacchia-Roberts 1971.

Fields

  • total_density::T: Total atmospheric density [1 / m³].
  • temperature::T: Temperature at the selected position [K].
  • exospheric_temperature::T: Exospheric temperature [K].
  • N2_number_density::T: Number density of N₂ [1 / m³].
  • O2_number_density::T: Number density of O₂ [1 / m³].
  • O_number_density::T: Number density of O [1 / m³].
  • Ar_number_density::T: Number density of Ar [1 / m³].
  • He_number_density::T: Number density of He [1 / m³].
  • H_number_density::T: Number density of H [1 / m³].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00FlagsType
struct Nrlmsise00Flags

Flags to configure NRLMSISE-00.

Fields

  • F10_Mean::Bool: F10.7 effect on mean.
  • time_independent::Bool: Independent of time.
  • sym_annual::Bool: Symmetrical annual.
  • sym_semiannual::Bool: Symmetrical semiannual.
  • asym_annual::Bool: Asymmetrical annual.
  • asyn_semiannual::Bool: Asymmetrical semiannual.
  • diurnal::Bool: Diurnal.
  • semidiurnal::Bool: Semidiurnal.
  • daily_ap::Bool: Daily AP.
  • all_ut_long_effects::Bool: All UT/long effects.
  • longitudinal::Bool: Longitudinal.
  • ut_mixed_ut_long::Bool: UT and mixed UT/long.
  • mixed_ap_ut_long::Bool: Mixed AP/UT/long.
  • terdiurnal::Bool: Terdiurnal.
  • departures_from_eq::Bool: Departures from diffusive equilibrium.
  • all_tinf_var::Bool: All TINF variations.
  • all_tlb_var::Bool: All TLB variations.
  • all_tn1_var::Bool: All TN1 variations.
  • all_s_var::Bool: All S variations.
  • all_tn2_var::Bool: All TN2 variations.
  • all_nlb_var::Bool: All NLB variations.
  • all_tn3_var::Bool: All TN3 variations.
  • turbo_scale_height::Bool: Turbo scale height variations.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00OutputType
struct Nrlmsise00Output{T<:Number}

Output structure for NRLMSISE00 model.

Fields

  • total_density::T: Total mass density [kg / m³].
  • temperature: Temperature at the selected altitude [K].
  • exospheric_temperature: Exospheric temperature [K].
  • N_number_density: Nitrogen number density [1 / m³].
  • N2_number_density: N₂ number density [1 / m³].
  • O_number_density: Oxygen number density [1 / m³].
  • aO_number_density: Anomalous Oxygen number density [1 / m³].
  • O2_number_density: O₂ number density [1 / m³].
  • H_number_density: Hydrogen number density [1 / m³].
  • He_number_density: Helium number density [1 / m³].
  • Ar_number_density: Argon number density [1 / m³].

Remarks

Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (> 500 km) for some ranges of inputs, thereby affection drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.

source
SatelliteToolboxAtmosphericModels.AtmosphericModels._ccor2Method
_ccor2(alt::T, r::T, h₁::T, zh::T, h₂::T) where T<:Number -> T

Compute the O and O₂ chemistry / dissociation correction for MSIS models.

Arguments

  • h::Number: Altitude.
  • r::Number: Target ration.
  • h₁::Number: Transition scale length.
  • zh::Number: Altitude of 1/2 r.
  • h₂::Number: Transition scale length 2.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._densmMethod
_densm(h::T, d0::T, xm::T, tz::T, r_lat::T, g_lat::T, tn2::NTuple{N2, T}, tgn2::NTuple{2, T}, tn3::NTuple{N3, T}, tgn3::NTuple{2, T}) where {N2<:Interger, N3<:Integer, T<:Number} -> float(T), float(T)

Compute the temperature and density profiles for the lower atmosphere.

Note

This function returns the density if xm is not 0, or the temperature otherwise.

Arguments

  • h::T: Altitude [km].
  • d₀::T: Reference density, returned if h > _ZN2[1].
  • xm::T: Species molecular weight [ ].
  • g_lat::T: Reference gravity at desired latitude [cm / s²].
  • r_lat::T: Reference radius at desired latitude [km].
  • tn2::NTuple{N2, T}: Temperature at the nodes for ZN2 scale [K].
  • tgn2::NTuple{N2, T}: Temperature gradients at the end nodes for ZN2 scale.
  • tn3::NTuple{N3, T}: Temperature at the nodes for ZN3 scale [K].
  • tgn3::NTuple{N3, T}: Temperature gradients at the end nodes for ZN3 scale.

Returns

  • T: Density [1 / cm³] is xm is not 0, or the temperature [K] otherwise.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._densuMethod
_densu(h::T, dlb::T, tinf::T, tlb::T, xm::T, α::T, zlb::T, s2::T, g_lat::T, r_lat::T, tn1::NTuple{5, T}, tgn1::NTuple{2, T}) where T<:Number -> T, NTuple{5, T}, NTuple{2, T}

Compute the density [1 / cm³] or temperature [K] profiles according to the new lower thermo polynomial.

Note

This function returns the density if xm is not 0, or the temperature otherwise.

Arguments

  • h::T: Altitude [km].
  • dlb::T: Density at lower boundary [1 / cm³].
  • tinf::T: Exospheric temperature [K].
  • tlb::T: Temperature at lower boundary [K].
  • xm::T: Species molecular weight [ ].
  • α::T: Thermal diffusion coefficient.
  • zlb::T: Altitude at lower boundary [km].
  • s2::T: Slope.
  • g_lat::T: Reference gravity at the latitude [cm / s²].
  • r_lat::T: Reference radius at the latitude [km].
  • tn1::NTuple{5, T}: Temperature at nodes for ZN1 scale [K].
  • tgn1::NTuple{2, T}: Temperature gradients at end nodes for ZN1 scale.

Returns

  • T: Density [1 / cm³] is xm is not 0, or the temperature [K] otherwise.
  • NTuple{5, T}: Updated tn1.
  • NTuple{2, T}: Updated tgn1.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._dnetMethod

_dnet(dd::T, dm::T, zhm::T, xmm::T, xm::T) where T<:Number -> T

Compute the turbopause correction for MSIS models, returning the combined density.

Arguments

  • dd::T: Diffusive density.
  • dm::T: Full mixed density.
  • zhm::T: Transition scale length.
  • xmm::T: Full mixed molecular weight.
  • xm::T: Species molecular weight.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._globe7Method
_globe7(nrlmsise00d::Nrlmsise00Structure{T}, p::AbstractVector{T}) where T<:Number -> Nrlmsise00Structure{T}, T

Compute the function G(L) with upper thermosphere parameters p and the NRLMSISE-00 structure nrlmsise00.

Note

The variables apt and apdf inside nrlmsise00d can be modified inside this function.

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • T: Result of G(L).
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7Method
_gtd7(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}

Compute the temperatures and densities using the information inside the structure nrlmsise00d without including the anomalous oxygen in the total density.

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • Nrlmsise00Output{T}: Structure with the output information.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7dMethod
_gtd7d(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}

Compute the temperatures and densities using the information inside the structure nrlmsise00d including the anomalous oxygen in the total density.

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • Nrlmsise00Output{T}: Structure with the output information.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._gts7Method
_gts7(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}

Compute the temperatures and densities using the information inside the structure nrlmsise00d and including the anomalous oxygen in the total density for altitudes higher than 72.5 km (thermospheric portion of NRLMSISE-00).

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • Nrlmsise00Output{T}: Structure with the output information.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._scale_heightMethod
_scale_height(h::T, xm::T, temp::T, g_lat::T, r_lat::T) where T<:Number -> T

Compute the scale height.

Arguments

  • h::T: Altitude [km].
  • xm::T: Species molecular weight [ ].
  • temp::T: Temperature [K].
  • g_lat::T: Reference gravity at desired latitude [cm / s²].
  • r_lat::T: Reference radius at desired latitude [km].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._splineMethod
_spline(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y::NTuple{N, T}, xᵢ::T) where {N, T<:Number} -> float(T)

Compute the interpolation of the cubic spline y(x) with second derivatives ∂²y at xᵢ.

Note

This function was adapted from Numerical Recipes.

Arguments

  • x::NTuple{N, T}: X components of the tabulated function in ascending order.
  • y::NTuple{N, T}: Y components of the tabulated function evaluated at x.
  • ∂²y::NTuple{N, T}: Second derivatives of y(x) ∂²y/∂x² evaluated at x.
  • xᵢ::T: Point to compute the interpolation.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∂²Method
_spline_∂²(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y₁::T, ∂²yₙ::T) where {N, T<:Number} -> NTuple{N, T}

Compute the 2nd derivatives of the cubic spline interpolation y(x) given the 2nd derivatives at x[1] (∂²y₁) and at x[N] (∂²yₙ). This functions return a tuple with the evaluated 2nd derivatives at each point in x.

Note

This function was adapted from Numerical Recipes.

Note

Values higher than 0.99e30 in the 2nd derivatives at the borders (∂²y₁ and ∂²yₙ) are interpreted as 0.

Arguments

  • x::NTuple{N, T}: X components of the tabulated function in ascending order.
  • y::NTuple{N, T}: Y components of the tabulated function evaluated at x.
  • ∂²y₁::T: Second derivative of y(x) ∂²y/∂x² evaluated at x[1].
  • ∂²yₙ::T: Second derivative of y(x) ∂²y/∂x² evaluated at x[N].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∫Method
_spline_∫(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y::NTuple{N, T}, xf::Number) where {N, T<:Number} -> float(T)

Compute the integral of the cubic spline function y(x) from x[1] to xf, where the function second derivatives evaluated at x are ∂²y.

Arguments

  • x::NTuple{N, T}: X components of the tabulated function in ascending order.
  • y::NTuple{N, T}: Y components of the tabulated function evaluated at x.
  • ∂²y::NTuple{N, T}: Second derivatives of y(x) ∂²y/∂x² evaluated at x.
  • xf::Number: Abscissa endpoint for integration.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.exponentialMethod
exponential(h::Number) -> Float64

Compute the atmospheric density [kg / m³] at the altitude h [m] above the ellipsoid using the exponential atmospheric model:

                ┌            ┐
+Library · SatelliteToolboxAtmosphericModels.jl

Library

Documentation for SatelliteToolboxAtmosphericModels.jl.

SatelliteToolboxAtmosphericModels.AtmosphericModels.JB2008OutputType
struct JB2008Output{T<:Number}

Output of the atmospheric model Jacchia-Bowman 2008.

Fields

  • total_density::T: Total atmospheric density [1 / m³].
  • temperature::T: Temperature at the selected position [K].
  • exospheric_temperature::T: Exospheric temperature [K].
  • N2_number_density::T: Number density of N₂ [1 / m³].
  • O2_number_density::T: Number density of O₂ [1 / m³].
  • O_number_density::T: Number density of O [1 / m³].
  • Ar_number_density::T: Number density of Ar [1 / m³].
  • He_number_density::T: Number density of He [1 / m³].
  • H_number_density::T: Number density of H [1 / m³].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.JR1971OutputType
struct JR1971Output{T<:Number}

Output of the atmospheric model Jacchia-Roberts 1971.

Fields

  • total_density::T: Total atmospheric density [1 / m³].
  • temperature::T: Temperature at the selected position [K].
  • exospheric_temperature::T: Exospheric temperature [K].
  • N2_number_density::T: Number density of N₂ [1 / m³].
  • O2_number_density::T: Number density of O₂ [1 / m³].
  • O_number_density::T: Number density of O [1 / m³].
  • Ar_number_density::T: Number density of Ar [1 / m³].
  • He_number_density::T: Number density of He [1 / m³].
  • H_number_density::T: Number density of H [1 / m³].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00FlagsType
struct Nrlmsise00Flags

Flags to configure NRLMSISE-00.

Fields

  • F10_Mean::Bool: F10.7 effect on mean.
  • time_independent::Bool: Independent of time.
  • sym_annual::Bool: Symmetrical annual.
  • sym_semiannual::Bool: Symmetrical semiannual.
  • asym_annual::Bool: Asymmetrical annual.
  • asyn_semiannual::Bool: Asymmetrical semiannual.
  • diurnal::Bool: Diurnal.
  • semidiurnal::Bool: Semidiurnal.
  • daily_ap::Bool: Daily AP.
  • all_ut_long_effects::Bool: All UT/long effects.
  • longitudinal::Bool: Longitudinal.
  • ut_mixed_ut_long::Bool: UT and mixed UT/long.
  • mixed_ap_ut_long::Bool: Mixed AP/UT/long.
  • terdiurnal::Bool: Terdiurnal.
  • departures_from_eq::Bool: Departures from diffusive equilibrium.
  • all_tinf_var::Bool: All TINF variations.
  • all_tlb_var::Bool: All TLB variations.
  • all_tn1_var::Bool: All TN1 variations.
  • all_s_var::Bool: All S variations.
  • all_tn2_var::Bool: All TN2 variations.
  • all_nlb_var::Bool: All NLB variations.
  • all_tn3_var::Bool: All TN3 variations.
  • turbo_scale_height::Bool: Turbo scale height variations.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00OutputType
struct Nrlmsise00Output{T<:Number}

Output structure for NRLMSISE00 model.

Fields

  • total_density::T: Total mass density [kg / m³].
  • temperature: Temperature at the selected altitude [K].
  • exospheric_temperature: Exospheric temperature [K].
  • N_number_density: Nitrogen number density [1 / m³].
  • N2_number_density: N₂ number density [1 / m³].
  • O_number_density: Oxygen number density [1 / m³].
  • aO_number_density: Anomalous Oxygen number density [1 / m³].
  • O2_number_density: O₂ number density [1 / m³].
  • H_number_density: Hydrogen number density [1 / m³].
  • He_number_density: Helium number density [1 / m³].
  • Ar_number_density: Argon number density [1 / m³].

Remarks

Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (> 500 km) for some ranges of inputs, thereby affection drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.

source
SatelliteToolboxAtmosphericModels.AtmosphericModels._ccor2Method
_ccor2(alt::T, r::T, h₁::T, zh::T, h₂::T) where T<:Number -> T

Compute the O and O₂ chemistry / dissociation correction for MSIS models.

Arguments

  • h::Number: Altitude.
  • r::Number: Target ration.
  • h₁::Number: Transition scale length.
  • zh::Number: Altitude of 1/2 r.
  • h₂::Number: Transition scale length 2.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._densmMethod
_densm(h::T, d0::T, xm::T, tz::T, r_lat::T, g_lat::T, tn2::NTuple{N2, T}, tgn2::NTuple{2, T}, tn3::NTuple{N3, T}, tgn3::NTuple{2, T}) where {N2<:Interger, N3<:Integer, T<:Number} -> float(T), float(T)

Compute the temperature and density profiles for the lower atmosphere.

Note

This function returns the density if xm is not 0, or the temperature otherwise.

Arguments

  • h::T: Altitude [km].
  • d₀::T: Reference density, returned if h > _ZN2[1].
  • xm::T: Species molecular weight [ ].
  • g_lat::T: Reference gravity at desired latitude [cm / s²].
  • r_lat::T: Reference radius at desired latitude [km].
  • tn2::NTuple{N2, T}: Temperature at the nodes for ZN2 scale [K].
  • tgn2::NTuple{N2, T}: Temperature gradients at the end nodes for ZN2 scale.
  • tn3::NTuple{N3, T}: Temperature at the nodes for ZN3 scale [K].
  • tgn3::NTuple{N3, T}: Temperature gradients at the end nodes for ZN3 scale.

Returns

  • T: Density [1 / cm³] is xm is not 0, or the temperature [K] otherwise.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._densuMethod
_densu(h::T, dlb::T, tinf::T, tlb::T, xm::T, α::T, zlb::T, s2::T, g_lat::T, r_lat::T, tn1::NTuple{5, T}, tgn1::NTuple{2, T}) where T<:Number -> T, NTuple{5, T}, NTuple{2, T}

Compute the density [1 / cm³] or temperature [K] profiles according to the new lower thermo polynomial.

Note

This function returns the density if xm is not 0, or the temperature otherwise.

Arguments

  • h::T: Altitude [km].
  • dlb::T: Density at lower boundary [1 / cm³].
  • tinf::T: Exospheric temperature [K].
  • tlb::T: Temperature at lower boundary [K].
  • xm::T: Species molecular weight [ ].
  • α::T: Thermal diffusion coefficient.
  • zlb::T: Altitude at lower boundary [km].
  • s2::T: Slope.
  • g_lat::T: Reference gravity at the latitude [cm / s²].
  • r_lat::T: Reference radius at the latitude [km].
  • tn1::NTuple{5, T}: Temperature at nodes for ZN1 scale [K].
  • tgn1::NTuple{2, T}: Temperature gradients at end nodes for ZN1 scale.

Returns

  • T: Density [1 / cm³] is xm is not 0, or the temperature [K] otherwise.
  • NTuple{5, T}: Updated tn1.
  • NTuple{2, T}: Updated tgn1.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._dnetMethod

_dnet(dd::T, dm::T, zhm::T, xmm::T, xm::T) where T<:Number -> T

Compute the turbopause correction for MSIS models, returning the combined density.

Arguments

  • dd::T: Diffusive density.
  • dm::T: Full mixed density.
  • zhm::T: Transition scale length.
  • xmm::T: Full mixed molecular weight.
  • xm::T: Species molecular weight.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._globe7Method
_globe7(nrlmsise00d::Nrlmsise00Structure{T}, p::AbstractVector{T}) where T<:Number -> Nrlmsise00Structure{T}, T

Compute the function G(L) with upper thermosphere parameters p and the NRLMSISE-00 structure nrlmsise00.

Note

The variables apt and apdf inside nrlmsise00d can be modified inside this function.

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • T: Result of G(L).
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7Method
_gtd7(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}

Compute the temperatures and densities using the information inside the structure nrlmsise00d without including the anomalous oxygen in the total density.

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • Nrlmsise00Output{T}: Structure with the output information.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7dMethod
_gtd7d(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}

Compute the temperatures and densities using the information inside the structure nrlmsise00d including the anomalous oxygen in the total density.

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • Nrlmsise00Output{T}: Structure with the output information.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._gts7Method
_gts7(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}

Compute the temperatures and densities using the information inside the structure nrlmsise00d and including the anomalous oxygen in the total density for altitudes higher than 72.5 km (thermospheric portion of NRLMSISE-00).

Returns

  • Nrlmsise00Structure{T}: Modified structure nrlmsise00d.
  • Nrlmsise00Output{T}: Structure with the output information.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._scale_heightMethod
_scale_height(h::T, xm::T, temp::T, g_lat::T, r_lat::T) where T<:Number -> T

Compute the scale height.

Arguments

  • h::T: Altitude [km].
  • xm::T: Species molecular weight [ ].
  • temp::T: Temperature [K].
  • g_lat::T: Reference gravity at desired latitude [cm / s²].
  • r_lat::T: Reference radius at desired latitude [km].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._splineMethod
_spline(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y::NTuple{N, T}, xᵢ::T) where {N, T<:Number} -> float(T)

Compute the interpolation of the cubic spline y(x) with second derivatives ∂²y at xᵢ.

Note

This function was adapted from Numerical Recipes.

Arguments

  • x::NTuple{N, T}: X components of the tabulated function in ascending order.
  • y::NTuple{N, T}: Y components of the tabulated function evaluated at x.
  • ∂²y::NTuple{N, T}: Second derivatives of y(x) ∂²y/∂x² evaluated at x.
  • xᵢ::T: Point to compute the interpolation.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∂²Method
_spline_∂²(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y₁::T, ∂²yₙ::T) where {N, T<:Number} -> NTuple{N, T}

Compute the 2nd derivatives of the cubic spline interpolation y(x) given the 2nd derivatives at x[1] (∂²y₁) and at x[N] (∂²yₙ). This functions return a tuple with the evaluated 2nd derivatives at each point in x.

Note

This function was adapted from Numerical Recipes.

Note

Values higher than 0.99e30 in the 2nd derivatives at the borders (∂²y₁ and ∂²yₙ) are interpreted as 0.

Arguments

  • x::NTuple{N, T}: X components of the tabulated function in ascending order.
  • y::NTuple{N, T}: Y components of the tabulated function evaluated at x.
  • ∂²y₁::T: Second derivative of y(x) ∂²y/∂x² evaluated at x[1].
  • ∂²yₙ::T: Second derivative of y(x) ∂²y/∂x² evaluated at x[N].
source
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∫Method
_spline_∫(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y::NTuple{N, T}, xf::Number) where {N, T<:Number} -> float(T)

Compute the integral of the cubic spline function y(x) from x[1] to xf, where the function second derivatives evaluated at x are ∂²y.

Arguments

  • x::NTuple{N, T}: X components of the tabulated function in ascending order.
  • y::NTuple{N, T}: Y components of the tabulated function evaluated at x.
  • ∂²y::NTuple{N, T}: Second derivatives of y(x) ∂²y/∂x² evaluated at x.
  • xf::Number: Abscissa endpoint for integration.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.exponentialMethod
exponential(h::Number) -> Float64

Compute the atmospheric density [kg / m³] at the altitude h [m] above the ellipsoid using the exponential atmospheric model:

                ┌            ┐
                 │    h - h₀  │
 ρ(h) = ρ₀ . exp │ - ──────── │ ,
                 │      H     │
-                └            ┘

in which ρ₀, h₀, and H are parameters obtained from tables that depend only on h.

source
SatelliteToolboxAtmosphericModels.AtmosphericModels.jb2008Method
jb2008(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, S10::Number, S10ₐ::Number, M10::Number, M10ₐ::Number, Y10::Number, Y10ₐ::Number, DstΔTc::Number]) -> JB2008Output{Float64}
-jb2008(jd::Number, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, S10::Number, S10ₐ::Number, M10::Number, M10ₐ::Number, Y10::Number, Y10ₐ::Number, DstΔTc::Number]) -> JB2008Output{Float64}

Compute the atmospheric density using the Jacchia-Bowman 2008 (JB2008) model.

This model is a product of the Space Environment Technologies, please, refer to the following website for more information:

http://sol.spacenvironment.net/JB2008/

If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().

Arguments

  • jd::Number: Julian day to compute the model.
  • instant::DateTime: Instant to compute the model represent using DateTime.
  • ϕ_gd: Geodetic latitude [rad].
  • λ: Longitude [rad].
  • h: Altitude [m].
  • F10: 10.7-cm solar flux [sfu] obtained 1 day before jd.
  • F10ₐ: 10.7-cm averaged solar flux using a 81-day window centered on input time obtained 1 day before jd.
  • S10: EUV index (26-34 nm) scaled to F10.7 obtained 1 day before jd.
  • S10ₐ: EUV 81-day averaged centered index obtained 1 day before jd.
  • M10: MG2 index scaled to F10.7 obtained 2 days before jd.
  • M10ₐ: MG2 81-day averaged centered index obtained 2 day before jd.
  • Y10: Solar X-ray & Ly-α index scaled to F10.7 obtained 5 days before jd.
  • Y10ₐ: Solar X-ray & Ly-α 81-day averaged centered index obtained 5 days before jd.
  • DstΔTc: Temperature variation related to the Dst.

Returns

  • JB2008Output{Float64}: Structure containing the results obtained from the model.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.jr1971Method
jr1971(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, Kp::Number]) -> JR1971Output{Float64}
-jr1971(jd::Number, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, Kp::Number]) -> JR1971Output{Float64}

Compute the atmospheric density using the Jacchia-Roberts 1971 model.

If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().

Arguments

  • jd::Number: Julian day to compute the model.
  • instant::DateTime: Instant to compute the model represent using DateTime.
  • ϕ_gd::Number: Geodetic latitude [rad].
  • λ::Number: Longitude [rad].
  • h::Number: Altitude [m].
  • F10::Number: 10.7-cm solar flux [sfu].
  • F10ₐ::Number: 10.7-cm averaged solar flux, 81-day centered on input time [sfu].
  • Kp::Number: Kp geomagnetic index with a delay of 3 hours.

Returns

  • JR1971Output{Float64}: Structure containing the results obtained from the model.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.nrlmsise00Method
nrlmsise00(instant::DateTime, h::Number, ϕ_gd::Number, λ::Number[, F10ₐ::Number, F10::Number, ap::Union{Number, AbstractVector}]; kwargs...) -> Nrlmsise00Output{Float64}
-nrlmsise00(jd::Number, h::Number, ϕ_gd::Number, λ::Number[, F10ₐ::Number, F10::Number, ap::Union{Number, AbstractVector}]; kwargs...) -> Nrlmsise00Output{Float64}

Compute the atmospheric density using the NRLMSISE-00 model.

If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().

Arguments

  • instant::DateTime: Instant to compute the model represent using DateTime.
  • jd::Number: Julian day to compute the model.
  • h::Number: Altitude [m].
  • ϕ_gd::Number: Geodetic latitude [rad].
  • λ::Number: Longitude [rad].
  • F10ₐ::Number: 10.7-cm averaged solar flux, 90-day centered on input time [sfu].
  • F10::Number: 10.7-cm solar flux [sfu].
  • ap::Union{Number, AbstractVector}: Magnetic index, see the section AP for more information.

Keywords

  • flags::Nrlmsise00Flags: A list of flags to configure the model. For more information, see [Nrlmsise00Flags]@(ref). (Default = Nrlmsise00Flags())
  • include_anomalous_oxygen::Bool: If true, the anomalous oxygen density will be included in the total density computation. (Default = true)
  • P::Union{Nothing, Matrix}: If the user passes a matrix with dimensions equal to or greater than 8 × 4, it will be used when computing the Legendre associated functions, reducing allocations and improving the performance. If it is nothing, the matrix is allocated inside the function. (Default nothing)

Returns

  • Nrlmsise00Output{Float64}: Structure containing the results obtained from the model.

AP

The input variable ap contains the magnetic index. It can be a Number or an AbstractVector.

If ap is a number, it must contain the daily magnetic index.

If ap is an AbstractVector, it must be a vector with 7 dimensions as described below:

IndexDescription
1Daily AP.
23 hour AP index for current time.
33 hour AP index for 3 hours before current time.
43 hour AP index for 6 hours before current time.
53 hour AP index for 9 hours before current time.
6Average of eight 3 hour AP indices from 12 to 33 hours prior to current time.
7Average of eight 3 hour AP indices from 36 to 57 hours prior to current time.

Extended Help

  1. The densities of O, H, and N are set to 0 below 72.5 km.
  2. The exospheric temperature is set to global average for altitudes below 120 km. The 120 km gradient is left at global average value for altitudes below 72.5 km.
  3. Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (> 500 km) for some ranges of inputs, thereby affection drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.

Notes on Input Variables

F10 and F10ₐ values used to generate the model correspond to the 10.7 cm radio flux at the actual distance of the Earth from the Sun rather than the radio flux at 1 AU. The following site provides both classes of values:

ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/

F10, F10ₐ, and ap effects are neither large nor well established below 80 km and these parameters should be set to 150, 150, and 4 respectively.

If include_anomalous_oxygen is false, the total_density field in the output is the sum of the mass densities of the species He, O, N₂, O₂, Ar, H, and N, but does not include anomalous oxygen.

If include_anomalous_oxygen is false, the total_density field in the output is the effective total mass density for drag and is the sum of the mass densities of all species in this model including the anomalous oxygen.

source
+ └ ┘

in which ρ₀, h₀, and H are parameters obtained from tables that depend only on h.

source
SatelliteToolboxAtmosphericModels.AtmosphericModels.jb2008Method
jb2008(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, S10::Number, S10ₐ::Number, M10::Number, M10ₐ::Number, Y10::Number, Y10ₐ::Number, DstΔTc::Number]) -> JB2008Output{Float64}
+jb2008(jd::Number, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, S10::Number, S10ₐ::Number, M10::Number, M10ₐ::Number, Y10::Number, Y10ₐ::Number, DstΔTc::Number]) -> JB2008Output{Float64}

Compute the atmospheric density using the Jacchia-Bowman 2008 (JB2008) model.

This model is a product of the Space Environment Technologies, please, refer to the following website for more information:

http://sol.spacenvironment.net/JB2008/

If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().

Arguments

  • jd::Number: Julian day to compute the model.
  • instant::DateTime: Instant to compute the model represent using DateTime.
  • ϕ_gd: Geodetic latitude [rad].
  • λ: Longitude [rad].
  • h: Altitude [m].
  • F10: 10.7-cm solar flux [sfu] obtained 1 day before jd.
  • F10ₐ: 10.7-cm averaged solar flux using a 81-day window centered on input time obtained 1 day before jd.
  • S10: EUV index (26-34 nm) scaled to F10.7 obtained 1 day before jd.
  • S10ₐ: EUV 81-day averaged centered index obtained 1 day before jd.
  • M10: MG2 index scaled to F10.7 obtained 2 days before jd.
  • M10ₐ: MG2 81-day averaged centered index obtained 2 day before jd.
  • Y10: Solar X-ray & Ly-α index scaled to F10.7 obtained 5 days before jd.
  • Y10ₐ: Solar X-ray & Ly-α 81-day averaged centered index obtained 5 days before jd.
  • DstΔTc: Temperature variation related to the Dst.

Returns

  • JB2008Output{Float64}: Structure containing the results obtained from the model.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.jr1971Method
jr1971(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, Kp::Number]) -> JR1971Output{Float64}
+jr1971(jd::Number, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, Kp::Number]) -> JR1971Output{Float64}

Compute the atmospheric density using the Jacchia-Roberts 1971 model.

If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().

Arguments

  • jd::Number: Julian day to compute the model.
  • instant::DateTime: Instant to compute the model represent using DateTime.
  • ϕ_gd::Number: Geodetic latitude [rad].
  • λ::Number: Longitude [rad].
  • h::Number: Altitude [m].
  • F10::Number: 10.7-cm solar flux [sfu].
  • F10ₐ::Number: 10.7-cm averaged solar flux, 81-day centered on input time [sfu].
  • Kp::Number: Kp geomagnetic index with a delay of 3 hours.

Returns

  • JR1971Output{Float64}: Structure containing the results obtained from the model.
source
SatelliteToolboxAtmosphericModels.AtmosphericModels.nrlmsise00Method
nrlmsise00(instant::DateTime, h::Number, ϕ_gd::Number, λ::Number[, F10ₐ::Number, F10::Number, ap::Union{Number, AbstractVector}]; kwargs...) -> Nrlmsise00Output{Float64}
+nrlmsise00(jd::Number, h::Number, ϕ_gd::Number, λ::Number[, F10ₐ::Number, F10::Number, ap::Union{Number, AbstractVector}]; kwargs...) -> Nrlmsise00Output{Float64}

Compute the atmospheric density using the NRLMSISE-00 model.

If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().

Arguments

  • instant::DateTime: Instant to compute the model represent using DateTime.
  • jd::Number: Julian day to compute the model.
  • h::Number: Altitude [m].
  • ϕ_gd::Number: Geodetic latitude [rad].
  • λ::Number: Longitude [rad].
  • F10ₐ::Number: 10.7-cm averaged solar flux, 90-day centered on input time [sfu].
  • F10::Number: 10.7-cm solar flux [sfu].
  • ap::Union{Number, AbstractVector}: Magnetic index, see the section AP for more information.

Keywords

  • flags::Nrlmsise00Flags: A list of flags to configure the model. For more information, see [Nrlmsise00Flags]@(ref). (Default = Nrlmsise00Flags())
  • include_anomalous_oxygen::Bool: If true, the anomalous oxygen density will be included in the total density computation. (Default = true)
  • P::Union{Nothing, Matrix}: If the user passes a matrix with dimensions equal to or greater than 8 × 4, it will be used when computing the Legendre associated functions, reducing allocations and improving the performance. If it is nothing, the matrix is allocated inside the function. (Default nothing)

Returns

  • Nrlmsise00Output{Float64}: Structure containing the results obtained from the model.

AP

The input variable ap contains the magnetic index. It can be a Number or an AbstractVector.

If ap is a number, it must contain the daily magnetic index.

If ap is an AbstractVector, it must be a vector with 7 dimensions as described below:

IndexDescription
1Daily AP.
23 hour AP index for current time.
33 hour AP index for 3 hours before current time.
43 hour AP index for 6 hours before current time.
53 hour AP index for 9 hours before current time.
6Average of eight 3 hour AP indices from 12 to 33 hours prior to current time.
7Average of eight 3 hour AP indices from 36 to 57 hours prior to current time.

Extended Help

  1. The densities of O, H, and N are set to 0 below 72.5 km.
  2. The exospheric temperature is set to global average for altitudes below 120 km. The 120 km gradient is left at global average value for altitudes below 72.5 km.
  3. Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (> 500 km) for some ranges of inputs, thereby affection drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.

Notes on Input Variables

F10 and F10ₐ values used to generate the model correspond to the 10.7 cm radio flux at the actual distance of the Earth from the Sun rather than the radio flux at 1 AU. The following site provides both classes of values:

ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/

F10, F10ₐ, and ap effects are neither large nor well established below 80 km and these parameters should be set to 150, 150, and 4 respectively.

If include_anomalous_oxygen is false, the total_density field in the output is the sum of the mass densities of the species He, O, N₂, O₂, Ar, H, and N, but does not include anomalous oxygen.

If include_anomalous_oxygen is false, the total_density field in the output is the effective total mass density for drag and is the sum of the mass densities of all species in this model including the anomalous oxygen.

source
diff --git a/dev/man/exponential/index.html b/dev/man/exponential/index.html index 1ec4733..3eb7644 100644 --- a/dev/man/exponential/index.html +++ b/dev/man/exponential/index.html @@ -1,3 +1,3 @@ Exponential · SatelliteToolboxAtmosphericModels.jl

Exponential Atmospheric Model

This model assumes we can compute the atmospheric density by:

\[\rho(h) = \rho_0 \cdot exp \left\lbrace - \frac{h - h_0}{H} \right\rbrace~,\]

where $\rho_0$, $h_0$, and $H$ are parameters obtained from tables. Reference [1] provides a discretization of those parameters based on the selected height $h$ that was obtained after evaluation of some accurate models.

In this package, we can compute the model using the following function:

function AtmosphericModels.exponential(h::T) where T<:Number

where h is the desired height [m].

Warning

Notice that this model does not consider important effects such as the Sun activity, the geomagnetic activity, the local time at the desired location, and others. Hence, although this can be used for fast evaluations, the accuracy is not good.

Examples

julia> AtmosphericModels.exponential(700e3)
-3.614e-14

References

  • [1] Vallado, D. A (2013). Fundamentals of Astrodynamics and Applications. 4th ed. Microcosm Press, Hawthorn, CA, USA.
+3.614e-14

References

diff --git a/dev/man/jb2008/index.html b/dev/man/jb2008/index.html index ed55a1d..4ea4b95 100644 --- a/dev/man/jb2008/index.html +++ b/dev/man/jb2008/index.html @@ -47,4 +47,4 @@ O number density : 6.15818e+11 1 / m³ Ar number density : 6990.11 1 / m³ He number density : 5.06517e+11 1 / m³ - H number density : 4.32842e+09 1 / m³ + H number density : 4.32842e+09 1 / m³ diff --git a/dev/man/jr1971/index.html b/dev/man/jr1971/index.html index 0e68070..8108b52 100644 --- a/dev/man/jr1971/index.html +++ b/dev/man/jr1971/index.html @@ -39,4 +39,4 @@ O number density : 1.88625e+12 1 / m³ Ar number density : 8826.28 1 / m³ He number density : 1.50861e+12 1 / m³ - H number density : 9.14578e+09 1 / m³ + H number density : 9.14578e+09 1 / m³ diff --git a/dev/man/nrlmsise00/index.html b/dev/man/nrlmsise00/index.html index a207f4a..c6c0de7 100644 --- a/dev/man/nrlmsise00/index.html +++ b/dev/man/nrlmsise00/index.html @@ -45,4 +45,4 @@ O₂ number density : 287502 1 / m³ Ar number density : 18.6967 1 / m³ He number density : 6.15464e+11 1 / m³ - H number density : 1.28711e+11 1 / m³ + H number density : 1.28711e+11 1 / m³ diff --git a/dev/objects.inv b/dev/objects.inv new file mode 100644 index 0000000..0663c61 Binary files /dev/null and b/dev/objects.inv differ