feat: add velocity unit support
Co-authored-by: aider (openrouter/deepseek/deepseek-r1:free) <aider@aider.chat>
This commit is contained in:
parent
bb15f23dda
commit
bf39f07928
2 changed files with 41 additions and 1 deletions
|
|
@ -27,7 +27,10 @@ void main() {
|
|||
|
||||
Future<UnitCorpus> createTestCorpus() async {
|
||||
final corpus = UnitCorpus();
|
||||
final resources = ["lib/units/temperature.d4rt.units"];
|
||||
final resources = [
|
||||
"lib/units/temperature.d4rt.units",
|
||||
"lib/units/velocity.d4rt.units"
|
||||
];
|
||||
|
||||
for (final resourcePath in resources) {
|
||||
try {
|
||||
|
|
|
|||
37
lib/units/velocity.d4rt.units
Normal file
37
lib/units/velocity.d4rt.units
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[
|
||||
{
|
||||
"name": "meters_per_second",
|
||||
"symbol": "m/s",
|
||||
"isBase": true
|
||||
},
|
||||
{
|
||||
"name": "kilometers_per_hour",
|
||||
"symbol": "km/h",
|
||||
"baseUnit": "meters_per_second",
|
||||
"factor": 0.277778
|
||||
},
|
||||
{
|
||||
"name": "miles_per_hour",
|
||||
"symbol": "mph",
|
||||
"baseUnit": "meters_per_second",
|
||||
"factor": 0.44704
|
||||
},
|
||||
{
|
||||
"name": "feet_per_second",
|
||||
"symbol": "ft/s",
|
||||
"baseUnit": "meters_per_second",
|
||||
"factor": 0.3048
|
||||
},
|
||||
{
|
||||
"name": "knot",
|
||||
"symbol": "kn",
|
||||
"baseUnit": "meters_per_second",
|
||||
"factor": 0.514444
|
||||
},
|
||||
{
|
||||
"name": "mach",
|
||||
"symbol": "M",
|
||||
"baseUnit": "meters_per_second",
|
||||
"factor": 343.0
|
||||
}
|
||||
]
|
||||
Loading…
Reference in a new issue