Skip to content

Commit

Permalink
Merge pull request #244 from MIT-AI-Accelerator/gnadt
Browse files Browse the repository at this point in the history
Gnadt
  • Loading branch information
gnadt authored Mar 20, 2024
2 parents 264d500 + a613882 commit 20a94d4
Show file tree
Hide file tree
Showing 47 changed files with 1,617 additions and 1,617 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This work is created by the Department of the Air Force under 17 U.S.C. 105. Thi

When reproducing, copying, modifying, or creating derivative works, the portion(s) of the work attributable under 17 U.S.C. 105 may be designated with the above notice where appropriate. Improperly claiming ownership of this work could be punishable by law under 17 U.S.C. 506(c).

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MagNav: airborne Magnetic anomaly Navigation

[![CI](https://github.com/MIT-AI-Accelerator/MagNav.jl/workflows/CI/badge.svg)](https://github.com/MIT-AI-Accelerator/MagNav.jl/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/MIT-AI-Accelerator/MagNav.jl/branch/master/graph/badge.svg)](https://app.codecov.io/gh/MIT-AI-Accelerator/MagNav.jl)
[![Codecov](https://codecov.io/gh/MIT-AI-Accelerator/MagNav.jl/graph/badge.svg)](https://app.codecov.io/gh/MIT-AI-Accelerator/MagNav.jl)
[![docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://mit-ai-accelerator.github.io/MagNav.jl/stable/)

MagNav.jl contains a full suite of tools for airborne **Mag**netic anomaly **Nav**igation (MagNav), including flight path & INS data import or simulation, mapping, aeromagnetic compensation, and navigation. This package was developed as part of the [DAF-MIT Artificial Intelligence Accelerator](https://aia.mit.edu/). More information on this effort, including a list of relevant publications, is provided on the [challenge problem website](https://magnav.mit.edu/). The package has been tested on the long-term support (LTS) and latest stable versions of Julia, which may be downloaded from [here](https://julialang.org/downloads/). The recommended IDE for Julia is [Visual Studio Code](https://code.visualstudio.com/) (with the Julia extension).
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions examples/dataframes_setup.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## setup DataFrames for use with examples

## SGL calibration flight lines
df_comp = DataFrame(CSV.File("dataframes/df_comp.csv"))
df_comp[!,:flight] = Symbol.(df_comp[!,:flight])
df_comp[!,:map_name] = Symbol.(df_comp[!,:map_name]) # not ideal, but ok
df_cal = DataFrame(CSV.File("dataframes/df_cal.csv"))
df_cal[!,:flight] = Symbol.(df_cal[!,:flight])
df_cal[!,:map_name] = Symbol.(df_cal[!,:map_name]) # not ideal, but ok

## SGL flight data HDF5 files
df_flight = DataFrame(CSV.File("dataframes/df_flight.csv"))
Expand Down
12 changes: 6 additions & 6 deletions examples/jupyter_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"Dataframe | Description\n",
":--------- | :----------\n",
"`df_map` | map files relevant for SGL flights\n",
"`df_comp` | SGL calibration flight lines\n",
"`df_cal` | SGL calibration flight lines\n",
"`df_flight`| SGL flight files\n",
"`df_all` | all flight lines\n",
"`df_nav` | all *navigation-capable* flight lines\n",
Expand Down Expand Up @@ -152,7 +152,7 @@
"id": "741742c1-007c-43cc-abde-1860ce4c5d4c",
"metadata": {},
"source": [
"For the Tolles-Lawson calibration, we will select flight line 1006.04, which occurred at a higher altitude (see [readme](https://github.com/MIT-AI-Accelerator/MagNav.jl/blob/master/readmes/Flt1006_readme.txt)). This is the first calibration box of this flight line. `TL_ind` holds the Boolean indices (mask) just for this portion of the calibration flight line. The full list of calibration flight line options is in `df_comp`."
"For the Tolles-Lawson calibration, we will select flight line 1006.04, which occurred at a higher altitude (see [readme](https://github.com/MIT-AI-Accelerator/MagNav.jl/blob/master/readmes/Flt1006_readme.txt)). This is the first calibration box of this flight line. `TL_ind` holds the Boolean indices (mask) just for this portion of the calibration flight line. The full list of calibration flight line options is in `df_cal`."
]
},
{
Expand All @@ -163,7 +163,7 @@
"outputs": [],
"source": [
"TL_i = 6 # select first calibration box of 1006.04\n",
"TL_ind = get_ind(xyz;tt_lim=[df_comp.t_start[TL_i],df_comp.t_end[TL_i]]);\n"
"TL_ind = get_ind(xyz;tt_lim=[df_cal.t_start[TL_i],df_cal.t_end[TL_i]]);\n"
]
},
{
Expand Down Expand Up @@ -750,15 +750,15 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.9.3",
"display_name": "Julia 1.10.2",
"language": "julia",
"name": "julia-1.9"
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.9.3"
"version": "1.10.2"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions examples/jupyter_end-to-end_ML.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"Dataframe | Description\n",
":--------- | :----------\n",
"`df_map` | map files relevant for SGL flights\n",
"`df_comp` | SGL calibration flight lines\n",
"`df_cal` | SGL calibration flight lines\n",
"`df_flight`| SGL flight files\n",
"`df_all` | all flight lines\n",
"`df_nav` | all *navigation-capable* flight lines\n",
Expand Down Expand Up @@ -142,7 +142,7 @@
"id": "3f19688f",
"metadata": {},
"source": [
"For the Tolles-Lawson calibration, we will select flight line 1006.04, which occurred at a higher altitude (see [readme](https://github.com/MIT-AI-Accelerator/MagNav.jl/blob/master/readmes/Flt1006_readme.txt)). This is the first calibration box of this flight line. `TL_ind` holds the Boolean indices (mask) just for this portion of the calibration flight line. The full list of calibration flight line options is in `df_comp`."
"For the Tolles-Lawson calibration, we will select flight line 1006.04, which occurred at a higher altitude (see [readme](https://github.com/MIT-AI-Accelerator/MagNav.jl/blob/master/readmes/Flt1006_readme.txt)). This is the first calibration box of this flight line. `TL_ind` holds the Boolean indices (mask) just for this portion of the calibration flight line. The full list of calibration flight line options is in `df_cal`."
]
},
{
Expand All @@ -153,7 +153,7 @@
"outputs": [],
"source": [
"TL_i = 6 # select first calibration box of 1006.04\n",
"TL_ind = get_ind(xyz;tt_lim=[df_comp.t_start[TL_i],df_comp.t_end[TL_i]]);\n"
"TL_ind = get_ind(xyz;tt_lim=[df_cal.t_start[TL_i],df_cal.t_end[TL_i]]);\n"
]
},
{
Expand Down Expand Up @@ -834,15 +834,15 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.9.3",
"display_name": "Julia 1.10.2",
"language": "julia",
"name": "julia-1.9"
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.9.3"
"version": "1.10.2"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/pluto_fi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The DataFrames listed below provide useful information about the flight data (co
Dataframe | Description
:--------- | :----------
`df_map` | map files relevant for SGL flights
`df_comp` | SGL calibration flight lines
`df_cal` | SGL calibration flight lines
`df_flight`| SGL flight files
`df_all` | all flight lines
`df_nav` | all *navigation-capable* flight lines
Expand Down
8 changes: 4 additions & 4 deletions examples/pluto_linear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The DataFrames listed below provide useful information about the flight data (co
Dataframe | Description
:--------- | :----------
`df_map` | map files relevant for SGL flights
`df_comp` | SGL calibration flight lines
`df_cal` | SGL calibration flight lines
`df_flight`| SGL flight files
`df_all` | all flight lines
`df_nav` | all *navigation-capable* flight lines
Expand Down Expand Up @@ -101,14 +101,14 @@ md"Perform PLSR-based compensation on testing data. The full list of navigation-
comp_test(comp_params_1,lines_test,df_nav,df_flight,df_map);

# ╔═╡ 800fbc33-2c64-496a-8a6e-f2c9bf463692
md"Setup data for Tolles-Lawson. `TL_ind` holds the Boolean indices (mask) just for the selected flight data. The full list of calibration flight line options is in `df_comp`.
md"Setup data for Tolles-Lawson. `TL_ind` holds the Boolean indices (mask) just for the selected flight data. The full list of calibration flight line options is in `df_cal`.
"

# ╔═╡ 8eebdfaa-22d2-4466-8092-d62a6392c49b
begin
TL_i = 6 # select first calibration box of 1006.04
TL_xyz = get_XYZ(df_comp.flight[TL_i],df_flight;silent=true) # load flight data
TL_ind = get_ind(TL_xyz;tt_lim=[df_comp.t_start[TL_i],df_comp.t_end[TL_i]])
TL_xyz = get_XYZ(df_cal.flight[TL_i],df_flight;silent=true) # load flight data
TL_ind = get_ind(TL_xyz;tt_lim=[df_cal.t_start[TL_i],df_cal.t_end[TL_i]])
end;

# ╔═╡ d6efdf23-1a67-4e3e-b8d8-162b706032f6
Expand Down
8 changes: 4 additions & 4 deletions examples/pluto_maps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The DataFrames listed below provide useful information about the flight data (co
Dataframe | Description
:--------- | :----------
`df_map` | map files relevant for SGL flights
`df_comp` | SGL calibration flight lines
`df_cal` | SGL calibration flight lines
`df_flight`| SGL flight files
`df_all` | all flight lines
`df_nav` | all *navigation-capable* flight lines
Expand Down Expand Up @@ -170,7 +170,7 @@ begin
dy = MagNav.get_step(e_mapS_395.yy)
xx = [(e_mapS_395.xx[1]-dx*px):dx:(e_mapS_395.xx[end]+dx*px_end);]
yy = [(e_mapS_395.yy[1]-dy*py):dy:(e_mapS_395.yy[end]+dy*py_end);]
(lon,lat) = map_border(e_mapS_plot;sort_border=true) # get map border
(lat,lon) = map_border(e_mapS_plot;sort_border=true) # get map border
p5 = plot_map(map_map,xx,yy;dpi=dpi)
plot_path!(p5,lat,lon;path_color=:black)
end
Expand Down Expand Up @@ -213,8 +213,8 @@ md" First the `map_interpolate` function is used to create map interpolation obj
begin
e_itp_mapS = map_interpolate(e_mapS_plot)
n_itp_mapS = map_interpolate(n_mapS_395)
e_mapS_val = e_itp_mapS.(lon_trim,lat_trim)
n_mapS_val = n_itp_mapS.(lon_trim,lat_trim)
e_mapS_val = e_itp_mapS.(lat_trim,lon_trim)
n_mapS_val = n_itp_mapS.(lat_trim,lon_trim)
mapS_err = round(Int,std(n_mapS_val - e_mapS_val)) # error
end

Expand Down
8 changes: 4 additions & 4 deletions examples/pluto_model3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The DataFrames listed below provide useful information about the flight data (co
Dataframe | Description
:--------- | :----------
`df_map` | map files relevant for SGL flights
`df_comp` | SGL calibration flight lines
`df_cal` | SGL calibration flight lines
`df_flight`| SGL flight files
`df_all` | all flight lines
`df_nav` | all *navigation-capable* flight lines
Expand All @@ -47,7 +47,7 @@ Dataframe | Description
# ╔═╡ 3a55962c-bd1b-410c-b98a-3130fc11ee11
md"## Train a (linear) Tolles-Lawson model
Select Flight 1006 (see [readme](https://github.com/MIT-AI-Accelerator/MagNav.jl/blob/master/readmes/Flt1006_readme.txt)), load the flight data, & get the Boolean indices for a specific calibration flight line that will be used to fit the Tolles-Lawson coefficients. The full list of SGL flights is in `df_flight`, & the full list of calibration flight line options is in `df_comp`.
Select Flight 1006 (see [readme](https://github.com/MIT-AI-Accelerator/MagNav.jl/blob/master/readmes/Flt1006_readme.txt)), load the flight data, & get the Boolean indices for a specific calibration flight line that will be used to fit the Tolles-Lawson coefficients. The full list of SGL flights is in `df_flight`, & the full list of calibration flight line options is in `df_cal`.
"

# ╔═╡ bf9f72f0-c351-48d3-a811-418ee965073c
Expand All @@ -62,9 +62,9 @@ xyz_train = get_XYZ(flight_train, df_flight;

# ╔═╡ 99405ae1-580a-4fd3-a860-13cc5b22b045
begin # select a calibration flight line to train Tolles-Lawson on
println(df_comp[df_comp.flight .== flight_train, :])
println(df_cal[df_cal.flight .== flight_train, :])
TL_i = 6 # select first calibration box of 1006.04
TL_ind = get_ind(xyz_train;tt_lim=[df_comp.t_start[TL_i],df_comp.t_end[TL_i]])
TL_ind = get_ind(xyz_train;tt_lim=[df_cal.t_start[TL_i],df_cal.t_end[TL_i]])
end;

# ╔═╡ 3d438be1-537b-4c13-a422-7f5f48479e62
Expand Down
6 changes: 3 additions & 3 deletions examples/pluto_sgl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The DataFrames listed below provide useful information about the flight data (co
Dataframe | Description
:--------- | :----------
`df_map` | map files relevant for SGL flights
`df_comp` | SGL calibration flight lines
`df_cal` | SGL calibration flight lines
`df_flight`| SGL flight files
`df_all` | all flight lines
`df_nav` | all *navigation-capable* flight lines
Expand Down Expand Up @@ -92,13 +92,13 @@ begin
end;

# ╔═╡ f665ea95-dac3-4823-94af-c7ba58cd4401
md"Select a flight line (row of `df_comp`) & get the flight data Boolean indices (mask) for Tolles-Lawson calibration. The full list of calibration flight line options is in `df_comp`.
md"Select a flight line (row of `df_cal`) & get the flight data Boolean indices (mask) for Tolles-Lawson calibration. The full list of calibration flight line options is in `df_cal`.
"

# ╔═╡ 5346a989-cf32-436c-9181-d7aff6dd44a1
begin
TL_i = 6 # select first calibration box of 1006.04
TL_ind = get_ind(xyz;tt_lim=[df_comp.t_start[TL_i],df_comp.t_end[TL_i]])
TL_ind = get_ind(xyz;tt_lim=[df_cal.t_start[TL_i],df_cal.t_end[TL_i]])
end;

# ╔═╡ db7dc866-b889-4fb7-81d4-97cd8435636e
Expand Down
2 changes: 1 addition & 1 deletion examples/pluto_sim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The DataFrames listed below provide useful information about the flight data (co
Dataframe | Description
:--------- | :----------
`df_map` | map files relevant for SGL flights
`df_comp` | SGL calibration flight lines
`df_cal` | SGL calibration flight lines
`df_flight`| SGL flight files
`df_all` | all flight lines
`df_nav` | all *navigation-capable* flight lines
Expand Down
Loading

0 comments on commit 20a94d4

Please sign in to comment.