Functionality added to parse any allowances custom values for angle

This commit is contained in:
Usman Ali
2020-02-04 22:43:29 +05:00
parent 82c81ba011
commit 0c4ce87869
3 changed files with 296 additions and 84 deletions
@@ -58,86 +58,280 @@
"GPH_DH_TOT":0,
"Allowances":{
"Beat":[
1036.9,
864.7,
780.4,
754,
743.7,
739.4,
737.3
{
"twsInKts":7.5,
"allInSPNM":1036.9
},
{
"twsInKts":8.5,
"allInSPNM":864.7
},
{
"twsInKts":9.5,
"allInSPNM":780.4
},
{
"twsInKts":12.5,
"allInSPNM":754
},
{
"twsInKts":16.5,
"allInSPNM":743.7
},
{
"twsInKts":20.5,
"allInSPNM":739.4
},
{
"twsInKts":30.5,
"allInSPNM":737.3
}
],
"Run":[
1049.1,
843,
709.9,
625.2,
569.2,
535.4,
481.8
{
"twsInKts":7.5,
"allInSPNM":1049.1
},
{
"twsInKts":8.5,
"allInSPNM":843
},
{
"twsInKts":9.5,
"allInSPNM":709.9
},
{
"twsInKts":12.5,
"allInSPNM":625.2
},
{
"twsInKts":16.5,
"allInSPNM":569.2
},
{
"twsInKts":20.5,
"allInSPNM":535.4
},
{
"twsInKts":30.5,
"allInSPNM":481.8
}
],
"BeatAngle":[
40.8,
40.8,
38.2,
37.2,
36.8,
36.8,
37.5
{
"twsInKts":7.5,
"allInSPNM":40.8
},
{
"twsInKts":8.5,
"allInSPNM":40.8
},
{
"twsInKts":9.5,
"allInSPNM":38.2
},
{
"twsInKts":12.5,
"allInSPNM":37.2
},
{
"twsInKts":16.5,
"allInSPNM":36.8
},
{
"twsInKts":20.5,
"allInSPNM":36.8
},
{
"twsInKts":30.5,
"allInSPNM":37.5
}
],
"GybeAngle":[
147.5,
151,
153.5,
168.9,
180,
180,
180
{
"twsInKts":7.5,
"allInSPNM":147.5
},
{
"twsInKts":8.5,
"allInSPNM":151
},
{
"twsInKts":9.5,
"allInSPNM":153.5
},
{
"twsInKts":12.5,
"allInSPNM":168.9
},
{
"twsInKts":16.5,
"allInSPNM":180
},
{
"twsInKts":20.5,
"allInSPNM":180
},
{
"twsInKts":30.5,
"allInSPNM":180
}
],
"WL":[
1043,
853.8,
745.2,
689.6,
656.5,
637.4,
609.5
{
"twsInKts":7.5,
"allInSPNM":1043
},
{
"twsInKts":8.5,
"allInSPNM":853.8
},
{
"twsInKts":9.5,
"allInSPNM":745.2
},
{
"twsInKts":12.5,
"allInSPNM":689.6
},
{
"twsInKts":16.5,
"allInSPNM":656.5
},
{
"twsInKts":20.5,
"allInSPNM":637.4
},
{
"twsInKts":30.5,
"allInSPNM":609.5
}
],
"CR":[
890.9,
726.2,
639.4,
589.6,
559.1,
538.7,
511.2
{
"twsInKts":7.5,
"allInSPNM":890.9
},
{
"twsInKts":8.5,
"allInSPNM":726.2
},
{
"twsInKts":9.5,
"allInSPNM":639.4
},
{
"twsInKts":12.5,
"allInSPNM":589.6
},
{
"twsInKts":16.5,
"allInSPNM":559.1
},
{
"twsInKts":20.5,
"allInSPNM":538.7
},
{
"twsInKts":30.5,
"allInSPNM":511.2
}
],
"OC":[
1043.6,
805.8,
678.6,
609.8,
572.4,
541.2,
486.8
{
"twsInKts":7.5,
"allInSPNM":1043.6
},
{
"twsInKts":8.5,
"allInSPNM":805.8
},
{
"twsInKts":9.5,
"allInSPNM":678.6
},
{
"twsInKts":12.5,
"allInSPNM":609.8
},
{
"twsInKts":16.5,
"allInSPNM":572.4
},
{
"twsInKts":20.5,
"allInSPNM":541.2
},
{
"twsInKts":30.5,
"allInSPNM":486.8
}
],
"NS":[
929.4,
753.6,
660.1,
606.1,
572.9,
551,
522.5
{
"twsInKts":7.5,
"allInSPNM":929.4
},
{
"twsInKts":8.5,
"allInSPNM":753.6
},
{
"twsInKts":9.5,
"allInSPNM":660.1
},
{
"twsInKts":12.5,
"allInSPNM":606.1
},
{
"twsInKts":16.5,
"allInSPNM":572.9
},
{
"twsInKts":20.5,
"allInSPNM":551
},
{
"twsInKts":30.5,
"allInSPNM":522.5
}
],
"OL":[
991.7,
813.8,
724.1,
679.6,
654.6,
638.3,
611.9
],
{
"twsInKts":7.5,
"allInSPNM":991.7
},
{
"twsInKts":8.5,
"allInSPNM":813.8
},
{
"twsInKts":9.5,
"allInSPNM":724.1
},
{
"twsInKts":12.5,
"allInSPNM":679.6
},
{
"twsInKts":16.5,
"allInSPNM":654.6
},
{
"twsInKts":20.5,
"allInSPNM":638.3
},
{
"twsInKts":30.5,
"allInSPNM":611.9
}
],
"R52.1":[
{
"twsInKts":7.5,
@@ -32,7 +32,7 @@ public class ORCCertificateJsonDeserializerTest {
}
@Test
public void testOldFormateOrcCertificateDeserializer() throws FileNotFoundException, IOException, ParseException {
public void testNewFormateOrcCertificateDeserializer() throws FileNotFoundException, IOException, ParseException {
File fileGER = new File(RESOURCES + "newFormatCertificate.json");
ORCCertificatesCollection importer = ORCCertificatesImporter.INSTANCE.read(new FileInputStream(fileGER));
Iterator<ORCCertificate> iterator = importer.getCertificates().iterator();