-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from KG32/feat/ndl-type
feat: ndl type
- Loading branch information
Showing
14 changed files
with
119 additions
and
64 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
use dive_deco::{ BuehlmannConfig, BuehlmannModel, DecoModel }; | ||
use dive_deco::{ BuehlmannConfig, BuehlmannModel, DecoModel, NDLType }; | ||
|
||
fn main() { | ||
// model with default config (GF 100/100) | ||
let default_config = BuehlmannConfig::default(); | ||
let model_1 = BuehlmannModel::new(default_config); | ||
println!("{:?}", model_1.config()); // BuehlmannConfig { gf: (100, 100) } | ||
|
||
// model with config instance | ||
// model with full config instance | ||
let config_instance = BuehlmannConfig { | ||
gf: (85, 85), | ||
surface_pressure: 1013, | ||
deco_ascent_rate: 9. | ||
deco_ascent_rate: 9., | ||
ndl_type: NDLType::Actual, | ||
}; | ||
let model_2 = BuehlmannModel::new(config_instance); | ||
println!("{:?}", model_2.config()); | ||
|
||
|
||
// model with fluent-interface-like config | ||
let config_with_gf = BuehlmannConfig::new().gradient_factors(30, 70); | ||
let config_with_gf = BuehlmannConfig::default().gradient_factors(30, 70); | ||
let model_3 = BuehlmannModel::new(config_with_gf); | ||
println!("{:?}", model_3.config()); // BuehlmannConfig { gf: (30, 70) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ pub use common::{ | |
DecoStage, | ||
DecoStageType, | ||
DecoRuntime, | ||
Sim | ||
Sim, | ||
NDLType, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.