pile_nav_new/lib/models/coord_trans.dart
2024-08-18 22:42:37 +08:00

64 lines
1.5 KiB
Dart

class CoordTrans {
int id;
// ignore: non_constant_identifier_names
double L0;
String belt;
String? calibs;
String dstEllipsoid;
double dx;
double dy;
double dz;
double wx;
double wy;
double wz;
double k;
double elevation;
int isMain;
String name;
double rota;
String srcEllipsoid;
CoordTrans({
required this.name,
// ignore: non_constant_identifier_names
required this.L0,
required this.belt,
this.calibs,
required this.dstEllipsoid,
required this.dx,
required this.dy,
required this.dz,
required this.id,
required this.wx,
required this.wy,
required this.wz,
required this.k,
required this.elevation,
required this.isMain,
required this.rota,
required this.srcEllipsoid,
});
factory CoordTrans.fromJson(Map<dynamic, dynamic> data) {
return CoordTrans(
name: data['name'],
id: data['id'],
L0: data['L0'].toDouble(),
belt: data['belt'],
calibs: data['calibs'],
dstEllipsoid: data['dstEllipsoid'],
dx: data['dx'].toDouble(),
dy: data['dy'].toDouble(),
dz: data['dz'].toDouble(),
wx: data['wx'].toDouble(),
wy: data['wy'].toDouble(),
wz: data['wz'].toDouble(),
rota: data['rota'].toDouble(),
k: data['k'].toDouble(),
isMain: data['is_main'],
elevation: data['elevation'].toDouble(),
srcEllipsoid: data['srcEllipsoid'],
);
}
void forEach(Null Function(dynamic key, dynamic value) param0) {}
}